# Httpclient 2.1.3-RC

**URL:** <https://www.ruby-forum.com/t/httpclient-2-1-3-rc/155739>\
**Category:** Ruby\
**Created:** [December 16, 2008, 8:29am UTC](https://www.ruby-forum.com/t/httpclient-2-1-3-rc/155739 "2008-12-16T08:29:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![NAKAMURAS\_Hiroshi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f1d935/32.png) [@NAKAMURAS\_Hiroshi](https://www.ruby-forum.com/u/NAKAMURAS_Hiroshi)\
**Post date:** [December 16, 2008, 8:29am UTC](https://www.ruby-forum.com/t/httpclient-2-1-3-rc/155739/1 "2008-12-16T08:29:42Z")

</div>

Hi all,

I’m working on releasing httpclient/2.1.3. ‘httpclient’ gives  
something like the functionality of libwww-perl (LWP) in Ruby.  
‘httpclient’ formerly known as ‘http-access2’. See  
[http://dev.ctor.org/httpclient/](http://dev.ctor.org/httpclient/) for more detail.

httpclient / http-access2 users, would you please test the RC with  
your application and let me know if you have any problem? 2.1.3 will  
be released in a few week.

Sorry for [ANN] noise.

Regards,  
// NaHi

= Changes in 2.1.3 =

- Features

- Changes

- Bug fixes

---

<div class="post-metadata">

**Author:** ![NAKAMURAS\_Hiroshi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f1d935/32.png) [@NAKAMURAS\_Hiroshi](https://www.ruby-forum.com/u/NAKAMURAS_Hiroshi)\
**Post date:** [December 17, 2008, 4:01am UTC](https://www.ruby-forum.com/t/httpclient-2-1-3-rc/155739/2 "2008-12-17T04:01:31Z")

</div>

Hi again,

2008/12/16 NAKAMURA, Hiroshi [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> I’m working on releasing httpclient/2.1.3. ‘httpclient’ gives

> - performance improvements. as fast as RFuzz::HttpClient,  
> eventmachine and curb for keep-alive sites, and as fast as net/http  
> for non keep-alive sites.

I’m doing a little benchmark testing. Let me know if you are  
interested and know something about it.

Environment:  
HTTP Server:  
Apache/2.2.9 (Ubuntu) mpm-worker  
Ubuntu 8.10 32bit

HTTP Client:  
Ruby: ruby 1.8.7 (2008-12-04 revision 20478) [i686-linux]  
vendor:  
eventmachine/0.12.2(_)  
rfuzz/0.9  
net/http (svn ruby\_1\_8)  
httpclient/2.1.3-RC  
open-uri (svn ruby\_1\_8) (net/http wrapper)  
httparty/0.2.2 (net/http wrapper)  
(_) EM::Protocols::HttpClient2 is not listed below because it does  
not work when requests \> 20 on my env.

HTTP Server and HTTP clients runs on the same host.

Benchmark suite:  
[http://dev.ctor.org/http-access2/browser/trunk/bench/bm.rb](http://dev.ctor.org/http-access2/browser/trunk/bench/bm.rb)  
proxy = nil  
url = [http://127.0.0.1/](http://127.0.0.1/)  
threads = 2  
requests = 250

Result:  
HTTP Server KeeyAlive: Off  
user system total real  
curb 0.050000 0.420000 0.470000 ( 0.807049)  
RFuzz::HttpClient 0.090000 0.430000 0.520000 ( 0.803075)  
Net::HTTP 0.280000 0.520000 0.800000 ( 1.147281)  
HTTPClient 0.140000 0.800000 0.940000 ( 1.299928)  
open-uri 0.420000 0.880000 1.300000 ( 1.675272)  
HTTParty 0.490000 0.620000 1.110000 ( 1.483024)

HTTP Server KeeyAlive: On  
user system total real  
curb 0.100000 0.460000 0.560000 ( 51.170485)  
RFuzz::HttpClient 0.030000 0.580000 0.610000 ( 1.001198)  
Net::HTTP 0.150000 0.490000 0.640000 ( 0.842344)  
HTTPClient 0.140000 0.460000 0.600000 ( 0.801035)  
open-uri 0.740000 0.740000 1.480000 ( 1.870712)  
HTTParty 0.710000 0.880000 1.590000 ( 2.555711)

Considerations:

1. EM::Protocols::HttpClient2 does not work on my env. Is the  
client code right?
2. curb needs too much ‘real’ time when connecting to KeepAlive: On  
site. Is this expected?
3. rfuzz and curb are faster than net/http and httpclient when  
connecting to KeepAlive: Off site.
4. net/http and httpclient run almost as fast as rfuzz when  
connecting to KeepAlive: On site. Bear in mind that you need to call  
Net::HTTP#start and #finish by yourself for keep-alive handling. Just  
calling Net::HTTP#get takes 2 times longer than others. Bothersome?  
Use others.

At the last, does somebody know how I can read  
[http://apocryph.org/more\_indepth\_analysis\_ruby\_http\_client\_performance](http://apocryph.org/more_indepth_analysis_ruby_http_client_performance)  
? I get ‘Error establishing a database connection’.

Regards,  
// NaHi

---

<div class="post-metadata">

**Author:** ![NAKAMURAS\_Hiroshi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f1d935/32.png) [@NAKAMURAS\_Hiroshi](https://www.ruby-forum.com/u/NAKAMURAS_Hiroshi)\
**Post date:** [December 29, 2008, 4:50pm UTC](https://www.ruby-forum.com/t/httpclient-2-1-3-rc/155739/3 "2008-12-29T16:50:52Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Hi all,

I posted httpclient/2.1.3. This release includes performance  
improvements and full RDoc documentation. (See below for more detail)

‘httpclient’ gives something like the functionality of libwww-perl (LWP)  
in Ruby. ‘httpclient’ formerly known as ‘http-access2’.

Features:

- methods like GET/HEAD/POST/\* via HTTP/1.1.

- HTTPS(SSL), Cookies, proxy, authentication(Digest, NTLM, Basic), etc.

- asynchronous HTTP request, streaming HTTP request.

- by contrast with net/http in standard distribution;

- Not supported now

For more detail, see API document at [http://dev.ctor.org/doc/httpclient/](http://dev.ctor.org/doc/httpclient/)

Changes in 2.1.3:

- Features

- Changes

- Bug fixes

Download:  
[http://dev.ctor.org/download/httpclient-2.1.3.tar.gz](http://dev.ctor.org/download/httpclient-2.1.3.tar.gz)  
[http://dev.ctor.org/download/httpclient-2.1.3.zip](http://dev.ctor.org/download/httpclient-2.1.3.zip)

sha1sum:  
fd1a755927822573c67806626ffdc9077ae15322 httpclient-2.1.3.tar.gz  
f7733c7ec32a951a62d5bb7aa2c4ab876b405002 httpclient-2.1.3.zip

gem repository:  
‘httpclient’ at [http://dev.ctor.org/download/](http://dev.ctor.org/download/)

Regards,  
// NaHi

-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.9 (Cygwin)

iQEcBAEBAgAGBQJJWPGMAAoJEKYDTjohNqG5x/8H/23Y/SAhPYkBLW6N+a2V2rh6  
3HVw3zms/wzjAySMBcRFgIa+MbTLsDg0/5PWO3uZPMuNCxjMEihVUpqmR1DkjRJD  
Eg4Upr23R4caCDd7oKvd5WKpygif5XDZwGAZMSFln3zko9s7IjerRNkb+XAZWZyH  
Swd059aItpHyXszOY1KAWBFiRIr0Y6wzrzxOG7d2ial/BwydScjLE3gTMKcdxDg2  
xBeII+rxga+iPecg0ino9o0QibWA1DoFa4IAC7Wy3N8o3VcrNkHZT43Gn4dZacpQ  
Hezl0vy9Kdl9YV0nm4dJo0ldKNdF9stl9p4xySpCYP+1U+8lCQNmicl1POQTRLk=  
=BAOX  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![NAKAMURAS\_Hiroshi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f1d935/32.png) [@NAKAMURAS\_Hiroshi](https://www.ruby-forum.com/u/NAKAMURAS_Hiroshi)\
**Post date:** [January 8, 2009, 2:23pm UTC](https://www.ruby-forum.com/t/httpclient-2-1-3-rc/155739/4 "2009-01-08T14:23:01Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Hi all,

I posted httpclient/2.1.3.1. httpclient/2.1.3.1 fixes a vulnerability  
introduced at 2.1.3. httpclient \<= 2.1.2 and http-access2 are safe.

get\_content/post\_content of httpclient/2.1.3 may send secure cookies for  
a https site to non-secure (non-https) site when the https site  
redirects the request to a non-https site. httpclient/2.1.3 caches  
request object and reuses it for redirection. It should not be cached  
and recreated for each time as httpclient \<= 2.1.2 and http-access2. See  
[http://dev.ctor.org/http-access2/changeset/259#file2](http://dev.ctor.org/http-access2/changeset/259#file2) for more detail.

I realized this bug when I was reading open-uri story on  
[ruby-core:21205]. Ruby users should use open-uri rather than using  
net/http directly wherever possible.

httpclient/2.1.3 users should update to 2.1.3.1.

‘httpclient’ gives something like the functionality of libwww-perl (LWP)  
in Ruby. ‘httpclient’ formerly known as ‘http-access2’.

Features:

- methods like GET/HEAD/POST/\* via HTTP/1.1.

- HTTPS(SSL), Cookies, proxy, authentication(Digest, NTLM, Basic), etc.

- asynchronous HTTP request, streaming HTTP request.

- by contrast with net/http in standard distribution;

- Not supported now

For more detail, see API document at [http://dev.ctor.org/doc/httpclient/](http://dev.ctor.org/doc/httpclient/)

Download:  
[http://dev.ctor.org/download/httpclient-2.1.3.1.tar.gz](http://dev.ctor.org/download/httpclient-2.1.3.1.tar.gz)  
[http://dev.ctor.org/download/httpclient-2.1.3.1.zip](http://dev.ctor.org/download/httpclient-2.1.3.1.zip)

sha1sum:  
eb2f562835106ec8925edae523cd471fb291e055 httpclient-2.1.3.1.tar.gz  
153d4d7ef5f79ffe90872a0f77fbad60e241e203 httpclient-2.1.3.1.zip

gem is available from official repository.

Regards,  
// NaHi

-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.9 (Cygwin)

iQEcBAEBAgAGBQJJZf3zAAoJEKYDTjohNqG5Bc0H/3L0IaK7F+Gkwrso53R5yED6  
21NM1fwPcFi6dtxgK/GOOKaUm5sO6I6+aGRkJuo1mbqZJN98wZl/83JlwsbpaOC6  
iPA4q2oSFuLXKwulRPBC7wJKoqOQZwgo9FD0yxM8aguzD8240eWpUU1NoKTyvnFZ  
8fodqcybj+FhW/dIdn+nltOGolxGKOGSHf7yaO2Do8VW5YkFe4vYfIpH2RfH1h8y  
ZzDZLSgP6MEyWwQKDY+UqqxDRmgTh5Uw+6K50y5UpHldZr2QK9U8ZPBnvJ8tljp4  
0uyM8cxlOzQq8ddmvV3S8sVBbwW19guLeD26upbU8Az4o8P71gJx9eL1GJUzSRY=  
=zNni  
-----END PGP SIGNATURE-----
