def parse_header(raw)
header = Hash.new([].freeze)
field = nil
raw.each{|line|
case line
when /^([A-Za-z0-9!\#$%&'*+\-.^_`|~]+):\s*(.*?)\s*\z/om
field, value = $1, $2
field.downcase!
header[field] = [] unless header.has_key?(field)
header[field] << value # blows up with a frozen error
when /^\s+(.*?)\s*\z/om
Seems to have something to do with how this Hash is working...something broken with the new hashCode changes maybe?
I confirmed the field is valid (user_agent), keys returns nothing before and only user_agent afterwards, has_key is returning false, and the eventual array in the header hash is frozen. Haven't figured out why yet, and it works for offline test cases.
On 6/20/06, Charles O Nutter <[EMAIL PROTECTED]> wrote:
I'm getting this on my local script/server:Bad Request
can't modify frozen Array
WEBrick/1.3.1 (Ruby/1.8.4/0) at localhost:3000
--
Charles Oliver Nutter @ headius.blogspot.com
JRuby Developer @ www.jruby.org
Application Architect @ www.ventera.com
--
Charles Oliver Nutter @ headius.blogspot.com
JRuby Developer @ www.jruby.org
Application Architect @ www.ventera.com
_______________________________________________ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel