[ruby-cvs:73084] mame:r65984 (trunk): lib/webrick: explicitly convert header values to a string

mame at ruby-lang.org mame at ruby-lang.org
Mon Nov 26 14:29:45 JST 2018


mame	2018-11-26 14:29:45 +0900 (Mon, 26 Nov 2018)

  New Revision: 65984

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65984

  Log:
    lib/webrick: explicitly convert header values to a string
    
    The values of @header are expected to be all strings;
    WEBrick::HTTPResponse::[]=(key, val) explicitly converts the second
    argument to a string and assigns it to @header hash.
    However, there were some points in WEBrick internal code that assigns
    non-String to @header.  This change fixes the issues.
    
    The values are checked by `header_value =~ /\r\n/` in check_header.
    The type confusion caused conflict with removal of `Object#=~`
    [Feature #15231].

  Modified files:
    trunk/lib/webrick/httpresponse.rb
    trunk/lib/webrick/httpservlet/filehandler.rb


More information about the ruby-cvs mailing list