ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:41657] [Ruby 1.8 - Bug #5764][Open] Net::HTTP should assume HTTP/0.9 on unexpected responses
@ 2011-12-14 21:01 Mike Styer
  2019-07-15 17:06 ` [ruby-core:93792] [Ruby master Feature#5764] " merch-redmine
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Styer @ 2011-12-14 21:01 UTC (permalink / raw
  To: ruby-core


Issue #5764 has been reported by Mike Styer.

----------------------------------------
Bug #5764: Net::HTTP should assume HTTP/0.9 on unexpected responses
http://redmine.ruby-lang.org/issues/5764

Author: Mike Styer
Status: Open
Priority: Normal
Assignee: 
Category: lib
Target version: 
ruby -v: ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-darwin11.1.0] 


Currently Net::HTTP.read_status_line throws Net::HTTPBadResponse if the status line does not conform to HTTP/1.1 specifications.

But in cases when the web server implements a request size limit, it may not read HTTP/1.1 trailer after the request URI and may send back an HTTP/0.9 response.

Nginx does this for 414 Request-URI Too Large responses:

http://lxr.evanmiller.org/http/source/http/ngx_http_header_filter_module.c#L95
http://forum.nginx.org/read.php?2,52862,52862

Perl's Net::HTTP provides a "laxed" option to read_response_headers() to assume HTTP/0.9 if it can't find an HTTP/1.1 status line. Ruby should provide a similar option.


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [ruby-core:93792] [Ruby master Feature#5764] Net::HTTP should assume HTTP/0.9 on unexpected responses
  2011-12-14 21:01 [ruby-core:41657] [Ruby 1.8 - Bug #5764][Open] Net::HTTP should assume HTTP/0.9 on unexpected responses Mike Styer
@ 2019-07-15 17:06 ` merch-redmine
  0 siblings, 0 replies; 2+ messages in thread
From: merch-redmine @ 2019-07-15 17:06 UTC (permalink / raw
  To: ruby-core

Issue #5764 has been updated by jeremyevans0 (Jeremy Evans).

ruby -v deleted (ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-darwin11.1.0] )
Assignee set to naruse (Yui NARUSE)
Status changed from Open to Assigned
Project changed from Ruby 1.8 to Ruby master
Tracker changed from Bug to Feature

This appears to still be the case in master, but I think this is a feature request for a "laxed" option.  I'm not sure if we want to support such an option though.

----------------------------------------
Feature #5764: Net::HTTP should assume HTTP/0.9 on unexpected responses
https://bugs.ruby-lang.org/issues/5764#change-79560

* Author: mstyer (Mike Styer)
* Status: Assigned
* Priority: Normal
* Assignee: naruse (Yui NARUSE)
* Target version: 
----------------------------------------
Currently Net::HTTP.read_status_line throws Net::HTTPBadResponse if the status line does not conform to HTTP/1.1 specifications.

But in cases when the web server implements a request size limit, it may not read HTTP/1.1 trailer after the request URI and may send back an HTTP/0.9 response.

Nginx does this for 414 Request-URI Too Large responses:

http://lxr.evanmiller.org/http/source/http/ngx_http_header_filter_module.c#L95
http://forum.nginx.org/read.php?2,52862,52862

Perl's Net::HTTP provides a "laxed" option to read_response_headers() to assume HTTP/0.9 if it can't find an HTTP/1.1 status line. Ruby should provide a similar option.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-15 17:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-14 21:01 [ruby-core:41657] [Ruby 1.8 - Bug #5764][Open] Net::HTTP should assume HTTP/0.9 on unexpected responses Mike Styer
2019-07-15 17:06 ` [ruby-core:93792] [Ruby master Feature#5764] " merch-redmine

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).