Age | Commit message (Collapse) | Author |
|
This seemed to cause the name to be doubled in the final Apache HTTP
header.
Since it could cause that issue and is not necessary, we can remove it.
|
|
I was getting persistent 500 errors on Apache with mod_fastcgi:
FastCGI: comm with server "/Applications/MAMP/htdocs/test.fcgi"
aborted: error parsing headers: malformed header 'HTTP/1.1 200 OK'
Forgot that you need to use a "Status" header for FastCGI to set the
HTTP status code, like:
Status: 404
This isn't an HTTP server. Apparently knew this at one point for the
DomeKey web site, but completely forgot.
Thanks to Ole (https://stackoverflow.com/users/312098/ole) and
RichieHindle (https://stackoverflow.com/users/21886/richiehindle) on
Stack Overflow for this question and answer that helped me figure it
out:
https://stackoverflow.com/questions/11223166/malformed-header-from-script-bad-header-http-1-1-302-found
Didn't notice this previously as I was using Lighttpd for testing, and
its FastCGI module must be more forgiving.
|
|
|
|
We don't have any `Result`s to propagate in this function, so the
`Result` return wrapper is unnecessary.
Must have copied this signature from Civet without thinking:
https://github.com/conduit-rust/rust-civet/blob/ab9c52ca634f65439060c2248295d2ac354aead5/src/lib.rs#L214
|
|
Write doc comments for functions and types, and include a short example.
|
|
Reduce a few lines.
|
|
Provide a mechanism to get detailed error messages when 500 internal
server errors happen.
We don't want to expose any detailed error information to clients, but
it would be useful for administrators to know the cause of any errors.
|
|
|
|
Since we don't actually need any additional context here, we can remove
it. Since that allows us to avoid calling `context()` with the
`WriteError` context selector, we can then safely rename `WriteError` to
`Write`.
|
|
Make this specifically about errors writing instead of a generic I/O
error.
Name the variant `WriteError` instead of `Write` because Snafu will
generate context selector structs with these names and we already have a
`Write` identifier imported.
|
|
If we get errors building the request or Conduit errors, respond with a
500 error. Otherwise, it's a write error, and we should do nothing
(ideally log the error), because this means the client closed the
connection or there are bigger problems.
|
|
Now that we have a `request` module, the "Request" part of the name is
redundant.
|
|
Add a new error type that we can use to collect and match errors from
`handle_request()`.
|
|
Make a separate function that can return a result to make it easier to
handle errors from the handler.
|
|
|