-
Notifications
You must be signed in to change notification settings - Fork 1
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
HTTP headers should be seperated by CRLF #58
Comments
Good spot, although it should only be the FastCGI server; the CLI technically doesn't emit HTTP (and indeed should probably not emit the headers at all unless |
But would we want the cli and fcgi output to differ? What if the cli server was used to pipe ‘HTTP’ to some other process, in lieu of |
Actually, we should probably introduce a new API, |
We should add a specific CGI SAPI for the 'pipe HTTP' case, as that would do exactly as you do describe.
|
I feel this feature speculation is starting to detract from the issue of incorrect line endings. Fixing the bug and improving the API ought to be separate issues, with the former a higher priority — I'll create a new ticket for the latter. |
All of the calls in libquilt and patchwork to quilt_request_headers() include a LF character at the end. Firstly, this detail should be handled by the implementations, not repeated across the codebase, and secondly it is incorrect. The HTTP specs define the header line seperator (and headers—body—footers seperators) to be CRLF (twice, for seperating envelope components).
The seperator should be moved to the implementations: servers/cli/cli.c and servers/fcgi/fcgi.c, and should be changed to \r\n.
Likewise, all the places where data->headers_sent is set to 1, and a \n emitted, should call a single new function which emits \r\n.
The text was updated successfully, but these errors were encountered: