summaryrefslogtreecommitdiff
path: root/test/net/http
AgeCommit message (Collapse)Author
2015-01-03* lib/net/http.rb: More descriptive error message when net/http failshsbt
to connect to a server. Patch by @xaviershay [fix GH-700] * test/net/http/test_http.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02* test/net/http/test_http.rb (_test_send_request__HEAD): Addedhsbt
failing test for send_request with HEAD method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23* lib/net/http/response.rb (Net::HTTPResponse): require one or morenaruse
spaces [Bug #10591]. by leriksen <leif.eriksen.au@gmail.com> https://github.com/ruby/ruby/pull/782 fix GH-782 NOTE: graph.facebook.com returns without SP Reason-Phrase. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-13test_https.rb: skip old OpenSSLnobu
* test/net/http/test_https.rb (TestNetHTTPS): also depends on test/openssl/utils.rb git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-09* test/net/http/test_https.rbusa
(TestNetHTTPS#test_certificate_verify_failure): on Windows, Errno::ECONNRESET will be raised when the verify is failure at the client side, and it'll be eaten by WEBrick. * test/open-uri/test_ssl.rb (TestOpenURISSL#test_validation_failure): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-26add test for r48563naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13* test/lib/envutil.rb: Moved from test/ruby/.akr
* test/lib/find_executable.rb: Ditto. * test/lib/memory_status.rb: Ditto. * test/lib/test/unit.rb: require envutil. * test/: Don't require envutil in test files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-11* test/net/http/test_https_proxy.rb: Use assert_join_threads.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09* test/webrick: Store log in an array.akr
* test/net/http: Ditto. * test/open-uri: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09* test/net/http: Examine webrick log.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-08* test/net/http/utils.rb: Don't connect to spawned serverakr
before actual test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-05* lib/net/http/generic_request.rb (Net::HTTP::GenericRequest#exec):naruse
handle req['host'] in update_uri. * lib/net/http/generic_request.rb (Net::HTTP::GenericRequest#update_uri): use req['host'] if it is explicitly set. Even if URI is given, it is already used for the initial value of req['host']. Therefore overwritten value should be respected. [Bug #10054] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-05suppress warningsnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-31Join threads.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-30Close FDs.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-30* lib/webrick/server.rb: Use a pipe to detect server shutdown.akr
shutdown() or close() for listening socket is not a reliable. Actually, both doesn't work (doesn't wake up select()) on DragonFly BSD 3.6.2. * test/webrick/utils.rb: :ShutdownSocketWithoutClose is not required now to immediate server shutdown detection. This fixes fd leaks. * test/net/http/utils.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-26test_http.rb: fix leaked threadsnobu
* test/net/http/test_http.rb (test_timeout_during_HTTP_session): join work threads not to leak threads. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-19* test/net/http/utils.rb (spawn_server): Specify zero for port toakr
avoid reusing an allocated port. * test/net/http/test_http.rb: Don't specify port here. * test/net/http/test_https.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-07Increase open_timeout [Bug #8986]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-01* test/net/http/test_http.rb (test_bind_to_local_port): Choose an openakr
port more reliably. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-10* test/net/http/test_http.rb (TestNetHTTP_v1_2#test_get,usa
TestNetHTTP_v1_2_chunked#test_get): shoudn't check HttpResponse#decode_content if Zlib is not available. ko1 complained via IRC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-20* test/csv/test_features.rb, test/logger/test_logger.rbakr
test/mkmf/test_have_macro.rb, test/net/http/test_http.rb, test/openssl/test_config.rb, test/psych/test_encoding.rb, test/psych/test_exception.rb, test/psych/test_psych.rb, test/psych/test_tainted.rb, test/readline/test_readline.rb, test/rexml/test_contrib.rb, test/ruby/test_autoload.rb, test/ruby/test_beginendblock.rb, test/ruby/test_exception.rb, test/ruby/test_file.rb, test/ruby/test_io.rb, test/ruby/test_marshal.rb, test/ruby/test_process.rb, test/ruby/test_require.rb, test/ruby/test_rubyoptions.rb, test/syslog/test_syslog_logger.rb, test/webrick/test_httpauth.rb, test/zlib/test_zlib.rb: Use Tempfile.create. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-24* lib/net/http.rb: Removed duplicate Accept-Encoding in Net::HTTP#get.drbrain
[ruby-trunk - Bug #7924] * test/net/http/test_http.rb: Test for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-14* lib/net/http.rb: Removed OpenSSL dependency from Net::HTTP.drbrain
* test/net/http/test_http.rb: Remove Zlib dependency from tests. * test/net/http/test_http_request.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-14* lib/net/http: Do not handle Content-Encoding when the user setsdrbrain
Accept-Encoding. This allows users to handle Content-Encoding for themselves. This restores backwards-compatibility with Ruby 1.x. * lib/net/http/generic_request.rb: ditto. * lib/net/http/response.rb: ditto * test/net/http/test_http.rb: Test for the above. * test/net/http/test_http_request.rb: ditto. * test/net/http/test_httpresponse.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-05Suppress warningsnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-23* lib/net/http/generic_request.rb (Net::HTTPGenericRequest):naruse
set content-length to zero on empty post requests by Gregory Ostermayr <gregory.ostermayr@gmail.com> https://github.com/ruby/ruby/pull/201 fix GH-201 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 * lib/net/http.rb: Requests may be created with a URI which sets thedrbrain
Host header. Responses contain the requested URI for easier redirect following. [ruby-trunk - Feature #6482] * lib/net/http/generic_request.rb: ditto. * lib/net/http/response.rb: ditto.j * NEWS (net/http): Updated for above. * test/net/http/test_http.rb: Tests for above. * test/net/http/test_http.rb: ditto. * test/net/http/test_httpresponse.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-06* ruby.c (load_file_internal): set default source encoding asnaruse
UTF-8 instead of US-ASCII. [ruby-core:46021] [Feature #6679] * parse.y (parser_initialize): set default parser encoding as UTF-8 instead of US-ASCII. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-29test_http.rb: clear environment variablesshirosaki
* test/net/http/test_http.rb (TestNetHTTP#test_proxy_address): clear environment variables. If http_proxy environment variable was set, the test failed. * test/net/http/test_http.rb (TestNetHTTP#test_proxy_port): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-01* lib/webrick/ssl.rb (WEBrick::Config::SSL): add new keynaruse
SSLTmpDhCallback to set SSLContext#tmp_dh_calback. * lib/webrick/ssl.rb (WEBrick::GenericServer#setup_ssl_context): follow above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-01Use 0 as port like #6766 [Bug #6959]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-10Refix r36678: switch with zlib and check content-encoding.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-10Suppress warnings: Net::HTTPResponse#header is obsoletenaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-10Run automatic deflate decoding only if it has zlib.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-26* test/net/http/test_https.rb (TestNetHTTPS#test_session_reuse): localhost ↵shyouhei
is not (always) 127.0.0.1. Don't expect that. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-25* lib/net/http.rb: Added SSL session reuse across connections for adrbrain
single instance to speed up connection. [Feature #5341] * NEWS: ditto * test/net/http/test_https.rb: Tests for #5341 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-21Use 0 for webrick's port and get the actual port. [Bug #6766]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-21* lib/net/http.rb (Net::HTTP.newobj): return back for compatibility.naruse
* lib/net/http.rb (Net::HTTP.new): set default_port if proxy port is not given. * lib/net/http.rb (Net::HTTP#initialize): ditto. * lib/net/http.rb (Net::HTTP#proxy?): return true or false. * lib/net/http.rb (Net::HTTP#proxy_address): check proxy_uri is not nil. * lib/net/http.rb (Net::HTTP#proxy_port): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-20* lib/net/http.rb: Net::HTTP now automatically detects and usesdrbrain
proxies from the environment. A proxy may also be specified as before. Net::HTTP::Proxy still creates anonymous classes, but these classes are only used to store configuration information. When an HTTP instance is created the configuration is now copied. Additionally, Net::HTTP::ProxyDelta is no longer used by Net::HTTP [Feature #6546] * lib/open-uri.rb: Moved URI::Generic#find_proxy to uri/generic. * lib/uri/generic.rb: Imported find_proxy from open-uri. * test/open-uri/test_open-uri.rb: Moved proxy-discovery tests to URI. * test/uri/test_generic.rb: Imported proxy-discovery tests from open-uri. * test/net/http/test_http.rb: Added tests for proxy behavior. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-19* lib/net/http/response.rb: Automatically inflate gzip anddrbrain
deflate-encoded response bodies. [Feature #6942] * lib/net/http/generic_request.rb: Automatically accept gzip and deflate content-encoding for requests. [Feature #6494] * lib/net/http/request.rb: Updated documentation for #6494. * lib/net/http.rb: Updated documentation for #6492 and #6494, removed Content-Encoding handling now present in Net::HTTPResponse. * test/net/http/test_httpresponse.rb: Tests for #6492 * test/net/http/test_http_request.rb: Tests for #6494 * test/open-uri/test_open-uri.rb (test_content_encoding): Updated test for automatic content-encoding handling. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-19* test/net/http/test_http.rb (TestNetHTTPLocalBind#test_bind_to_local*):usa
re-enable the tests because now it's OK on windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-18use localhost for both local and remote. [Bug #6746]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-17Support IPv6 address. [Bug #6746]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-12* test/net/http/test_http.rb (TestNetHTTPLocalBind#test_bind_to_local*):usa
cannot cross between network interfaces on Windows, so skip this test until we find better test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-12Use IPv4 address on connecting to 127.0.0.1.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-11* lib/net/http.rb (Net::HTTP#connect): use local_host and local_portnaruse
if specified. patched by Ricardo Amorim [Feature #6617] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-05* test/net/http/test_httpresponses.rb: Add a test file forknu
Net::HTTPResponses and put a test case for the previous bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-23* lib/net/http/header.rb (Net::HTTPHeader#range): fix broken parser ofnaruse
HTTP Range request. Old one can't parse invalid specs and multiple specs correctly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-30* test/net/http/test_https.rb: update test for r35494ayumin
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e