Project

General

Profile

Actions

Bug #6527

closed

WEBrick::HTTPResponse.header is a hash

Added by fhars (Florian Hars) almost 12 years ago. Updated over 4 years ago.

Status:
Rejected
Target version:
-
ruby -v:
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
Backport:
[ruby-core:45367]

Description

This means that there can only be one header with a given name, which makes if for example impossible to implement anything but the most trivial RFC 2617 authentication schemes, most of which would require several WWW-Authenticate headers.

This does of course affect version 1.8, too.

Updated by mame (Yusuke Endoh) almost 12 years ago

  • Status changed from Open to Assigned
  • Assignee set to nahi (Hiroshi Nakamura)

Updated by jeremyevans0 (Jeremy Evans) over 4 years ago

  • Status changed from Assigned to Rejected

I don't think this is a bug. WEBrick::HTTPResponse.header is a hash, but the values are arrays. So if a request comes in with multiple WWW-Authenticate headers, header['www-authenticate'] should contain an array of all WWW-Authenticate header values. This appears to be true even in 1.8.7 (https://github.com/ruby/ruby/blob/ruby_1_8_7/lib/webrick/httputils.rb#L118-L145).

Actions

Also available in: Atom PDF

Like0
Like0Like0