https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112013-02-24T07:36:05ZRuby Issue Tracking SystemRuby master - Bug #7924: r39232 以降 net/http で正しく reponse を取得出来ないケースがあるhttps://redmine.ruby-lang.org/issues/7924?journal_id=368372013-02-24T07:36:05Zkazuhiko (Kazuhiko Shiozaki)kazuhiko@fdiary.net
<ul></ul><p>accept-encodingの無指定時に、http.rbのget()でaccept-encodingをつけていて、そのためにgeneric_request.rbが「あ、指定してるんならdecode_content=falseでいいよね」としているのが原因。</p>
<p>accept-encodingの無指定時に"gzip;q=1.0,deflate;q=0.6,identity;q=0.3"をセットするコードが、http.rbのget()とhttp/generic_request.rbのinitialize()の両方にあって、後者は前者の可能性を考慮していない。なので、この問題はputでは起きない。</p>
<p>その二箇所以外にaccept-encodingをセットしているコードはなさそうなので、http.rbのget()から「accept-encodingの無指定時に〜」を除けばなおるはず。</p> Ruby master - Bug #7924: r39232 以降 net/http で正しく reponse を取得出来ないケースがあるhttps://redmine.ruby-lang.org/issues/7924?journal_id=368382013-02-24T07:37:55Zkazuhiko (Kazuhiko Shiozaki)kazuhiko@fdiary.net
<ul></ul><p>問題になった r32932 ruby_2_0_0 にすでにマージされているので、このまま2.0.0を出すとけっこう影響の大きいバグだと思います。</p> Ruby master - Bug #7924: r39232 以降 net/http で正しく reponse を取得出来ないケースがあるhttps://redmine.ruby-lang.org/issues/7924?journal_id=368422013-02-24T07:58:12Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul></ul><p>I found the bug, I will post a patch with a test momentarily.</p> Ruby master - Bug #7924: r39232 以降 net/http で正しく reponse を取得出来ないケースがあるhttps://redmine.ruby-lang.org/issues/7924?journal_id=368432013-02-24T08:02:19Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<ul><li><strong>Assignee</strong> changed from <i>naruse (Yui NARUSE)</i> to <i>drbrain (Eric Hodel)</i></li></ul><p>translation of this issue: <a href="http://bugs.ruby-lang.org/issues/7831#note-10" class="external">http://bugs.ruby-lang.org/issues/7831#note-10</a></p> Ruby master - Bug #7924: r39232 以降 net/http で正しく reponse を取得出来ないケースがあるhttps://redmine.ruby-lang.org/issues/7924?journal_id=368442013-02-24T08:05:46Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul><li><strong>File</strong> <a href="/attachments/3529">net.http.bug7924.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3529/net.http.bug7924.patch">net.http.bug7924.patch</a> added</li></ul><p>The attached patch removes the duplicated header setting in Net::HTTP#get and adds a test.</p>
<p>I double checked net/http* for use of accept-encoding or HAVE_ZLIB, now it only exists in Net::HTTPGenericRequest and Net::HTTPResponse.</p> Ruby master - Bug #7924: r39232 以降 net/http で正しく reponse を取得出来ないケースがあるhttps://redmine.ruby-lang.org/issues/7924?journal_id=368462013-02-24T08:06:39Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul><li><strong>Assignee</strong> changed from <i>drbrain (Eric Hodel)</i> to <i>naruse (Yui NARUSE)</i></li></ul><p>assigned to Naruse-san for approval</p> Ruby master - Bug #7924: r39232 以降 net/http で正しく reponse を取得出来ないケースがあるhttps://redmine.ruby-lang.org/issues/7924?journal_id=368492013-02-24T08:13:05Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<ul></ul><p>this patch seems good.</p> Ruby master - Bug #7924: r39232 以降 net/http で正しく reponse を取得出来ないケースがあるhttps://redmine.ruby-lang.org/issues/7924?journal_id=368522013-02-24T09:25:56Znagachika (Tomoyuki Chikanaga)nagachika00@gmail.com
<ul></ul><p>make check all green with the patch in my environment [x86_64-darwin12.2.0].</p> Ruby master - Bug #7924: r39232 以降 net/http で正しく reponse を取得出来ないケースがあるhttps://redmine.ruby-lang.org/issues/7924?journal_id=368532013-02-24T09:36:02Zkosaki (Motohiro KOSAKI)kosaki.motohiro@gmail.com
<ul></ul><p>Please please make a test. for preventing regression.</p> Ruby master - Bug #7924: r39232 以降 net/http で正しく reponse を取得出来ないケースがあるhttps://redmine.ruby-lang.org/issues/7924?journal_id=368542013-02-24T09:51:10Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul></ul><p>Kosaki-san, the patch contains a test to ensure that decode_content is enabled when using Net::HTTP#get. The behavior of decode_content is already tested in r39232.</p>
<p>Is it sufficient?</p> Ruby master - Bug #7924: r39232 以降 net/http で正しく reponse を取得出来ないケースがあるhttps://redmine.ruby-lang.org/issues/7924?journal_id=368562013-02-24T10:23:17Zkosaki (Motohiro KOSAKI)kosaki.motohiro@gmail.com
<ul></ul><blockquote>
<p>Kosaki-san, the patch contains a test to ensure that decode_content is enabled when using Net::HTTP#get. The behavior of decode_content is already tested in r39232.</p>
<p>Is it sufficient?</p>
</blockquote>
<p>Oops, I missed that. sorry for noise.</p> Ruby master - Bug #7924: r39232 以降 net/http で正しく reponse を取得出来ないケースがあるhttps://redmine.ruby-lang.org/issues/7924?journal_id=368922013-02-24T14:48:27Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li><li><strong>Assignee</strong> changed from <i>naruse (Yui NARUSE)</i> to <i>drbrain (Eric Hodel)</i></li></ul><p>Looks serious. Got ack from hsbt and nagachika.<br>
Drbrain, could you please commit it to trunk and ruby_2_0_0 in advance?<br>
I'll ask naruse-san to do post-review, if he could wake up early enough ;-)</p>
<p>--<br>
Yusuke Endoh <a href="mailto:mame@tsg.ne.jp" class="email">mame@tsg.ne.jp</a></p> Ruby master - Bug #7924: r39232 以降 net/http で正しく reponse を取得出来ないケースがあるhttps://redmine.ruby-lang.org/issues/7924?journal_id=368932013-02-24T15:15:12Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>This issue was solved with changeset r39463.<br>
Hiroshi, thank you for reporting this issue.<br>
Your contribution to Ruby is greatly appreciated.<br>
May Ruby be with you.</p>
<hr>
<ul>
<li>lib/net/http.rb: Removed duplicate Accept-Encoding in Net::HTTP#get.<br>
[ruby-trunk - Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: r39232 以降 net/http で正しく reponse を取得出来ないケースがある (Closed)" href="https://redmine.ruby-lang.org/issues/7924">#7924</a>]</li>
<li>test/net/http/test_http.rb: Test for the above.</li>
</ul> Ruby master - Bug #7924: r39232 以降 net/http で正しく reponse を取得出来ないケースがあるhttps://redmine.ruby-lang.org/issues/7924?journal_id=368942013-02-24T15:20:48Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul></ul><p>Also, r39464 for ruby_2_0_0 branch.</p> Ruby master - Bug #7924: r39232 以降 net/http で正しく reponse を取得出来ないケースがあるhttps://redmine.ruby-lang.org/issues/7924?journal_id=369412013-02-25T00:25:04Znaruse (Yui NARUSE)naruse@airemix.jp
<ul></ul><p>I see.<br>
Thank you all and Happy Ruby 2.0!</p>