-
-
Notifications
You must be signed in to change notification settings - Fork 355
Amazon authentication: Fix Expect: 100-continue #49
Conversation
- Respond with 100 Ok if the client has "expect: 100-continue" in header
@ddossot created an issue ... maybe he will merge it... |
@alexmuntean Thank you! |
@btalbot Are you sure this is needed? Looking at WebRick's source code, it seems that HTTP headers are down-cased: https://github.com/ruby/ruby/blob/trunk/lib/webrick/httprequest.rb#L288 WebRick itself relies on this this internally when it compares with expected values: https://github.com/ruby/ruby/blob/trunk/lib/webrick/httprequest.rb#L566 |
I think that the header "name" is converted to downcase, but afaik, the header "value" is not. https://github.com/ruby/ruby/blob/trunk/lib/webrick/httprequest.rb#L288 is the only use of downcase that I see. |
@btalbot You are 100% right 🙇 Pardon my stupidity 😿 |
@ddossot you can use my github repo as a gem... I won't remove the project. this PR is created a long ago and @jubos didn't say anything... I know it's needed. The company I was working for was using fake-s3 to use test the code but it was very slow (3 seconds or so for a request) and this is the PR.. I am 100% that you encountered the same thing :) |
@alexmuntean Thanks! I'm pulling fake-s3 from rubygems via the Torquebox Maven proxy (because I'm running it on jRuby). So I need the gem on rubygems. I've pulled your change in my fork and I think that I will just push a variation of fake-s3 on rubygems just so I can build my project. |
Alex, I plan to get this merged into the next point release. Thanks for handling the continue requests. |
@jubos Exciting news! 👏 |
I merged this into master. |
Amazon clients add in header expect:100-continue and is waiting for approval to send the body on the second line in socket.
Amazon server responds fast but FakeS3 has this problem. Why? Because the client is waiting for approval of the server...
How this Expect: 100 continue works?: http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html (8.2.3)