Expect 100-continue errors
normalperson at yhbt.net
Wed Dec 9 17:16:09 EST 2009
Jan Dvorak <jan.dvorak at kraxnet.cz> wrote:
> i'm trying to implement handling of http Expect: 100-continue with
> unicorn in my rails app, but when i return  as a response (which
> should force unicorn to return 100 status and rerun my app with the same
> connection) i get this error:
> Read error: #<ThreadError: stopping only thread
> note: use sleep to stop forever>
Try disabling automatic code reloading under Rails development mode.
Unicorn (and Rainbows!) are the only Ruby servers I know of that allow
Rack applications to properly return and continue with 100 responses.
Unicorn calls your Rack app twice in this case: it sees a 100 response,
writes the 100-continue response and then does app.call(env) again after
deleting the "Expect: 100-continue" header from env.
I haven't tested this under Rails so I don't know how well it works with
what Rails does under the covers, but I've done this heavily with bare
More information about the mongrel-unicorn