vlib: http.Server: different behavior between prod and non-prod for *invalid* Response object #20899
Labels
Bug
This tag is applied to issues which reports bugs.
Unit: vlib
Bugs/feature requests, that are related to the vlib.
Describe the bug
In production the http_version can be unset and it will repond with an HTTP/0.0 response. However, compiling with tcc and w/o -prod will respond with an HTTP/1 response.
I am not sure how we would like to handle this I think the HTTP version really should be specified at the server level and not in the response, but a server should be able to handle also different HTTP versions.
Reproduction Steps
Expected Behavior
This is a framework problem. The error handling is unavailable to the handler and the Server needs to act reasonable when the handler gives invalid response. What is that? Error 500 something invalid Response from handler, with http_version = v1_1? (which is the default)?
Current Behavior
In production the code returns HTTP/0.0 and the client won't accept.
Possible Solution
Additional Information/Context
No response
V version
V 0.4.4 cf7dcfe
Environment details (OS name and version, etc.)
NAME="Artix Linux"
PRETTY_NAME="Artix Linux"
ID=artix
BUILD_ID=rolling
ANSI_COLOR="0;36"
HOME_URL="https://www.artixlinux.org/"
DOCUMENTATION_URL="https://wiki.artixlinux.org/"
SUPPORT_URL="https://forum.artixlinux.org/"
BUG_REPORT_URL="https://bugs.artixlinux.org/"
PRIVACY_POLICY_URL="https://terms.artixlinux.org/docs/privacy-policy/"
LOGO=artixlinux-logo
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: