1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

12 commits

Author SHA1 Message Date
naruse
2e470cbf4c * lib/webrick/httputils.rb (parse_form_data): escape boundary of
multipart/form-data when embed in regexp.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@23716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-16 22:46:45 +00:00
nobu
fa46c2d929 * lib/webrick/httputils.rb (WEBrick::HTTPUtils#split_header_value):
reduce backtrack.  based on a fix by Christian Neukirchen
  <chneukirchen AT gmail.com>.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@18220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-25 14:35:21 +00:00
gotoyuzo
d8322d404f * lib/webrick/httputils.rb (WEBrick::HTTPUtils.parse_query): should
discard if key=val pair is empty. patch from Gary Wright.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-25 08:16:16 +00:00
gotoyuzo
6b957b3ff5 * lib/webrick/cgi.rb: new methods WEBrick::CGI#[], WEBrick::CGI#logger
and WEBrick::CGI#config. (backported from HEAD)

* lib/webrick/httputils.rb (WEBrick::HTTPUtils.escape_path): should
  not use String#split("/"). (backported from HEAD)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-11 07:22:19 +00:00
gotoyuzo
fb18f0d973 * lib/webrick/ssl.rb (WEBrick::Config::SSL): the default value
of :SSLEnable is false.

* lib/webrick/server.rb (WEBrick::Daemon.start): prepared stdio
  don't allow changing its mode.

* lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#proxy_service):
  should delete trailing LF from the result of pack("m*").

* lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#proxy_connect):
  - should delete trailing LF from the result of pack("m*").
  - clear Request-Line not to send the response by HTTPServer#run.

* lib/webrick/httputils (WEBrick::HTTPUtils.parse_qvalues):
  refine regexp (and change the name of a local variable).

* lib/webrick/httputils.rb (WEBrick::HTTPUtils#escape_path): add
  new method to escape URI path component.

* lib/webrick/cgi.rb (WEBrick::CGI::Socket#request_line): should
  escape SCRIPT_NAME and PATH_INFO before being parsed as a URI.

* test/webrick/*, sample/webrick/httpproxy.rb: add new file.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-18 06:03:43 +00:00
gotoyuzo
a79c87e333 * lib/webrick/config.rb (WEBrick::Config::General): add default values:
- WEBrick::Config[:DoNotReverseLookup]
  - WEBrick::Config[:RequestCallback] (it used as an alias of
    :RequestHandler in WEBrick::HTTPServer#run)
  - WEBrick::Config::FileHandler[:AcceptableLanguages]

* lib/webrick/httpservlet/filehandler.rb
  (WEBrick::HTTPServlet::FileHandler#set_filename): search files
  having suffix of language-name which Accept-Language header field
  includes if :AcceptableLanguages options is present.

* lib/webrick/httpservlet/filehandler.rb
  (WEBrick::HTTPServlet::FileHandler#get_servlet): new method to
  search servlet correspond to the suffix of filename.

* lib/webrick/httprequest.rb: add attributes access methods: accept,
  accept_charset, accept_encoding, accept_language, content_length
  and content_type.

* lib/webrick/httpresponse.rb: add attribute access methods:
  content_length, content_length=, content_type and content_type=.

* lib/webrick/httputils.rb (WEBrick::HTTPUtils.mime_types):
  use the second suffix to detect media type. (the first suffix
  may be a language name.)

* lib/webrick/httputils.rb (WEBrick::HTTPUtils.parse_qvalues):
  add method to parse Accept header field. it returns an Array of
  values sorted by the qvalues.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-17 17:13:04 +00:00
gotoyuzo
747ca59f52 * lib/webrick/httputils.rb (WEBrick::HTTPUtils.parse_range_header):
fix regex for range-spec.

* lib/webrick/httpservlet/filehandler.rb
  (WEBrick::HTTPServlet::DefaultFileHandler#make_partial_content):
  multipart/byteranges response was broken.

* lib/webrick/httpservlet/erbhandler.rb
  (WEBrick::HTTPServlet::ERBHandler#do_GET): should select media type
  by suffix of script filename.

* lib/xmlrpc/server.rb: refine example code.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-13 04:24:16 +00:00
gotoyuzo
330498d82d * lib/webrick/httputils.rb (WEBrick::HTTPUtils.escape): should
escape space.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-26 02:50:18 +00:00
gotoyuzo
317525387e * lib/webrick/httputils.rb (WEBrick:HTTPUtils::parse_header):
refine regex for header-name.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-26 17:31:53 +00:00
gotoyuzo
f75aff0139 * lib/webrick/httputils.rb (parse_form_data): should return an
empty Hash if the body is empty.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-18 19:08:11 +00:00
gotoyuzo
4eb4064085 * lib/webrick/httputils.rb (FormData#list): should not take
a side effect for the receiver.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-07 18:24:27 +00:00
gotoyuzo
01eba908ad * lib/webrick: imported.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-23 16:51:36 +00:00