[ruby-core:36563] [Ruby 1.9 - Feature #3622] Net::HTTP does not wait to send request body with Expect: 100-continue

9 views
Skip to first unread message

Hiroshi NAKAMURA

unread,
May 29, 2011, 10:20:07 PM5/29/11
to ruby...@ruby-lang.org

Issue #3622 has been updated by Hiroshi NAKAMURA.

Due date set to 05/31/2011


----------------------------------------
Feature #3622: Net::HTTP does not wait to send request body with Expect: 100-continue
http://redmine.ruby-lang.org/issues/3622

Author: Eric Hodel
Status: Assigned
Priority: Normal
Assignee: Hiroshi NAKAMURA
Category: lib
Target version: 1.9.x
ruby -v: ruby 1.9.3dev (2010-07-07 trunk 28561) [x86_64-darwin10.4.0]


=begin
HTTP/1.1 allows a client to determine if the server will accept a request body using the Expect header with a value of 100-continue. If the server finds the request header the client sent acceptable it will return with a 100 Continue response and the client will then send the request body.

Instead of waiting for a 100 Continue response Net::HTTP immediately sends the request body and ignores any 100 Continue responses.

The current behavior defeats the purpose of the Expect: 100-continue value and the 100 Continue response code.

If I am attempting to upload a large file like a photo and to a server that requires HTTP authentication I will have to wait until the upload is complete before I can retrieve a 401 response for incorrect authentication.

I have attached a proposed patch that adds a continue timeout. Net::HTTP will wait up to the continue timeout before sending the request body.
=end

--
http://redmine.ruby-lang.org

Hiroshi NAKAMURA

unread,
May 30, 2011, 2:37:16 AM5/30/11
to ruby...@ruby-lang.org

Issue #3622 has been updated by Hiroshi NAKAMURA.


Merged the update from Eric Hodel. Thanks Eric, and I'm sorry for posting the patch which does not include full changes. Can't remember why I thought the tests I added run correctly...

I'll commit this.
https://github.com/nahi/ruby/compare/4e4649e13cd4175aab75...0fa41a6f7b86c17b0225

Hiroshi NAKAMURA

unread,
Jun 11, 2011, 5:55:14 AM6/11/11
to ruby...@ruby-lang.org

Issue #3622 has been updated by Hiroshi NAKAMURA.

Status changed from Assigned to Closed

I close this since I believe r31860 includes the original intent of the patch from Eric. Please reopen this if it doesn't work.


----------------------------------------
Feature #3622: Net::HTTP does not wait to send request body with Expect: 100-continue
http://redmine.ruby-lang.org/issues/3622

Author: Eric Hodel
Status: Closed

Reply all
Reply to author
Forward
0 new messages