In the future, we should try to detect 'Content-Encoding' HTTP header and handle body encoding properly like open-uri.rb.
The former test depends on threads execution order so it didn't work as expected when I increased client threads or let it run on JRuby. Inserted step-by-step assertions.
This reverts commit bc6a1b1. Conflicts: lib/httpclient.rb lib/httpclient/session.rb
…st and local_port" This reverts commit e464596. Conflicts: lib/httpclient.rb lib/httpclient/session.rb Setting fixed local_host and local_port does not work well with current SessionManager implementation...
…pAliveDisconnected exception. closes #30. I know the original intent of #30 is 'create a new (non cached) session when we got a KeepAliveDisconnected' but the suggested fix could create too much session to the same site I guess... So at this time, I decided to invalidate all sessions to the same site. It must include live sessions (not expired) but it should not cause performance degrade in the situation such as we got KeepAliveDisconnected.
Conflicts: lib/httpclient.rb lib/httpclient/session.rb
…rom the pool. Fix bug http://github.com/nahi/httpclient/issues/issue/29 . closes #29. Signed-off-by: Hiroshi Nakamura <email@example.com>
…Ruby are already doing the same optimization.
qup and algorithm is not required to be quoted. RFC2617 includes an example 'qop="auth,auth-int"' though...
… the request finished with an Exception.
…tion. closes #43.
Applied a patch from Teshootub7. With setting HTTPClient#transparent_gzip_decompression = true, HTTPClient tries to do gzip/deflate content transmission. Following explanation is by Teshootub7. All you need to use "transparent gzip decompression" is done by: clnt.transparent_gzip_decompression = true Then you can retrieve a document as usual. res = clnt.get("http://www.debian.org/") The document is transferred with gzip compressed. res.header["Content-Encoding"] => ["gzip"] res.header["Content-Length"] => ["4422"] res.content.length => 13942 And you can read the content without knowing it is compressed or not.
Thanks tai for reporting this.
Signed-off-by: Hiroshi Nakamura <firstname.lastname@example.org>
…uth] Signed-off-by: Hiroshi Nakamura <email@example.com>
JRuby may raise IOError instead of ECONNRESET. Catch this for KeepAliveDisconnected detection.