[ruby-core:94362] [Ruby master Bug#6527] WEBrick::HTTPResponse.header is a hash

From: merch-redmine@...
Date: 2019-08-15 01:49:38 UTC
List: ruby-core #94362
Issue #6527 has been updated by jeremyevans0 (Jeremy Evans).

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).

----------------------------------------
Bug #6527: WEBrick::HTTPResponse.header is a hash
https://bugs.ruby-lang.org/issues/6527#change-80772

* Author: fhars (Florian Hars)
* Status: Rejected
* Priority: Normal
* Assignee: nahi (Hiroshi Nakamura)
* Target version: 
* ruby -v: ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
* Backport: 
----------------------------------------
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.



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

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next