[ANN] http.rb 0.8.0: a fast, streaming HTTP library with a chainable API

http.rb is an HTTP client library which exposes an easy-to-use chainable
API for constructing HTTP requests:

To install it:

    gem install http

To use it:

    require 'http'
    HTTP.get("https://www.google.com").to_s

It's that easy!

his library implements the HTTP protocol from-scratch without any
dependencies on Ruby's Net::HTTP. It uses the http_parser.rb library, a
native extension containing the Node.js parser for CRubies and a Java port
thereof for JRuby.

The entire library has been written from the ground up to support
end-to-end streaming.

The API is inspired in part by the Requests library from Python:
http://docs.python-requests.org/

···

---------- Forwarded message ----------
From: *Alexey Zapparov* <zapparov@gmail.com>
Date: Wednesday, April 1, 2015
Subject: [ANN] http.rb 0.8.0: a fast, streaming HTTP library with a
chainable API
To: httprb@googlegroups.com

--

Full change log below:

* Properly handle WaitWritable for SSL. See #199. (@zanker)
* Add support for non-ASCII URis. See #197. (@ixti)
* Add configurable connection timeouts. See #187, #194, #195. (@zanker)
* Refactor requests redirect following logic. See #179. (@ixti)
* Support for persistent HTTP connections (@zanker)
* Add caching support. See #77 and #177. (@Asmod4n, @pezra)
* Improve servers used in specs boot up. Issue was initially raised up by
@olegkovalenko. See #176. (@ixti)
* Reflect FormData rename changes (FormData -> HTTP::FormData). (@ixti)
* HTTP::Headers now raises HTTP::InvalidHeaderNameError in case of
(surprise) invalid HTTP header field name (e.g."Foo:Bar"). See #173. (@ixti)

--
You received this message because you are subscribed to the Google Groups
"http.rb: a fast, easy-to-use Ruby HTTP client with a chainable API" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to httprb+unsubscribe@googlegroups.com
<javascript:_e(%7B%7D,'cvml','httprb%2Bunsubscribe@googlegroups.com');>.
For more options, visit https://groups.google.com/d/optout.

--
Tony Arcieri

tell me one more thing, because open-uri

open('http://www.sld.cu').read

do exactly the same thing

Thread name: "Fwd: [ANN] http.rb 0.8.0: a fast, streaming HTTP library with a chainable API"
Mail number: 1
In reply to: Tony Arcieri

···

Date: Wed, Apr 01, 2015

---------- Forwarded message ----------
From: *Alexey Zapparov* <zapparov@gmail.com>
Date: Wednesday, April 1, 2015
Subject: [ANN] http.rb 0.8.0: a fast, streaming HTTP library with a
chainable API
To: httprb@googlegroups.com

http.rb is an HTTP client library which exposes an easy-to-use chainable
API for constructing HTTP requests:
GitHub - httprb/http: HTTP (The Gem! a.k.a. http.rb) - a fast Ruby HTTP client with a chainable API, streaming support, and timeouts

To install it:

    gem install http

To use it:

    require 'http'
    HTTP.get("https://www.google.com").to_s

It's that easy!

his library implements the HTTP protocol from-scratch without any
dependencies on Ruby's Net::HTTP. It uses the http_parser.rb library, a
native extension containing the Node.js parser for CRubies and a Java port
thereof for JRuby.

The entire library has been written from the ground up to support
end-to-end streaming.

The API is inspired in part by the Requests library from Python:
http://docs.python-requests.org/

--

Full change log below:

* Properly handle WaitWritable for SSL. See #199. (@zanker)
* Add support for non-ASCII URis. See #197. (@ixti)
* Add configurable connection timeouts. See #187, #194, #195. (@zanker)
* Refactor requests redirect following logic. See #179. (@ixti)
* Support for persistent HTTP connections (@zanker)
* Add caching support. See #77 and #177. (@Asmod4n, @pezra)
* Improve servers used in specs boot up. Issue was initially raised up by
@olegkovalenko. See #176. (@ixti)
* Reflect FormData rename changes (FormData -> HTTP::FormData). (@ixti)
* HTTP::Headers now raises HTTP::InvalidHeaderNameError in case of
(surprise) invalid HTTP header field name (e.g."Foo:Bar"). See #173. (@ixti)

--
You received this message because you are subscribed to the Google Groups
"http.rb: a fast, easy-to-use Ruby HTTP client with a chainable API" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to httprb+unsubscribe@googlegroups.com
<javascript:_e(%7B%7D,'cvml','httprb%2Bunsubscribe@googlegroups.com');>.
For more options, visit https://groups.google.com/d/optout\.

--
Tony Arcieri

tell me one more thing, because open-uri

open('http://www.sld.cu').read

Except you just leaked a file descriptor. You probably want to do:

open('http://www.sld.cu') { |conn| conn.read }

do exactly the same thing

Hope you're not passing attacker-controlled data to that!

···

On Thu, Apr 2, 2015 at 9:50 AM, Lázaro Armando <lazaro@hcg.sld.cu> wrote:

--
Tony Arcieri

very insteresting :smiley: I did not know it, fortunely, I use in real work
a URI validation before

irb(main):379:0> open(URI '|touch n;\nhttp://url.com')
URI::InvalidURIError: bad URI(is not URI?): |touch n;\nhttp://url.com

Thread name: "Re: Fwd: [ANN] http.rb 0.8.0: a fast, streaming HTTP library with a chainable API"
Mail number: 3
In reply to: Tony Arcieri

···

Date: Thu, Apr 02, 2015

On Thu, Apr 2, 2015 at 9:50 AM, Lázaro Armando <lazaro@hcg.sld.cu> wrote:

> tell me one more thing, because open-uri
>
> open('http://www.sld.cu').read
>

Except you just leaked a file descriptor. You probably want to do:

open('http://www.sld.cu') { |conn| conn.read }

> do exactly the same thing
>

Hope you're not passing attacker-controlled data to that!

Using open-uri? Check your code - you're playing with fire!

--
Tony Arcieri