in the RFC the header is defined as: Content-MD5 = "Content-MD5" ":" md5-digest md5-digest = <base64 of 128 bit MD5 digest as per RFC 1864> closes #97
render 404 inside fsm
Remove return value of #handle_expcetion
Support key-only accept-extensions
Webmachine requires lazy_request_body by itself, addition of DEFAULT_OPTIONS is just there for future use, Reel is undergoing some changes and it might be handy then.
We'll just always set a 500 status, which can then be modified in #finish_response. Brings code up-to-date with documentation.
rfc2616-sec14 defines accept-extensions as ";" token [ "=" ( token | quoted-string ) ] which means the value is optional.
…m other libraries.
There are two failing adapter lint tests, most likely due to bugs in Reel's Content-Length calculation.
* Make sure to use the latest Reel. * Silence the chattiness of WEBrick during specs. * Don't restrict the use Celluloid::TaskThread to a specific JRuby version. * Use terminate! so as not to block when shutting down the Reel server. * Reel's request body is not Enumerable, so wrap it in LazyRequestBody for now. * Fixup response headers and callable responses for Reel. * Some whitespace cleanups/normalization.
The `shutdown` method isn't actually in scope because of how Mongrel evaluates the configurator block. I could have passed the method into the configurator as a proc in the options hash (as dispatcher is) but this is simple, too.
There were three issues that needed to be resolved. 1. Precedence issue in `IOEncoder#each` 2. IOEncoder needs to define `empty?` if it has a content length chunked transfer encoding is not set on IO response bodies the same way that it is for enum/proc/fiber, so `ensure_content_length` ends up calling `set_content_length`, which calls `empty?` 3. Adapters shouldn't use ChunkedBody unless Transfer-Encoding says so The fixes I put in are just workarouns. I think that some real thought should be put into better long term fixes.
This is useful for integration testing, which would start and stop a server. In normal operation, the signal handler would perform the shutdown.
This actually caught an issue with the way response headers are handled. Sometimes response headers can be array-valued, which was broken. I also split the mongrel and reel adapters #run method into two parts, in order to support graceful shutdown. This fixes an annoying wart where ports are left open across tests, but it also adds unnecessary complexity to the adapters.
This is a snapshot of the Reel adapter I'm using in the Cryptosphere. It includes some general refactoring and the following notable changes: * Support for mapping extended HTTP verbs to the _method pseudoparameter (e.g. for WebDAV support) * Joins to the foreground actor rather than sleeping the thread. This fixes deadlock detection issues * Streaming support: passes Reel's request.body objects through unmolested rather than using LazyRequestBody
Rack::Response iterates over given body which in some cases, like Fiber streaming, may block responding to client. https://github.com/rack/rack/blob/master/lib/rack/response.rb#L35-L38 RackResponse is introduced instead to cleanup Content-Type header in order to pass Rack::Lint.