From d82950f40061791e2be4d08c96aa3dc77ded9a4d Mon Sep 17 00:00:00 2001 From: gotoyuzo Date: Mon, 26 Jan 2004 17:31:53 +0000 Subject: [PATCH] * lib/webrick/httputils.rb (WEBrick:HTTPUtils::parse_header): refine regex for header-name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ lib/webrick/httputils.rb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e86c494236..13ef040d10 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Jan 27 02:26:31 2004 GOTOU Yuuzou + + * lib/webrick/httputils.rb (WEBrick:HTTPUtils::parse_header): + refine regex for header-name. + Mon Jan 26 22:53:04 2004 Dave Thomas * io.c: Remove documentation references to $defout. diff --git a/lib/webrick/httputils.rb b/lib/webrick/httputils.rb index 78780c4976..16d3c4d56b 100644 --- a/lib/webrick/httputils.rb +++ b/lib/webrick/httputils.rb @@ -129,7 +129,7 @@ module WEBrick field = nil raw.each{|line| case line - when /^([A-Za-z0-9_\-]+):\s*(.*?)\s*\z/om + when /^([A-Za-z0-9!\#$%&'*+\-.^_`|~]+):\s*(.*?)\s*\z/om field, value = $1, $2 field.downcase! header[field] = [] unless header.has_key?(field)