Project

General

Profile

Actions

Bug #5758

closed

webrickのhttpresponseについて

Added by kennyj (寿宣 梶原) over 12 years ago. Updated over 12 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
Backport:
[ruby-dev:44988]

Description

はじめまして。
梶原と申します。

ruby on rails 3.1.xで再現しているのですが、webrickのhttpresponse.rbの挙動について少し疑問に持っている事があります。

httpレスポンスコードが304等を返す場合、content-lengthを削除する処理が入っています(188行目)。
その後、一般的にはkeep aliveしたい事が多いのですが、205行目の判定は上記の影響もあり偽になってしまい、WARNINGが出力されてしまいます。

185行目の
if chunked? || @header['content-length']

if chunked? || @header['content-length'] || (@status == 304 || @status == 204 || HTTPStatus::info?(@status))
の様な感じにすべきではないかと思いますが如何でしょうか?(187行目と共通化すべきですが)


Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Bug #5737: WEBrick doesn't support keep alive connections for 204 and 304 responsesClosednormalperson (Eric Wong)Actions

Updated by kennyj (寿宣 梶原) over 12 years ago

申し訳ありません。
5737と同じです。closeお願いいたします。

Updated by ayumin (Ayumu AIZAWA) over 12 years ago

  • Status changed from Open to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0