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

7 commits

Author SHA1 Message Date
gotoyuzo
9a012539ba * lib/webrick/config.rb (WEBrick::Config::HTTP): add new parameters,
:InputBufferSize and :OutputBufferSize.

* lib/webrick/utils.rb (WEBrick::Utils.timeout): add new timeout
  method. this implementation is expected to be compatible with
  timeout.rb and faster than timeout.rb.

* lib/webrick/httprequest.rb (WEBrick::HTTPRequest#_read_data):
  Timeout.timeout is replaced by WEBrick::Utils.timeout.

* lib/webrick/httprequest.rb: WEBrick::HTTPRequest::BUFSIZE is
  replaced by config[:InputBufferSize].

* lib/webrick/httpresposne.rb: WEBrick::HTTPResponse::BUFSIZE is
  replaced by config[:OutputBufferSize].

* lib/webrick/server.rb: get rid of unnecessary require.

* test/webrick/test_utils.rb: test for WEBrick::Utils.timeout.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-05-18 13:42:52 +00:00
gotoyuzo
b8f68de2be * lib/webrick/httpresponse.rb (WEBrick::HTTPResponse#send_body_io):
ensure to close @body. (http://bugs.debian.org/277520)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-21 10:10:52 +00:00
gotoyuzo
385edf1e5c * lib/webrick/config.rb:
add 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/trunk@7033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-12 12:26:39 +00:00
gotoyuzo
4a663be97e * lib/webrick/cgi.rb (CGI): add support for mod_ruby.
* lib/webrick/cgi.rb (CGI::Socket): add check for existence of
  OpenSSL module in all HTTPS related methods.

* lib/webrick/cgi.rb (CGI::Socket#cipher): should create similar
  value to OpenSSL::SSLSocket#cipher.

* lib/webrick/httpresponse.rb (HTTPResponse#setup_header): should
  set "connection: close" if @keep_alive is false.

* lib/webrick/https.rb (HTTPrequest#meta_vars): add supprt for
  SSL_PROTOCOL, SSL_CIPHER_USEKEYSIZE and SSL_CIPHER_ALGKEYSIZE.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-22 21:13:06 +00:00
gotoyuzo
8e1714488a * lib/webrick/server.rb (GenericServer#start): should rescue
Exception to avoid unexpected aborting. [ruby-core:01853]

* lib/webrick/server.rb (GenericServer#start_thread): should check
  that peeraddr isn't nil before printing.

* lib/webrick/httpresponse.rb (HTTPResponse#start_thread): should
  rescue Exception to avoid unexpected aborting of thread.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-04 00:12:14 +00:00
gotoyuzo
3d0d2d5ff1 * lib/webrick/httpresponse.rb: add HTTPResponse#keep_alive=.
* lib/webrick/httpserver.rb (HTTPServer#run): should pass the
  request's keep_alive flag to the response.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-25 16:02:45 +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