[#63592] [ruby-trunk - Bug #10009] IO operation is 10x slower in multi-thread environment — normalperson@...
Issue #10009 has been updated by Eric Wong.
3 messages
2014/07/08
[#63682] [ruby-trunk - Feature #10030] [PATCH] reduce rb_iseq_struct to 296 bytes — ko1@...
Issue #10030 has been updated by Koichi Sasada.
3 messages
2014/07/13
[#63703] [ruby-trunk - Feature #10030] [PATCH] reduce rb_iseq_struct to 296 bytes — ko1@...
Issue #10030 has been updated by Koichi Sasada.
3 messages
2014/07/14
[#63743] [ruby-trunk - Bug #10037] Since r46798 on Solaris, "[BUG] rb_vm_get_cref: unreachable" during make — ngotogenome@...
Issue #10037 has been updated by Naohisa Goto.
3 messages
2014/07/15
[#64136] Ruby 2.1.2 (and 2.1.1 and probably others) assumes a libffi with 3 version numbers in extconf.rb — "Jeffrey 'jf' Lim" <jfs.world@...>
As per subject.
4 messages
2014/07/31
[#64138] Re: Ruby 2.1.2 (and 2.1.1 and probably others) assumes a libffi with 3 version numbers in extconf.rb
— "Jeffrey 'jf' Lim" <jfs.world@...>
2014/07/31
On Thu, Jul 31, 2014 at 6:03 PM, Jeffrey 'jf' Lim <[email protected]>
[ruby-core:63474] [ruby-trunk - Bug #9986] WEBrick content-length being set when transfer-encoding is chunked
From:
lengarvey@...
Date:
2014-07-01 13:28:47 UTC
List:
ruby-core #63474
Issue #9986 has been updated by Leonard Garvey.
File webrick_transfer_encoding_chunked_content_length_failing_test.patch added
File webrick_transfer_encoding_chunked_content_length_fix.patch added
I've split out my patch into two separate patches. The first contains a failing test and the second contains a fix which has been applied to `WEBrick::HTTPResponse#[]=` instead of `#chunked?`
----------------------------------------
Bug #9986: WEBrick content-length being set when transfer-encoding is chunked
https://bugs.ruby-lang.org/issues/9986#change-47514
* Author: Leonard Garvey
* Status: Assigned
* Priority: Normal
* Assignee: Hiroshi Nakamura
* Category: lib
* Target version: current: 2.2.0
* ruby -v: trunk, ruby 2.1.2p95
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
It's possible to get WEBrick to return both Transfer-Encoding: chunked and a calculated Content-length header. If the Transfer-encoding header is set via WEBrick::HTTPResponse#[]= then #chunked? will return false and the content length will be set during the setup_headers method. This causes issues with rack and safari (example code for rack can be seen https://github.com/rack/rack/issues/618#issuecomment-47355492). As far as I'm aware WEBrick shouldn't return a content-length when a transfer-encoding chunked header is present. Messages MUST NOT include both a Content-Length header field and a transfer-coding. as per http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html
The following test can be placed into test_httpresponse.rb to demonstrate the issue:
~~~
def test_200_chunked_does_not_set_content_length
res.body = 'hello'
res.status = 200
res.chunked = false
res["Transfer-Encoding"] = 'chunked'
res.setup_header
assert_nil res.header.fetch('content-length', nil)
end
~~~
I've added a patchfile which includes the above test and a fix for the issue.
---Files--------------------------------
webrick_transfer_encoding_chunked_content_length.patch (1.07 KB)
webrick_transfer_encoding_chunked_content_length_failing_test.patch (652 Bytes)
webrick_transfer_encoding_chunked_content_length_fix.patch (423 Bytes)
--
https://bugs.ruby-lang.org/