* lib/webrick/httputils.rb (WEBrick::HTTPUtils::FormData::<<):
HTTPUtils::parse_header() takes a string. [ruby-dev:29931] * lib/webrick/httputils.rb (WEBrick::HTTPUtils::parse_header): String does no longer have each method. * lib/webrick/httputils.rb (WEBrick::HTTPUtils::parse_form_data): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
38093bc129
commit
b326623cef
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
|||||||
|
Sat Dec 2 07:33:53 2006 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
||||||
|
|
||||||
|
* lib/webrick/httputils.rb (WEBrick::HTTPUtils::FormData::<<):
|
||||||
|
HTTPUtils::parse_header() takes a string. [ruby-dev:29931]
|
||||||
|
|
||||||
|
* lib/webrick/httputils.rb (WEBrick::HTTPUtils::parse_header):
|
||||||
|
String does no longer have each method.
|
||||||
|
|
||||||
|
* lib/webrick/httputils.rb (WEBrick::HTTPUtils::parse_form_data):
|
||||||
|
ditto.
|
||||||
|
|
||||||
Sat Dec 2 07:09:04 2006 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
Sat Dec 2 07:09:04 2006 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
||||||
|
|
||||||
* ext/openssl/ossl_ocsp.c: OpenSSL::OCSP::OSCPError should be
|
* ext/openssl/ossl_ocsp.c: OpenSSL::OCSP::OSCPError should be
|
||||||
|
@ -127,7 +127,7 @@ module WEBrick
|
|||||||
def parse_header(raw)
|
def parse_header(raw)
|
||||||
header = Hash.new([].freeze)
|
header = Hash.new([].freeze)
|
||||||
field = nil
|
field = nil
|
||||||
raw.lines.each{|line|
|
raw.each_line{|line|
|
||||||
case 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, value = $1, $2
|
||||||
@ -244,7 +244,7 @@ module WEBrick
|
|||||||
if @header
|
if @header
|
||||||
super
|
super
|
||||||
elsif str == CRLF
|
elsif str == CRLF
|
||||||
@header = HTTPUtils::parse_header(@raw_header)
|
@header = HTTPUtils::parse_header(@raw_header.join)
|
||||||
if cd = self['content-disposition']
|
if cd = self['content-disposition']
|
||||||
if /\s+name="(.*?)"/ =~ cd then @name = $1 end
|
if /\s+name="(.*?)"/ =~ cd then @name = $1 end
|
||||||
if /\s+filename="(.*?)"/ =~ cd then @filename = $1 end
|
if /\s+filename="(.*?)"/ =~ cd then @filename = $1 end
|
||||||
@ -317,7 +317,7 @@ module WEBrick
|
|||||||
form_data = Hash.new
|
form_data = Hash.new
|
||||||
return form_data unless io
|
return form_data unless io
|
||||||
data = nil
|
data = nil
|
||||||
io.each{|line|
|
io.each_line{|line|
|
||||||
if boundary_regexp =~ line
|
if boundary_regexp =~ line
|
||||||
if data
|
if data
|
||||||
data.chop!
|
data.chop!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user