Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x.vweb: fix large payload #20155

Merged
merged 4 commits into from
Dec 12, 2023
Merged

Conversation

Casper64
Copy link
Member

@Casper64 Casper64 commented Dec 11, 2023

x.vweb: fix large payload test

This pr adds missing bits of code to the request reading and string writing part of vweb.

This pr also fixes a bug where more data would be read than the Content-Length headers value.

🤖[deprecated] Generated by Copilot at 66525ad

This pull request enhances the vweb module for web development with v. It fixes bugs, handles edge cases, and improves formatting and messages in vlib/x/vweb/vweb.v.

🤖[deprecated] Generated by Copilot at 66525ad

  • Prevent errors and memory leaks when handling requests and responses (link, link, link, link, link)
  • Check if string response is open before writing it to connection (link)
  • Reset read buffer index to zero when receiving or aborting a request (link, link)
  • Append only the needed bytes to request data when reading request body (link)
  • Set string response open flag to true when generating a response (link)
  • Improve error message when parsing request URL fails (link)
    • Include the URL that caused the error in the message (link)
  • Remove empty line at the beginning of vlib/x/vweb/vweb.v (link)
    • Minor formatting improvement (link)

@spytheman spytheman merged commit ebab6d5 into vlang:master Dec 12, 2023
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants