Commit Graph

22 Commits

Author SHA1 Message Date
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 a679f1861f * lib/webrick/httprequest.rb (HTTPRequest#meta_vars): refine regexp.
* lib/webrick/cgi.rb (CGI#start): NPH scripts return status line
  instead of Status: header field.

* lib/webrick/cgi.rb (CGI::Socket): refine some coditions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-20 13:01:33 +00:00
gotoyuzo 43920ad28c get rid of unusable condition
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-19 19:05:04 +00:00
gotoyuzo 1702e82e02 * lib/webrick/cgi.rb: add file. (yet another CGI library)
* MANIFEST: add lib/webrick/cgi.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-19 18:01:26 +00:00
gotoyuzo a4874e20ae * lib/webrick/httprequest.rb (meta_vers): should not set
HTTP_CONTENT_TYPE and HTTP_CONTENT_LENGTH.

* lib/webrick/https.rb (HTTPRequest#parse): should check presence
  of cert() method to detect SSLSocket.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-19 14:31:24 +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 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 d193b90d54 * lib/webrick/https.rb (HTTPRequest#parse): set @client_cert_chain.
* lib/webrick/https.rb (HTTPRequest#meta_vars): create
  SSL_CLIENT_CERT_CHAIN_n from @client_cert_chain.

* ext/openssl/ossl_ssl.c (ossl_ssl_get_peer_cert_chain): return nil
  if no cert-chain was given.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-04 23:48:13 +00:00
gotoyuzo a9da115662 * lib/webrick/ssl.rb: new option :SSLExtraChainCert.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-01 17:30:40 +00:00
gotoyuzo f493f61f73 * lib/webrick/server.rb (GenericServer#start): should rescue
IOError from IO::accept. [ruby-dev:21692]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-23 11:29:29 +00:00
gotoyuzo b2cf59aa1c * lib/webrick/utils.rb (Utils::su): use setgid and setuid to
set real and effective IDs. and setup group access list by
  initgroups.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-28 17:50:52 +00:00
gotoyuzo 9cdd5fcb62 * lib/webrick/httpservlet/cgihandler.rb: conform to mswin32.
[ruby-talk:82735], [ruby-talk:82748], [ruby-talk:82818]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-23 17:14:39 +00:00
gotoyuzo df7c89b442 * lib/webrick/log.rb (BasicLog#log): get rid of as ineffectual
condition.

* lib/webrick/log.rb (BasicLog#format): add "\n" to message.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-18 16:09:02 +00:00
gotoyuzo be28a6ffd8 meta_vars should be String.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-08 20:13:15 +00:00
gotoyuzo dba351e9c2 * lib/webrick/httpserver.rb (HTTPServer#access_log): add "\n" to
the message.

* lib/webrick/log.rb (BasicLog#log): add "\n" only if needed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-08 16:57:25 +00:00
gotoyuzo ddae426a47 * lib/webrick/accesslog.rb (AccessLog::setup_params): use req.port
instead of config[:Port] or req.request_uri.port.

* lib/webrick/httprequest.rb (HTTPRequest#meta_vars): ditto.

* lib/webrick/httpservlet/filehandler.rb (FileHandler#dir_list): ditto.

* lib/webrick/config.rb: :Listen option never be used.

* lib/webrick/server.rb (GenericServer#initialize): don't use :Listen
  option and add warning message.

* lib/webrick/log.rb (BasicLog#<<): shortcut of log(INFO, ...).

* lib/webrick/httpserver.rb (HTTPServer#accesslog): use << for logging.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-08 09:52:34 +00:00
gotoyuzo 65652ecdb5 * lib/webrick/ssl.rb: new file; SSL/TLS enhancement for GenericServer.
* lib/webrick/https.rb: SSLSocket handling is moved to webrick/ssl.rb.

* lib/webrick/compat.rb (File::fnmatch): remove old migration code.

* lib/webrick/httpserver.rb (HTTPServer#run): ditto.

* lib/webrick/server.rb (GenericServer#listen): the body of this
  method is pull out as Utils::create_lisnteners.

* lib/webrick/utils.rb (Utils::create_lisnteners): new method.

* lib/webrick/server.rb (GenericServer#start): should not
  through unknown errors. and refine comments.

* ext/openssl/lib/openssl/ssl.rb (SSLServer#accept): should close
  socket if SSLSocket raises error.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-19 06:00:36 +00:00
gotoyuzo 3d7147bcea * lib/webrick/https.rb (HTTPServer#run): should set syncing-mode
to SSLSocket.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-13 11:41:13 +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 086830cbac * lib/webrick/https.rb: change an option name.
:SSLCertStore -> :SSLCertificateStore.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-02 12:01:48 +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