Code Monkey home page Code Monkey logo

patron's Introduction

Patron

Build Status

Patron is a Ruby HTTP client library based on libcurl. It does not try to expose the full "power" (read complexity) of libcurl but instead tries to provide a sane API while taking advantage of libcurl under the hood.

Usage

First, you instantiate a Session object. You can set a few default options on the Session instance that will be used by all subsequent requests:

sess = Patron::Session.new
sess.timeout = 10
sess.base_url = "http://myserver.com:9900"
sess.headers['User-Agent'] = 'myapp/1.0'

You can set options with a hash in the constructor:

sess = Patron::Session.new({ :timeout => 10,
                             :base_url => 'http://myserver.com:9900',
                             :headers => {'User-Agent' => 'myapp/1.0'} } )

Or the set options in a block:

sess = Patron::Session.new do |patron|
    patron.timeout = 10
    patron.base_url = 'http://myserver.com:9900'
    patron.headers = {'User-Agent' => 'myapp/1.0'}
end

Output debug log:

sess.enable_debug "/tmp/patron.debug"

The Session is used to make HTTP requests.

resp = sess.get("/foo/bar")

Requests return a Response object:

if resp.status < 400
  puts resp.body
end

The GET, HEAD, PUT, POST and DELETE operations are all supported.

sess.put("/foo/baz", "some data")
sess.delete("/foo/baz")

You can ship custom headers with a single request:

sess.post("/foo/stuff", "some data", {"Content-Type" => "text/plain"})

Threading

By itself, the Patron::Session objects are not thread safe (each Session holds a single curl_state pointer from initialization to garbage collection). At this time, Patron has no support for curl_multi_* family of functions for doing concurrent requests. However, the actual code that interacts with libCURL does unlock the RVM GIL, so using multiple Session objects in different threads actually enables a high degree of parallelism. For sharing a resource of sessions between threads we recommend using the excellent connection_pool gem by Mike Perham.

patron_pool = ConnectionPool.new(size: 5, timeout: 5) { Patron::Session.new }
patron_pool.with do |session|
  session.get(...)
end

Sharing Session objects between requests will also allow you to benefit from persistent connections (connection reuse), see below.

Persistent connections

Patron follows the libCURL guidelines on connection reuse. If you create the Session object once and use it for multiple requests, the same libCURL handle is going to be used across these requests and if requests go to the same hostname/port/protocol the connection should get reused.

Performance with parallel requests

When performing the libCURL request, Patron goes out of it's way to unlock the GVL (global VM lock) to allow other threads to be scheduled in parallel. The GVL is going to be released when the libCURL request starts, and will then be shortly re-acquired to provide the progress callback - if the callback has been configured, and then released again until the libCURL request has been performed and the response has been read in full. This allows one to execute multiple libCURL requests in parallel, as well as perform other activities on other MRI threads that are currently active in the process.

Requirements

Patron 1.0 and up requires MRI Ruby 2.3 or newer. The 0.x versions support Ruby 1.9.3 and these versions get tagged and developed on the v0.x branch.

A recent version of libCURL is required. We recommend at least 7.19.4 because it supports limiting the protocols, and that is very important for security - especially if you follow redirects.

On OSX the provided libcurl is sufficient if you are not using fork+SSL combination (see below). You will have to install the libcurl development packages on Debian or Ubuntu. Other Linux systems are probably similar. For Windows we do not have an established build instruction at the moment, unfortunately.

Forking webservers on macOS and SSL

Currently, an issue is at play with OSX builds of curl which use Apple's SecureTransport. Such builds (which Patron is linking to), are causing segfaults when performing HTTPS requests in forked subprocesses. If you need to check whether your system is affected, run the Patron test suite by performing

$ bundle install && bundle exec rspec

in the Patron install directory. Most default curl configurations on OSX (both the Apple-shipped version and the version available via Homebrew) are linked to SecureTransport and are likely to be affected. This issue may also manifest in forking webserver implementations (such as Unicorn or Passenger) and in forking job execution engines (such as resque), so even though you may not be using fork() directly your server engine might be doing it for you.

To circumvent the issue, you need to build curl with OpenSSL via homebrew. When doing so, curl will use openssl as it's SSL driver. You also need to change the Patron compile flag:

$ brew install curl-openssl && \
    gem install patron -- --with-curl-config=/usr/local/opt/curl-openssl/bin/curl-config

You can also save this parameter for all future Bundler-driven gem installs by setting this flag in Bundler proper:

$ bundle config build.patron --with-curl-config=/usr/local/opt/curl-openssl/bin/curl-config

Installation

sudo gem install patron

Copyright (c) 2008 The Hive

patron's People

Contributors

ayanko avatar bhaberer avatar cdcooksey avatar chtjonas avatar ddnexus avatar haroldl avatar inkel avatar jasiek avatar joemce avatar jonhyman avatar joshtgreenwood avatar juanger avatar julik avatar jwilger avatar kurowski avatar luma avatar marshall-lee avatar mcmire avatar mjackson avatar msievers avatar nextmat avatar olleolleolle avatar roger-garza avatar saeohioalpha avatar steap avatar terabyte avatar tmm1 avatar totallymike avatar twp avatar windy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

patron's Issues

Cannot build on Snow Leopard

Patron will not install for me. I get the following build error on a stock Snow Leopard install (libcurl 7.19.5):

Building native extensions. This could take a while...
ERROR: Error installing patron:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
checking for curl-config... yes
checking for rb_thread_blocking_region()... no
creating Makefile

make
gcc -I. -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -I/usr/local/include -Wall -c session_ext.c
In file included from /usr/local/include/curl/curl.h:36,
from session_ext.c:26:
/usr/local/include/curl/curlrules.h:144: error: size of array ‘curl_rule_01’ is negative
lipo: can't open input file: /var/tmp//ccdy4TK5.out (No such file or directory)
make: *** [session_ext.o] Error 1

0.4.15 Breaks in rails 3

for whatever reason 4.14 works fine in rails 3, upgrading to 4.15 breaks complete with the following errors

TypeError: can't convert nil into String
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/patron-0.4.15/lib/patron/response.rb:67:in force_encoding' from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/patron-0.4.15/lib/patron/response.rb:67:inconvert_to_default_encoding!'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/patron-0.4.15/lib/patron/response.rb:40:in block in initialize' from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/patron-0.4.15/lib/patron/response.rb:39:ineach'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/patron-0.4.15/lib/patron/response.rb:39:in initialize' from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/patron-0.4.15/lib/patron/session.rb:222:inhandle_request'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/patron-0.4.15/lib/patron/session.rb:222:in request' from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/patron-0.4.15/lib/patron/session.rb:162:inpost'

The call that breaks is

d = Hash.new
d[:key1] = val1
d[:key2] = val2
record = JSON.generate(d)
response = JSON.parse(@sess.post("http://api.domain.com/",record).body)

Untitled

I'm getting "Patron::HostResolutionError: name lookup timed out" when using patron on a debian box, it works great in ubuntu by the way

GoogleGeocoding::Geocoder.query("1600 Amphitheatre Parkway, Mountain View, CA")
Patron::HostResolutionError: name lookup timed out
from /usr/local/rvm/gems/ruby-1.9.2-p136/gems/patron-0.4.11/lib/patron/session.rb:202:in handle_request' from /usr/local/rvm/gems/ruby-1.9.2-p136/gems/patron-0.4.11/lib/patron/session.rb:202:inrequest'
from /usr/local/rvm/gems/ruby-1.9.2-p136/gems/patron-0.4.11/lib/patron/session.rb:117:in get' from /usr/local/rvm/gems/ruby-1.9.2-p136/gems/google_geocoding-0.2.1/lib/google_geocoding/geocoder.rb:23:inquery'
from /usr/local/rvm/gems/ruby-1.9.2-p136/gems/google_geocoding-0.2.1/lib/google_geocoding/geocoder.rb:4:in query' from (irb):3 from /usr/local/rvm/gems/ruby-1.9.2-p136/gems/railties-3.0.3/lib/rails/commands/console.rb:44:instart'
from /usr/local/rvm/gems/ruby-1.9.2-p136/gems/railties-3.0.3/lib/rails/commands/console.rb:8:in start' from /usr/local/rvm/gems/ruby-1.9.2-p136/gems/railties-3.0.3/lib/rails/commands.rb:23:in<top (required)>'
from script/rails:6:in require' from script/rails:6:in

'

libcurl version:
$ curl -V
curl 7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.15 libssh2/1.2.5
Protocols: dict file ftp ftps http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz

any hint?

JRuby: undefined symbol: rb_set_end_proc

I am usgin jruby 1.6.2 on RVM. The gem got installed correctly but consle doesnt starts up throws
java: symbol lookup error: /home/prawin/.rvm/gems/jruby-1.6.2/gems/patron-0.4.17/lib/patron/session_ext.so: undefined symbol: rb_set_end_proc

Patron segfaults under ruby 2.0.0p247

Just a heads up, was doing some checking to see how things were looking for ruby 2.0.0, and Patron was one of the handful of gems that just seems to segfault.

~/src/patron > rvm use 2.0.0
Using /Users/bhaberer/.rvm/gems/ruby-2.0.0-p247

~/src/patron > git fetch upstream

~/src/patron > bundle
The source :rubygems is deprecated because HTTP requests are insecure.
Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not.
Fetching gem metadata from http://rubygems.org/.........
Fetching gem metadata from http://rubygems.org/..
Resolving dependencies...
Installing rake (0.9.2.2)
Using bundler (1.3.5)
Installing diff-lcs (1.1.3)
Using patron (0.4.18) from source at .
Installing rake-compiler (0.7.9)
Installing rcov (0.9.11)
Installing rspec-core (2.7.1)
Installing rspec-expectations (2.7.0)
Installing rspec-mocks (2.7.0)
Installing rspec (2.7.0)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.

~/src/patron > bundle exec irb
The source :rubygems is deprecated because HTTP requests are insecure.
Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not.
2.0.0-p247 :001 > require 'patron'
 => true
2.0.0-p247 :002 > session = Patron::Session.new
 => #<Patron::Session:0x007fca24110648 @headers={}, @timeout=5, @connect_timeout=1, @max_redirects=5, @auth_type=:basic>
2.0.0-p247 :003 > session.base_url = 'http://localhost/'
 => "http://localhost/"
2.0.0-p247 :004 > session.get ''
/Users/bhaberer/src/patron/lib/patron/session.rb:228: [BUG] Segmentation fault
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.4.0]

- Crash Report log information --------------------------------------------
   See Crash Report log file under the one of following:
     * ~/Library/Logs/CrashReporter
     * /Library/Logs/CrashReporter
     * ~/Library/Logs/DiagnosticReports
     * /Library/Logs/DiagnosticReports
   the more detail of.

-- Control frame information -----------------------------------------------
c:0021 p:---- s:0092 e:000091 CFUNC  :handle_request
c:0020 p:0478 s:0088 e:000087 METHOD /Users/bhaberer/src/patron/lib/patron/session.rb:228
c:0019 p:0017 s:0077 e:000076 METHOD /Users/bhaberer/src/patron/lib/patron/session.rb:129
c:0018 p:0008 s:0072 e:000071 EVAL   (irb):4 [FINISH]
c:0017 p:---- s:0070 e:000069 CFUNC  :eval
c:0016 p:0024 s:0063 e:000062 METHOD /Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb/workspace.rb:86
c:0015 p:0025 s:0056 e:000054 METHOD /Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb/context.rb:380
c:0014 p:0022 s:0050 e:000049 BLOCK  /Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb.rb:492
c:0013 p:0040 s:0042 e:000041 METHOD /Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb.rb:624
c:0012 p:0009 s:0037 e:000036 BLOCK  /Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb.rb:489
c:0011 p:0118 s:0033 e:000032 BLOCK  /Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb/ruby-lex.rb:247 [FINISH]
c:0010 p:---- s:0030 e:000029 CFUNC  :loop
c:0009 p:0007 s:0027 e:000026 BLOCK  /Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb/ruby-lex.rb:233 [FINISH]
c:0008 p:---- s:0025 e:000024 CFUNC  :catch
c:0007 p:0015 s:0021 e:000020 METHOD /Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb/ruby-lex.rb:232
c:0006 p:0030 s:0018 E:000298 METHOD /Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb.rb:488
c:0005 p:0008 s:0015 e:000014 BLOCK  /Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb.rb:397 [FINISH]
c:0004 p:---- s:0013 e:000012 CFUNC  :catch
c:0003 p:0143 s:0009 E:000578 METHOD /Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb.rb:396
c:0002 p:0122 s:0004 E:0019c8 EVAL   /Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/bin/irb:16 [FINISH]
c:0001 p:0000 s:0002 E:000698 TOP    [FINISH]

/Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/bin/irb:16:in `<main>'
/Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb.rb:396:in `start'
/Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb.rb:396:in `catch'
/Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb.rb:397:in `block in start'
/Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb.rb:488:in `eval_input'
/Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb/ruby-lex.rb:232:in `each_top_level_statement'
/Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb/ruby-lex.rb:232:in `catch'
/Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb/ruby-lex.rb:233:in `block in each_top_level_statement'
/Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb/ruby-lex.rb:233:in `loop'
/Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb/ruby-lex.rb:247:in `block (2 levels) in each_top_level_statement'
/Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb.rb:489:in `block in eval_input'
/Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb.rb:624:in `signal_status'
/Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb.rb:492:in `block (2 levels) in eval_input'
/Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb/context.rb:380:in `evaluate'
/Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb/workspace.rb:86:in `evaluate'
/Users/bhaberer/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/irb/workspace.rb:86:in `eval'
(irb):4:in `irb_binding'
/Users/bhaberer/src/patron/lib/patron/session.rb:129:in `get'
/Users/bhaberer/src/patron/lib/patron/session.rb:228:in `request'
/Users/bhaberer/src/patron/lib/patron/session.rb:228:in `handle_request'

-- C level backtrace information -------------------------------------------

-- Other runtime information -----------------------------------------------

Cookies are not saved

When an Patron:Session handle_cookies option is set, cookies are not saved into a specified file. I have investigated this problem and found that cookies are read correctly, but not saved due to incomplete session_ext.so cleanup (probably).

Workaround for this problem is here: http://ololo.cc/files/cookiejar.patch
Fix description: cookies are dumped after every successful request. Required libcurl 7.17.1+

.get fails on encoding conversion when the target isn't text

When I get an image with the latest Patron, I get the following exception:

#<Encoding::UndefinedConversionError: "\xFF" from ASCII-8BIT to UTF-8>
/patron-0.4.16/lib/patron/response.rb:69:in `encode!'
/patron-0.4.16/lib/patron/response.rb:69:in `convert_to_default_encoding!'
/patron-0.4.16/lib/patron/response.rb:42:in `block in initialize'
/patron-0.4.16/lib/patron/response.rb:41:in `each'
/patron-0.4.16/lib/patron/response.rb:41:in `initialize'

188b362 solves this problem, but it hasn't been released.

Segmentation fault with three or more threads

I'm running some benchmarks of ruby http libraries hitting a couchdb backend. I don't think I've hit the wall yet on my backend, I'm still running up against the limitations of the ruby libraries. First, some good news - Patron is beating Net::HTTP, RestClient, and Typhoeus. I'm running two threads, with each thread containing it's own Patron session.

The bad news is that if I add a third thread, it crashes with a Segmentation fault (dump below). I'm running this in ruby 1.9 on mac os x, I have a late macbook pro.

/usr/local/lib/ruby/gems/1.9.1/gems/patron-0.4.4/lib/patron/session.rb:179: [BUG] Segmentation fault
ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-darwin10.2.0]

-- control frame ----------
c:0006 p:---- s:0024 b:0024 l:000023 d:000023 CFUNC :handle_request
c:0005 p:0317 s:0020 b:0020 l:000019 d:000019 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/patron-0.4.4/lib/patron/session.rb:179
c:0004 p:0027 s:0012 b:0012 l:000011 d:000011 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/patron-0.4.4/lib/patron/session.rb:138
c:0003 p:0021 s:0006 b:0006 l:001f10 d:000005 BLOCK /Users/seanhess/Sandbox/twitterbench/couch.rb:69
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH

c:0001 p:---- s:0002 b:0002 l:000001 d:000001 TOP

-- Ruby level backtrace information-----------------------------------------
/usr/local/lib/ruby/gems/1.9.1/gems/patron-0.4.4/lib/patron/session.rb:179:in handle_request' /usr/local/lib/ruby/gems/1.9.1/gems/patron-0.4.4/lib/patron/session.rb:179:inrequest'
/usr/local/lib/ruby/gems/1.9.1/gems/patron-0.4.4/lib/patron/session.rb:138:in post' /Users/seanhess/Sandbox/twitterbench/couch.rb:69:inblock in write'

-- C level backtrace information -------------------------------------------

[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Push latest gem releases

Good to see some activity and new releases on this repo. One of those releases contains a fix I've been waiting for (data in DELETE requests); is there anything holding you back from pushing this to RubyGems?

Convert body to UTF8

Many web pages specify encoding in the Content-Type response header, I.E:
Content-Type: text/html; charset=utf-8

However, Patron's response.body is always encoded as ASCII. I have to use force_encoding to make the body content play nicely with Nokogiri. Would it make sense to attempt setting the encoding to the type specified in the charset?

Support for forcing IPv4 / IPv6

Is it possible to force IPv6/IPv4 via Patron? If not, would it make sense to expose this?

The reason this may become important very soon: OS X Yosemite appears to have made IPv6 default over IPv4. If you try to curl http://localhost:3000, curl will try IPv6 aliases for localhost before the IPv4 alias. If your server is not configured to bind to the IPv6 address (webrick by default, Thin, Unicorn by default, likely others), then cURL will fail on both IPv6 aliases and error out before it gets a chance to try the IPv4 alias.

On the command line, I can run curl -4 to default to IPv4. libcurl exposes [CURLOPT_IPRESOLVE](http://curl.haxx.se/libcurl/c/CURLOPT_IPRESOLVE.html) for this, but I can't figure a way to pass this through patron.

sigint resilient while connection is open

I don't know know if it's a feature or an issue : while a connection is open, Patron renders the Ruby application SIGINT resilient, ie control-c doesn't stop the program, nor a kill -s sigint , have to use kill -9. This is particulary visible when doing things like long polling.

Ruby's Net/HTTP is OK with SIGINT.

Many thanks for Patron.

Charset coercion enhancements

The current charset coercion code, while nice, can be a bit heavy handed and is just wrong in certain circumstances. In order to get ready for 1.0 I would like to add the following enhancements:

  • Make coercion optional and off by default
  • Allow the user to set a list of Content-Types that should be coerced (default to "text/*")
  • Allow the user to set a fallback charset if the charset provided by the server is unknown or none is provided

running tests with ruby 1.8 results in segfault

Running tests for ruby1.8 using debian/ruby-tests.rake ...
/usr/bin/ruby1.8 -S rspec ./spec/util_spec.rb ./spec/response_spec.rb ./spec/request_spec.rb ./spec/patron_spec.rb ./spec/session_spec.rb
/media/forge/debian/diaspora/ruby-patron-0.4.18/spec/../ext/patron/session_ext.so: [BUG] Segmentation fault
ruby 1.8.7 (2012-02-08 patchlevel 358) [x86_64-linux]

rake aborted!
/usr/bin/ruby1.8 -S rspec ./spec/util_spec.rb ./spec/response_spec.rb ./spec/request_spec.rb ./spec/patron_spec.rb ./spec/session_spec.rb failed

Tasks: TOP => default => spec
(See full trace by running task with --trace)

Tests are running fine with ruby 1.9

/usr/bin/ruby1.9.1 -I/usr/lib/ruby/vendor_ruby /usr/lib/ruby/vendor_ruby/gem2deb/test_runner.rb
Running tests for ruby1.9.1 using debian/ruby-tests.rake ...
/usr/bin/ruby1.9.1 -S rspec ./spec/util_spec.rb ./spec/response_spec.rb ./spec/request_spec.rb ./spec/patron_spec.rb ./spec/session_spec.rb
.........................................................

Finished in 1.72 seconds
57 examples, 0 failures

abnormally slow PUT requests

I added patron support to an http client lib I'm hacking on: technoweenie/alice. For some reason the put requests are really slow though:

First, I hacked the bottom of Patron::Session#request like this:

      req.url = self.base_url.to_s + url.to_s
      raise ArgumentError, "Empty URL" if req.url.empty?
puts req.inspect
t = Time.now
      resp = handle_request(req)
puts Time.now - t
      resp
    end

The output looks like this:

.#Patron::Request:0x10217cdb8 @proxy=nil, @connect_timeout=1000, @upload_data="", @password=nil, @username=nil, @timeout=5, @auth_type=0, @url="http://entp.local.i:4567/nothing", @action=:put, @insecure=nil, @max_redirects=-1, @file_name=nil, @headers={}>
0.000679
.#Patron::Request:0x102179d48 @proxy=nil, @connect_timeout=1000, @upload_data="", @password=nil, @username=nil, @timeout=5, @auth_type=0, @url="http://entp.local.i:4567/echo_name", @action=:put, @insecure=nil, @max_redirects=-1, @file_name=nil, @headers={}>
0.000693
.#Patron::Request:0x102176878 @proxy=nil, @connect_timeout=1000, @upload_data="name[first]=zack", @password=nil, @username=nil, @timeout=5, @auth_type=0, @url="http://entp.local.i:4567/echo_name", @action=:put, @insecure=nil, @max_redirects=-1, @file_name=nil, @headers={"Content-Type"=>"application/x-www-form-urlencoded"}>
2.001209
.#Patron::Request:0x102173358 @proxy=nil, @connect_timeout=1000, @upload_data="name=zack", @password=nil, @username=nil, @timeout=5, @auth_type=0, @url="http://entp.local.i:4567/echo_name", @action=:put, @insecure=nil, @max_redirects=-1, @file_name=nil, @headers={"Content-Type"=>"application/x-www-form-urlencoded"}>
2.001793

The sinatra logs:

127.0.0.1 - - [03/Jan/2010 17:58:32] "PUT /echo_name HTTP/1.1" 200 17 0.0003
127.0.0.1 - - [03/Jan/2010 17:58:34] "PUT /echo_name HTTP/1.1" 200 6 0.0004
127.0.0.1 - - [03/Jan/2010 17:58:56] "PUT /echo_name HTTP/1.1" 200 6 0.0003
127.0.0.1 - - [03/Jan/2010 17:59:14] "PUT /echo_name HTTP/1.1" 200 6 0.0005

There is no way to use patron with a SSL server using a self-signed or custom certificate without completely disabling certificate validation

Using curl itself, you can specify a certificate to use for validation:

# create self-signed cert
$ openssl genrsa 4096 > privkey.pem
$ openssl req -new -x509 -key privkey.pem -out cacert.pem -days 10
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:California
Locality Name (eg, city) []:Palo Alto
Organization Name (eg, company) [Internet Widgits Pty Ltd]:ITOOLS
Organizational Unit Name (eg, section) []:ITOOLS
Common Name (e.g. server FQDN or YOUR name) []:localhost
Email Address []:[email protected]

# next, start the server
$ openssl s_server -accept 19443 -cert cacert.pem -key privkey.pem
Using default temp DH parameters
Using default temp ECDH parameters
ACCEPT


# In a different terminal
$ curl https://localhost:19443/
curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
# but disabling cert checking works:
curl -k https://localhost:19443/
^C
# s_server is limited, so you have to ctrl-c it, but back in the first terminal you see:
-----BEGIN SSL SESSION PARAMETERS-----
MIGHAgEBAgIDAgQCwBQEIP/oS+No7LAX13bg04ZJCaRFT3BZoSF7eUOxrwHdphKC
BDALqBgZAnpjKvDSkseN5GJStuA0236puXdNJ/QDb5MWcPx6LVkC9iRNCzA6yuc5
24mhBgIEUVyYTaIEAgIBLKQGBAQBAAAApgsECWxvY2FsaG9zdKsDBAEB
-----END SSL SESSION PARAMETERS-----
Shared ciphers:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:SRP-DSS-AES-256-CBC-SHA:SRP-RSA-AES-256-CBC-SHA:DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:DHE-RSA-CAMELLIA256-SHA:DHE-DSS-CAMELLIA256-SHA:ECDH-RSA-AES256-SHA:ECDH-ECDSA-AES256-SHA:AES256-SHA:CAMELLIA256-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:SRP-DSS-3DES-EDE-CBC-SHA:SRP-RSA-3DES-EDE-CBC-SHA:EDH-RSA-DES-CBC3-SHA:EDH-DSS-DES-CBC3-SHA:ECDH-RSA-DES-CBC3-SHA:ECDH-ECDSA-DES-CBC3-SHA:DES-CBC3-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:SRP-DSS-AES-128-CBC-SHA:SRP-RSA-AES-128-CBC-SHA
CIPHER is ECDHE-RSA-AES256-SHA
Secure Renegotiation IS NOT supported
GET / HTTP/1.1
User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
Host: localhost:19443
Accept: */*

ERROR
shutting down SSL
CONNECTION CLOSED

# But we'd like curl to still check the certificate using our certificate file
# Sure enough, if we do this:
$ curl --cacert cacert.pem https://localhost:19443/
^C
# back in the other window we see:
GET / HTTP/1.1
User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
Host: localhost:19443
Accept: */*

ERROR
shutting down SSL
CONNECTION CLOSED
ACCEPT
# which implies to me that it is working.

Here is some ruby equivalent code:

#!/usr/bin/env ruby

require 'patron'
require 'awesome_print'

begin

  uri = URI.parse('https://localhost:19443')

  session = Patron::Session.new
  session.timeout = 5
  #session.insecure = true

  response = session.post(uri.to_s, '')
  ap response
end
# Run this script, get:
$ ./test.rb
/home/cmyers/.rvm/gems/ruby-1.9.2-p320@adms/gems/patron-0.4.18/lib/patron/session.rb:223:in `handle_request': SSL certificate problem, verify that the CA cert is OK. Details: (Patron::Error)
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
# and the server says:
ERROR
139771075016352:error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca:s3_pkt.c:1247:SSL alert number 48
139771075016352:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:177:
shutting down SSL
CONNECTION CLOSED

# uncomment the insecure line, and instead see:
$ ./test.rb
/home/cmyers/.rvm/gems/ruby-1.9.2-p320@adms/gems/patron-0.4.18/lib/patron/session.rb:223:in `handle_request': Operation timed out after 5001 milliseconds with 3 bytes received (Patron::TimeoutError)
# and looking at the server, I see:
ACCEPT
POST / HTTP/1.1
Host: localhost:19443
Accept: */*
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

DONE
shutting down SSL
CONNECTION CLOSED

In short, what I need is a way to specify a session.cacert = 'some_file.pem' and get patron to still validate the server certificate using that.

Unable to share session across threads.

Should a Patron::Session be threadsafe? I am seeing an error while trying to use the same session in multiple threads.

Here is my test script:

  require 'patron'

  sess = Patron::Session.new
  sess.base_url = "http://sushi.com"
  sess.insecure = true

  threads = [0, 1].map do |i|
    Thread.start do
      sess.get("/nigiri/sake.json")
    end
  end

  threads.each { |t| t.join }

And this is the stacktrace:

/Users/jacobmorris/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/patron-0.4.18/lib/patron/session.rb:223:in `handle_request': CURLOPT_SSL_VERIFYHOST no longer supports 1 as value! (Patron::Error)
    from /Users/jacobmorris/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/patron-0.4.18/lib/patron/session.rb:223:in `request'
    from /Users/jacobmorris/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/patron-0.4.18/lib/patron/session.rb:126:in `get'
    from lib/tasks/search.rake:38:in `block (2 levels) in do_raw_patron_test'

The weird thing is that this code does not cause the same exception:

  sess = Patron::Session.new
  sess.base_url = "http://sushi.com"
  sess.insecure = true

  sess.get("/nigiri/sake.json")

If the real issue is setting SSL_VERIFYHOST with an incorrect value, shouldn't the exception be raised in both cases?

What is the expected behavior of using the same session from multiple threads?

:query option for query string parameters?

Hi there! I like how Session#request accepts a :data option, but is there a reason why it doesn't also accept a :query option that would act the same way (i.e., the hash would get turned into a string of query parameters), except then it would get appended to the url instead of getting passed through as post data?

handle incorrect encoding names

I found a site that returns an incorrect encoding name in the response header:

Content-Type: text/html; charset=iso-88591

But the response body has a correct encoding specified

<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />

Is it possible that Patron could handle this incorrect encoding name in header and fall back on the charset specified in the response body?

As of now i get the following error:

ArgumentError: unknown encoding name - iso-88591
  from /home/useraname/shared/bundle/ruby/1.9.1/gems/patron-0.4.16/lib/patron/response.rb:69:in `force_encoding'
  from /home/useraname/shared/bundle/ruby/1.9.1/gems/patron-0.4.16/lib/patron/response.rb:69:in `convert_to_default_encoding!'
  from /home/username/shared/bundle/ruby/1.9.1/gems/patron-0.4.16/lib/patron/response.rb:42:in `block in initialize'
  from /home/username/shared/bundle/ruby/1.9.1/gems/patron-0.4.16/lib/patron/response.rb:41:in `each'
  from /home/username/shared/bundle/ruby/1.9.1/gems/patron-0.4.16/lib/patron/response.rb:41:in `initialize'
  from /home/username/shared/bundle/ruby/1.9.1/gems/patron-0.4.16/lib/patron/session.rb:222:in `handle_request'
  from /home/username/shared/bundle/ruby/1.9.1/gems/patron-0.4.16/lib/patron/session.rb:222:in `request'
  from /home/username/shared/bundle/ruby/1.9.1/gems/patron-0.4.16/lib/patron/session.rb:125:in `get'

Using insecure option but still getting SSL verification error

While I am using insecure = true, I still get SSL verification errors. Check below:

~ $ moob -t type -v -u user -p pass -m server.example.com
Trying to authenticate to server.example.com...
Failure: Patron::Error (SSL: certificate subject name 'default certificate' does not match target host name 'server.example.com')

Backtrace to provide in any support request:
/usr/lib/ruby/gems/1.9.1/gems/patron-0.4.18/lib/patron/session.rb:223:in `handle_request'
/usr/lib/ruby/gems/1.9.1/gems/patron-0.4.18/lib/patron/session.rb:223:in `request'
/usr/lib/ruby/gems/1.9.1/gems/patron-0.4.18/lib/patron/session.rb:126:in `get'
/usr/lib/ruby/gems/1.9.1/gems/moob-0.3.12/lib/moob/idrac6.rb:34:in `authenticate'
/usr/lib/ruby/gems/1.9.1/gems/moob-0.3.12/bin/moob:99:in `block in <top (required)>'
/usr/lib/ruby/gems/1.9.1/gems/moob-0.3.12/bin/moob:95:in `each'
/usr/lib/ruby/gems/1.9.1/gems/moob-0.3.12/bin/moob:95:in `<top (required)>'
/usr/bin/moob:23:in `load'
/usr/bin/moob:23:in `<main>'

I fixed it by applying this diff:

diff --git a/ext/patron/session_ext.c b/ext/patron/session_ext.c
index bf98fa6..78255b4 100644
--- a/ext/patron/session_ext.c
+++ b/ext/patron/session_ext.c
@@ -493,7 +493,7 @@ static void set_options_from_request(VALUE self, VALUE request) {
   insecure = rb_iv_get(request, "@insecure");
   if(!NIL_P(insecure)) {
     curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
-    curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 1);
+    curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
   }

   cacert = rb_iv_get(request, "@cacert");

Issue with Patron deadlock when starting the server in a separate thread in the same process

The tests for my VCR gem tests a bunch of different supported HTTP libraries including Patron. The specs and cukes start up a local rack server and than make requests to it. The rack server is started in a separate thread when needed so that it automatically shuts down when the specs/cukes end.

This doesn't work so well for Patron...the process freezes. I've attempted to work around it by forking a process instead of using a thread, but that introduces some additional complexity and has some other problems. It'd be preferable to fix the issue in Patron; the threading works fine for Curb, Typhoeus, Net::HTTP, HTTPClient and em-http-request.

I haven't spent much time troubleshooting it, but it appears that Patron uses blocking primitives that when the request is initiated, which causes deadlock since another thread is trying to start up the server.

Patron::HostResolutionError: Couldn't resolve host (with last ruby on rails version)

It's very strange! It works with Rails 3.2.11 but not with 3.2.12:

# Loading development environment (Rails 3.2.12)
sess = Patron::Session.new
sess.base_url = "http://barrapunto.com"
sess.get("/login.pl")
Patron::HostResolutionError: Couldn't resolve host 'barrapunto.com'
# Loading development environment (Rails 3.2.11)
sess = Patron::Session.new
sess.base_url = "http://barrapunto.com"
sess.get("/login.pl")
 => #<Patron::Response @status_line='HTTP/1.1 200 OK'> 

PUT image/png : operation timed out after 5000 milliseconds

details at :

http://gist.github.com/313391

(the gist uses a simple sinatra server, but the issue was initially observed with CouchDB)

symptom :

$ ruby client.rb
/Users/jmettraux/.rvm/gems/ruby-1.9.1-p378/gems/patron-0.4.5/lib/patron/session.rb:179:in `handle_request': Operation timed out after 5000 milliseconds with 0 bytes received (Patron::TimeoutError)
from /Users/jmettraux/.rvm/gems/ruby-1.9.1-p378/gems/patron-0.4.5/lib/patron/session.rb:179:in `request'
from /Users/jmettraux/.rvm/gems/ruby-1.9.1-p378/gems/patron-0.4.5/lib/patron/session.rb:127:in `put'
from client.rb:10:in `<main>'

Many thanks for Patron !

Compiling extensions

When installing the gem I get:

gcc -I. -I. -I/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/1.8/i686-linux -I. -D_FILE_OFFSET_BITS=64 -fPIC -g -O2 -Wall -c session_ext.c
session_ext.c: In function ‘Init_session_ext’:
session_ext.c:531: error: ‘CURLPROXY_HTTP_1_0’ undeclared (first use in this function)

Am I using a too old version of libcurl?

curl --version
curl 7.18.0 (i486-pc-linux-gnu) libcurl/7.18.0 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.1
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz

Error running on linux with jruby

HI. I'm using rbenv install of jruby 1.7 preview 2 on linux machine. When I try to start up the app, I get the following error.

Any ideas?

The signal USR1 is in use by the JVM and will not work correctly on this platform
include_class is deprecated. Use java_import.
include_class is deprecated. Use java_import.
LoadError: load error: patron/session_ext -- java.lang.RuntimeException: C extension initialized against invalid ruby runtime
require at org/jruby/RubyKernel.java:1024
require at /home/webapps/spotdock/releases/20120920162052/vendor/bundle/jruby/1.9/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240
load_dependency at /home/webapps/spotdock/releases/20120920162052/vendor/bundle/jruby/1.9/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223
new_constants_in at /home/webapps/spotdock/releases/20120920162052/vendor/bundle/jruby/1.9/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640
new_constants_in at /home/webapps/spotdock/releases/20120920162052/vendor/bundle/jruby/1.9/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:639
load_dependency at /home/webapps/spotdock/releases/20120920162052/vendor/bundle/jruby/1.9/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223
require at /home/webapps/spotdock/releases/20120920162052/vendor/bundle/jruby/1.9/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240
(root) at /home/webapps/spotdock/releases/20120920162052/vendor/bundle/jruby/1.9/gems/patron-0.4.18/lib/patron/session.rb:30
require at org/jruby/RubyKernel.java:1024
require at /home/webapps/spotdock/releases/20120920162052/vendor/bundle/jruby/1.9/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240
load_dependency at /home/webapps/spotdock/releases/20120920162052/vendor/bundle/jruby/1.9/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223
new_constants_in at /home/webapps/spotdock/releases/20120920162052/vendor/bundle/jruby/1.9/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640
new_constants_in at /home/webapps/spotdock/releases/20120920162052/vendor/bundle/jruby/1.9/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:639
load_dependency at /home/webapps/spotdock/releases/20120920162052/vendor/bundle/jruby/1.9/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223
require at /home/webapps/spotdock/releases/20120920162052/vendor/bundle/jruby/1.9/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240
(root) at /home/webapps/spotdock/releases/20120920162052/vendor/bundle/jruby/1.9/gems/patron-0.4.18/lib/patron.rb:1
require at org/jruby/RubyKernel.java:1024
(root) at /home/webapps/spotdock/releases/20120920162052/vendor/bundle/jruby/1.9/gems/patron-0.4.18/lib/patron.rb:30
each at org/jruby/RubyArray.java:1612
(root) at /root/.rbenv/versions/jruby-1.7.0-preview2/lib/ruby/gems/shared/gems/bundler-1.1.3/lib/bundler/runtime.rb:1
each at org/jruby/RubyArray.java:1612
require at /root/.rbenv/versions/jruby-1.7.0-preview2/lib/ruby/gems/shared/gems/bundler-1.1.3/lib/bundler/runtime.rb:68
require at /root/.rbenv/versions/jruby-1.7.0-preview2/lib/ruby/gems/shared/gems/bundler-1.1.3/lib/bundler/runtime.rb:66
require at /root/.rbenv/versions/jruby-1.7.0-preview2/lib/ruby/gems/shared/gems/bundler-1.1.3/lib/bundler/runtime.rb:55
require at org/jruby/RubyKernel.java:1024
require at /root/.rbenv/versions/jruby-1.7.0-preview2/lib/ruby/gems/shared/gems/bundler-1.1.3/lib/bundler.rb:119
require at org/jruby/RubyKernel.java:1024
(root) at /home/webapps/spotdock/releases/20120920162052/config/application.rb:12
(root) at /home/webapps/spotdock/releases/20120920162052/config/environment.rb:1
(root) at /home/webapps/spotdock/releases/20120920162052/config/environment.rb:5
load at org/jruby/RubyKernel.java:1050

Request: Provide a way to get a Request object before it's sent to #handle_request

We're using Patron in a project, and we need to add a few custom headers based on the state of, say, query params and certain other headers. Since Patron::Session#request already builds a Patron::Request object that has so much stuff I need (like a canonical form of the query params), I'd love to have access to that object prior to sending it to handle_request.

Would you be open to a PR that provides such a mechanism?

Pretty much what I'd do is yank out the code that exists in Patron::Session#request, put it in a method called, say, #build_request, then call that method in #request. Then I can get the request and pass it on to #handle_request later if I want to.

Can't install gem on OSX/i64 -- ARCHFLAGS overridden by extconf.rb

The command that overwrites the ARCHFLAGS env var specifies PPC compiler. OSX for x86_64 doesn't include a PPC compiler by default, building breaks.

Here's the gcc command

gcc -I. -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -force_cpusubtype_ALL -mmacosx-version-min=10.4 -arch i386 -arch ppc -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -Wall -c session_ext.c
/usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler (/usr/bin/../libexec/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not installed
Installed assemblers are:
/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64
/usr/bin/../libexec/gcc/darwin/i386/as for architecture i386

Get IP from response

A little feature request: It would be nice to grab the IP of the peer from a successful request

Patron spec tests intermittently segfault

Presently, running rake spec intermittently segfaults against ruby 1.9.2 and 1.9.3 at least.

Sometimes it hangs after printing out the seg fault:

 rake spec
WARNING: 'require 'rake/rdoctask'' is deprecated.  Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead.
    at /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rake-0.9.2.2/lib/rake/rdoctask.rb
install -c tmp/x86_64-linux/session_ext/1.9.3/session_ext.so lib/patron/session_ext.so
/home/cmyers/.rvm/rubies/ruby-1.9.3-p385/bin/ruby -S rspec --colour --format progress spec/response_spec.rb spec/request_spec.rb spec/util_spec.rb spec/patron_spec.rb spec/session_spec.rb
...............................................................

Finished in 2.33 seconds
63 examples, 0 failures
/home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/bin/rspec: [BUG] Segmentation fault
ruby 1.9.3p385 (2013-02-06 revision 39114) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0001 p:0000 s:0002 b:0002 l:0022f8 d:0022f8 TOP   


-- C level backtrace information -------------------------------------------
^Crake aborted!

Other times it exists fully and has more info

 rake spec
WARNING: 'require 'rake/rdoctask'' is deprecated.  Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead.
    at /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rake-0.9.2.2/lib/rake/rdoctask.rb
install -c tmp/x86_64-linux/session_ext/1.9.3/session_ext.so lib/patron/session_ext.so
/home/cmyers/.rvm/rubies/ruby-1.9.3-p385/bin/ruby -S rspec --colour --format progress spec/response_spec.rb spec/request_spec.rb spec/util_spec.rb spec/patron_spec.rb spec/session_spec.rb
...............................................................

Finished in 2.35 seconds
63 examples, 0 failures
/home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/bin/rspec: [BUG] Segmentation fault
ruby 1.9.3p385 (2013-02-06 revision 39114) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0001 p:0000 s:0002 b:0002 l:0007d8 d:0007d8 TOP


-- C level backtrace information -------------------------------------------
/home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/libruby.so.1.9(+0x17bc85) [0x7f192d25ac85] vm_dump.c:796
/home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/libruby.so.1.9(+0x5d1bb) [0x7f192d13c1bb] error.c:258
/home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/libruby.so.1.9(rb_bug+0xb7) [0x7f192d13cfd7] error.c:277
/home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/libruby.so.1.9(+0x1103df) [0x7f192d1ef3df] signal.c:609
/lib/x86_64-linux-gnu/libc.so.6(+0x364c0) [0x7f192cd584c0]
/usr/lib/x86_64-linux-gnu/libcurl.so.4(Curl_hash_clean_with_criterium+0x58) [0x7f192a09e7e8]
/usr/lib/x86_64-linux-gnu/libcurl.so.4(Curl_hostcache_prune+0x5f) [0x7f192a07718f]
/usr/lib/x86_64-linux-gnu/libcurl.so.4(Curl_disconnect+0x40) [0x7f192a086a50]
/usr/lib/x86_64-linux-gnu/libcurl.so.4(+0x1dca7) [0x7f192a086ca7]
/usr/lib/x86_64-linux-gnu/libcurl.so.4(Curl_close+0x88) [0x7f192a088d78]
/home/cmyers/gitrepos/patron/lib/patron/session_ext.so(session_free+0x11) [0x7f192a2c7ed1] ../../../../ext/patron/session_ext.c:160
/home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/libruby.so.1.9(+0x749a2) [0x7f192d1539a2] gc.c:3033
/home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/libruby.so.1.9(rb_gc_call_finalizer_at_exit+0x9a) [0x7f192d1585ba] gc.c:3049
/home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/libruby.so.1.9(ruby_cleanup+0x1ec) [0x7f192d1449bc] eval.c:101
/home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/libruby.so.1.9(ruby_run_node+0x25) [0x7f192d144c45] eval.c:244
/home/cmyers/.rvm/rubies/ruby-1.9.3-p385/bin/ruby() [0x40081b] main.c:38
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f192cd4376d]
/home/cmyers/.rvm/rubies/ruby-1.9.3-p385/bin/ruby() [0x400849] main.c:40

-- Other runtime information -----------------------------------------------

* Loaded script: /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/bin/rspec

* Loaded features:

    0 enumerator.so
    1 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/enc/encdb.so
    2 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/enc/trans/transdb.so
    3 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/site_ruby/1.9.1/rubygems/defaults.rb
    4 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/rbconfig.rb
    5 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/site_ruby/1.9.1/rubygems/deprecate.rb
    6 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/site_ruby/1.9.1/rubygems/exceptions.rb
    7 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb
    8 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/site_ruby/1.9.1/rubygems.rb
    9 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/pathname.so
   10 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/pathname.rb
   11 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/site_ruby/1.9.1/rubygems/user_interaction.rb
   12 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/etc.so
   13 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb
   14 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/site_ruby/1.9.1/rubygems/version.rb
   15 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/rubygems_integration.rb
   16 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/site_ruby/1.9.1/rubygems/requirement.rb
   17 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb
   18 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/shared_helpers.rb
   19 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/fileutils.rb
   20 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/gem_path_manipulation.rb
   21 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/site_ruby/1.9.1/rubygems/platform.rb
   22 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb
   23 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/gem_helpers.rb
   24 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/match_platform.rb
   25 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/rubygems_ext.rb
   26 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/version.rb
   27 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler.rb
   28 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/settings.rb
   29 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/site_ruby/1.9.1/rubygems/path_support.rb
   30 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/digest.so
   31 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/digest.rb
   32 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/digest/sha1.so
   33 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/set.rb
   34 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/definition.rb
   35 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/dependency.rb
   36 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/ruby_dsl.rb
   37 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/dsl.rb
   38 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/source.rb
   39 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/uri/common.rb
   40 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/uri/generic.rb
   41 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/uri/ftp.rb
   42 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/uri/http.rb
   43 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/uri/https.rb
   44 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/uri/ldap.rb
   45 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/uri/ldaps.rb
   46 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/uri/mailto.rb
   47 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/uri.rb
   48 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/site_ruby/1.9.1/rubygems/remote_fetcher.rb
   49 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/site_ruby/1.9.1/rubygems/errors.rb
   50 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/site_ruby/1.9.1/rubygems/text.rb
   51 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb
   52 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/source/rubygems.rb
   53 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/ui.rb
   54 /home/cmyers/gitrepos/patron/lib/patron/version.rb
   55 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/source/path.rb
   56 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/strscan.so
   57 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/source/git.rb
   58 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/lockfile_parser.rb
   59 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/lazy_specification.rb
   60 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/tsort.rb
   61 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/forwardable.rb
   62 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/spec_set.rb
   63 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/environment.rb
   64 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/runtime.rb
   65 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/index.rb
   66 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/remote_specification.rb
   67 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/dep_proxy.rb
   68 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/resolver.rb
   69 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/endpoint_specification.rb
   70 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb
   71 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.3.4/lib/bundler/setup.rb
   72 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/dsl.rb
   73 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/extensions/kernel.rb
   74 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/extensions/instance_eval_with_args.rb
   75 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/extensions/module_eval_with_args.rb
   76 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/extensions.rb
   77 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/ruby_project.rb
   78 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/load_path.rb
   79 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/deprecation.rb
   80 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/backward_compatibility.rb
   81 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/reporter.rb
   82 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/metadata_hash_builder.rb
   83 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/hooks.rb
   84 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/expectations/extensions/kernel.rb
   85 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/subject.rb
   86 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/let.rb
   87 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/metadata.rb
   88 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/pending.rb
   89 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/world.rb
   90 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/configuration.rb
   91 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/command_line_configuration.rb
   92 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/optparse.rb
   93 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/option_parser.rb
   94 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/configuration_options.rb
   95 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/command_line.rb
   96 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/drb_command_line.rb
   97 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/socket.so
   98 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/socket.rb
   99 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/thread.rb
  100 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/fcntl.so
  101 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/drb/eq.rb
  102 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/drb/invokemethod.rb
  103 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/drb/drb.rb
  104 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/runner.rb
  105 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/example.rb
  106 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/shared_context.rb
  107 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/shared_example_group.rb
  108 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/example_group.rb
  109 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/version.rb
  110 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/errors.rb
  111 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/monkey/spork/test_framework/rspec.rb
  112 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/monkey.rb
  113 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core.rb
  114 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/autorun.rb
  115 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/erb.rb
  116 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/formatters/helpers.rb
  117 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/stringio.so
  118 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/formatters/base_formatter.rb
  119 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/formatters/base_text_formatter.rb
  120 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/formatters/progress_formatter.rb
  121 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/expectations/extensions/array.rb
  122 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/expectations/extensions/object.rb
  123 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/expectations/extensions.rb
  124 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/extensions/instance_eval_with_args.rb
  125 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/pretty.rb
  126 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/matcher.rb
  127 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/operator_matcher.rb
  128 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/dsl.rb
  129 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/be.rb
  130 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/be_close.rb
  131 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/be_instance_of.rb
  132 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/be_kind_of.rb
  133 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/be_within.rb
  134 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/block_aliases.rb
  135 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/change.rb
  136 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/cover.rb
  137 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/eq.rb
  138 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/eql.rb
  139 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/equal.rb
  140 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/errors.rb
  141 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/exist.rb
  142 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/generated_descriptions.rb
  143 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/has.rb
  144 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/have.rb
  145 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/include.rb
  146 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/match.rb
  147 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/match_array.rb
  148 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/method_missing.rb
  148 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/method_missing.rb
  149 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/raise_error.rb
  150 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/respond_to.rb
  151 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/satisfy.rb
  152 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/throw_symbol.rb
  153 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers/compatibility.rb
  154 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/matchers.rb
  155 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/expectations/fail_with.rb
  156 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/expectations/errors.rb
  157 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/expectations/deprecation.rb
  158 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/expectations/handler.rb
  159 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/expectations/version.rb
  160 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/diff-lcs-1.1.3/lib/diff/lcs/change.rb
  161 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/diff-lcs-1.1.3/lib/diff/lcs/callbacks.rb
  162 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/diff-lcs-1.1.3/lib/diff/lcs.rb
  163 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/diff-lcs-1.1.3/lib/diff/lcs/block.rb
  164 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/diff-lcs-1.1.3/lib/diff/lcs/hunk.rb
  165 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/prettyprint.rb
  166 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/pp.rb
  167 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/expectations/differ.rb
  168 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-expectations-2.7.0/lib/rspec/expectations.rb
  169 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-mocks-2.7.0/lib/rspec/mocks/extensions/instance_exec.rb
  170 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-mocks-2.7.0/lib/rspec/mocks/method_double.rb
  171 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-mocks-2.7.0/lib/rspec/mocks/methods.rb
  172 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-mocks-2.7.0/lib/rspec/mocks/argument_matchers.rb
  173 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-mocks-2.7.0/lib/rspec/mocks/proxy.rb
  174 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-mocks-2.7.0/lib/rspec/mocks/mock.rb
  175 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-mocks-2.7.0/lib/rspec/mocks/argument_expectation.rb
  176 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-mocks-2.7.0/lib/rspec/mocks/message_expectation.rb
  177 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-mocks-2.7.0/lib/rspec/mocks/order_group.rb
  178 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-mocks-2.7.0/lib/rspec/mocks/errors.rb
  179 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-mocks-2.7.0/lib/rspec/mocks/error_generator.rb
  180 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-mocks-2.7.0/lib/rspec/mocks/space.rb
  181 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-mocks-2.7.0/lib/rspec/mocks/extensions/marshal.rb
  182 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-mocks-2.7.0/lib/rspec/mocks/serialization.rb
  183 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-mocks-2.7.0/lib/rspec/mocks/any_instance/chain.rb
  184 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-mocks-2.7.0/lib/rspec/mocks/any_instance/stub_chain.rb
  185 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-mocks-2.7.0/lib/rspec/mocks/any_instance/stub_chain_chain.rb
  186 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-mocks-2.7.0/lib/rspec/mocks/any_instance/expectation_chain.rb
  187 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-mocks-2.7.0/lib/rspec/mocks/any_instance/message_chains.rb
  188 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-mocks-2.7.0/lib/rspec/mocks/any_instance/recorder.rb
  189 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-mocks-2.7.0/lib/rspec/mocks/any_instance.rb
  190 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-mocks-2.7.0/lib/rspec/mocks/framework.rb
  191 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-mocks-2.7.0/lib/rspec/mocks/version.rb
  192 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-mocks-2.7.0/lib/rspec/mocks/spec_methods.rb
  193 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-mocks-2.7.0/lib/rspec/mocks.rb
  194 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-2.7.0/lib/rspec/version.rb
  195 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-2.7.0/lib/rspec.rb
  196 /home/cmyers/gitrepos/patron/lib/patron/error.rb
  197 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/cgi/core.rb
  198 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/cgi/cookie.rb
  199 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/cgi/util.rb
  200 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/cgi.rb
  201 /home/cmyers/gitrepos/patron/lib/patron/util.rb
  202 /home/cmyers/gitrepos/patron/lib/patron/request.rb
  203 /home/cmyers/gitrepos/patron/lib/patron/response.rb
  204 /home/cmyers/gitrepos/patron/lib/patron/session_ext.so
  205 /home/cmyers/gitrepos/patron/lib/patron/session.rb
  206 /home/cmyers/gitrepos/patron/lib/patron.rb
  207 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/syntax_error.rb
  208 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/psych.so
  209 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/nodes/node.rb
  210 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/nodes/stream.rb
  211 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/nodes/document.rb
  212 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/nodes/sequence.rb
  213 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/nodes/scalar.rb
  214 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/nodes/mapping.rb
  215 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/nodes/alias.rb
  216 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/nodes.rb
  217 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/streaming.rb
  218 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/visitors/visitor.rb
  219 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/scalar_scanner.rb
  220 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/visitors/to_ruby.rb
  221 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/visitors/emitter.rb
  222 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb
  223 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/json/ruby_events.rb
  224 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/visitors/json_tree.rb
  225 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/visitors/depth_first.rb
  226 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/visitors.rb
  227 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/handler.rb
  228 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/tree_builder.rb
  229 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/parser.rb
  230 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/omap.rb
  231 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/set.rb
  232 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/coder.rb
  233 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/core_ext.rb
  234 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/date_core.so
  235 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/date/format.rb
  236 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/date.rb
  237 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/deprecated.rb
  238 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/stream.rb
  239 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/json/yaml_events.rb
  240 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/json/tree_builder.rb
  241 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/json/stream.rb
  242 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych/handlers/document_stream.rb
  243 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/psych.rb
  244 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/yaml.rb
  245 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/compat.rb
  246 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/version.rb
  247 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/httpversion.rb
  248 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/delegate.rb
  249 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/tmpdir.rb
  250 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/tempfile.rb
  251 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/httputils.rb
  252 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/timeout.rb
  253 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/singleton.rb
  254 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/utils.rb
  255 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/log.rb
  256 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/config.rb
  257 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/server.rb
  258 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/accesslog.rb
  259 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/htmlutils.rb
  260 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/time.rb
  261 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/cookie.rb
  262 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/httpstatus.rb
  263 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/httprequest.rb
  264 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/httpresponse.rb
  265 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/httpservlet/abstract.rb
  266 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/httpservlet/filehandler.rb
  267 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/httpservlet/cgihandler.rb
  268 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/httpservlet/erbhandler.rb
  269 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/httpservlet/prochandler.rb
  270 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/httpservlet.rb
  271 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/httpserver.rb
  272 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/httpauth/authenticator.rb
  273 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/httpauth/basicauth.rb
  274 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/digest/md5.so
  275 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/httpauth/digestauth.rb
  276 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/httpauth/userdb.rb
  277 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/httpauth/htpasswd.rb
  278 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/httpauth/htdigest.rb
  279 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/httpauth/htgroup.rb
  280 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick/httpauth.rb
  281 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/webrick.rb
  282 /home/cmyers/gitrepos/patron/spec/support/test_server.rb
  283 /home/cmyers/gitrepos/patron/spec/spec_helper.rb
  284 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/base64.rb
  285 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/mocking/with_rspec.rb
  286 /home/cmyers/.rvm/gems/ruby-1.9.3-p385@patron/gems/rspec-core-2.7.1/lib/rspec/core/expecting/with_rspec.rb
  287 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/enc/trans/single_byte.so
  288 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/enc/utf_16le.so
  289 /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/enc/utf_16be.so

* Process memory map:

00400000-00401000 r-xp 00000000 08:11 7633748                            /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/bin/ruby
00600000-00601000 r--p 00000000 08:11 7633748                            /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/bin/ruby
00601000-00602000 rw-p 00001000 08:11 7633748                            /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/bin/ruby
0113d000-024e4000 rw-p 00000000 00:00 0                                  [heap]
7f18e0000000-7f18e0045000 rw-p 00000000 00:00 0
7f18e0045000-7f18e4000000 ---p 00000000 00:00 0
7f18e8000000-7f18e8054000 rw-p 00000000 00:00 0
7f18e8054000-7f18ec000000 ---p 00000000 00:00 0
7f18ec000000-7f18ec040000 rw-p 00000000 00:00 0
7f18ec040000-7f18f0000000 ---p 00000000 00:00 0
7f18f0000000-7f18f007b000 rw-p 00000000 00:00 0
7f18f007b000-7f18f4000000 ---p 00000000 00:00 0
7f18f78e0000-7f18f78e1000 rw-p 00000000 00:00 0
7f18f78e1000-7f18f78f6000 r-xp 00000000 08:11 3146010                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f18f78f6000-7f18f7af5000 ---p 00015000 08:11 3146010                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f18f7af5000-7f18f7af6000 r--p 00014000 08:11 3146010                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f18f7af6000-7f18f7af7000 rw-p 00015000 08:11 3146010                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f18f7af7000-7f18f7af8000 ---p 00000000 00:00 0
7f18f7af8000-7f18f7c79000 rw-p 00000000 00:00 0
7f18f7c7b000-7f18f7c7c000 ---p 00000000 00:00 0
7f18f7c7c000-7f18f7dfd000 rw-p 00000000 00:00 0
7f18f7dfd000-7f18f7dfe000 ---p 00000000 00:00 0
7f18f7dfe000-7f18f7f7f000 rw-p 00000000 00:00 0
7f18f7f7f000-7f18f7f80000 ---p 00000000 00:00 0
7f18f7f80000-7f18f8000000 rw-p 00000000 00:00 0
7f18f8000000-7f18f8082000 rw-p 00000000 00:00 0
7f18f8082000-7f18fc000000 ---p 00000000 00:00 0
7f18fc000000-7f18fc080000 rw-p 00000000 00:00 0
7f18fc080000-7f1900000000 ---p 00000000 00:00 0
7f1900000000-7f190008b000 rw-p 00000000 00:00 0
7f190008b000-7f1904000000 ---p 00000000 00:00 0
7f1904000000-7f1904051000 rw-p 00000000 00:00 0
7f1904051000-7f1908000000 ---p 00000000 00:00 0
7f1908000000-7f190805f000 rw-p 00000000 00:00 0
7f190805f000-7f190c000000 ---p 00000000 00:00 0
7f190c000000-7f190c088000 rw-p 00000000 00:00 0
7f190c088000-7f1910000000 ---p 00000000 00:00 0
7f1910000000-7f191006b000 rw-p 00000000 00:00 0
7f191006b000-7f1914000000 ---p 00000000 00:00 0
7f1914000000-7f1914083000 rw-p 00000000 00:00 0
7f1914083000-7f1918000000 ---p 00000000 00:00 0
7f1918000000-7f1918066000 rw-p 00000000 00:00 0
7f1918066000-7f191c000000 ---p 00000000 00:00 0
7f191c000000-7f191c021000 rw-p 00000000 00:00 0
7f191c021000-7f1920000000 ---p 00000000 00:00 0
7f1920000000-7f1920062000 rw-p 00000000 00:00 0
7f1920062000-7f1924000000 ---p 00000000 00:00 0
7f192400b000-7f192410c000 rw-p 00000000 00:00 0
7f192410d000-7f192410e000 ---p 00000000 00:00 0
7f192410e000-7f192428f000 rw-p 00000000 00:00 0
7f192428f000-7f1924290000 ---p 00000000 00:00 0
7f1924290000-7f1924411000 rw-p 00000000 00:00 0
7f1924411000-7f1924412000 ---p 00000000 00:00 0
7f1924412000-7f1924593000 rw-p 00000000 00:00 0
7f1924593000-7f1924594000 ---p 00000000 00:00 0
7f1924594000-7f1924715000 rw-p 00000000 00:00 0
7f1924715000-7f1924716000 ---p 00000000 00:00 0
7f1924716000-7f1924897000 rw-p 00000000 00:00 0
7f1924897000-7f1924898000 ---p 00000000 00:00 0
7f1924898000-7f1924a19000 rw-p 00000000 00:00 0
7f1924a19000-7f1924a1a000 r-xp 00000000 08:11 7634395                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/enc/utf_16be.so
7f1924a1a000-7f1924c1a000 ---p 00001000 08:11 7634395                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/enc/utf_16be.so
7f1924c1a000-7f1924c1b000 r--p 00001000 08:11 7634395                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/enc/utf_16be.so
7f1924c1b000-7f1924c1c000 rw-p 00002000 08:11 7634395                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/enc/utf_16be.so
7f1924c1c000-7f1924c1d000 r-xp 00000000 08:11 7634385                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/enc/utf_16le.so
7f1924c1d000-7f1924e1c000 ---p 00001000 08:11 7634385                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/enc/utf_16le.so
7f1924e1c000-7f1924e1d000 r--p 00000000 08:11 7634385                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/enc/utf_16le.so
7f1924e1d000-7f1924e1e000 rw-p 00001000 08:11 7634385                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/enc/utf_16le.so
7f1924e1e000-7f1924e1f000 ---p 00000000 00:00 0
7f1924e1f000-7f1924fa0000 rw-p 00000000 00:00 0
7f1924fa0000-7f1924fa1000 ---p 00000000 00:00 0
7f1924fa1000-7f1925122000 rw-p 00000000 00:00 0
7f1925122000-7f1925138000 r-xp 00000000 08:11 7634370                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/enc/trans/single_byte.so
7f1925138000-7f1925337000 ---p 00016000 08:11 7634370                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/enc/trans/single_byte.so
7f1925337000-7f192533c000 r--p 00015000 08:11 7634370                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/enc/trans/single_byte.so
7f192533c000-7f192533d000 rw-p 0001a000 08:11 7634370                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/enc/trans/single_byte.so
7f192533d000-7f192533e000 ---p 00000000 00:00 0
7f192533e000-7f19254bf000 rw-p 00000000 00:00 0
7f19254bf000-7f19254c0000 ---p 00000000 00:00 0
7f19254c0000-7f1925742000 rw-p 00000000 00:00 0
7f1925742000-7f1925743000 r-xp 00000000 08:11 7634414                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/digest/md5.so
7f1925743000-7f1925942000 ---p 00001000 08:11 7634414                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/digest/md5.so
7f1925942000-7f1925943000 r--p 00000000 08:11 7634414                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/digest/md5.so
7f1925943000-7f1925944000 rw-p 00001000 08:11 7634414                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/digest/md5.so
7f1925944000-7f1925950000 r-xp 00000000 08:11 3146249                    /lib/x86_64-linux-gnu/libnss_files-2.15.so
7f1925950000-7f1925b4f000 ---p 0000c000 08:11 3146249                    /lib/x86_64-linux-gnu/libnss_files-2.15.so
7f1925b4f000-7f1925b50000 r--p 0000b000 08:11 3146249                    /lib/x86_64-linux-gnu/libnss_files-2.15.so
7f1925b50000-7f1925b51000 rw-p 0000c000 08:11 3146249                    /lib/x86_64-linux-gnu/libnss_files-2.15.so
7f1925b51000-7f1925b83000 r-xp 00000000 08:11 7634353                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/date_core.so
7f1925b83000-7f1925d83000 ---p 00032000 08:11 7634353                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/date_core.so
7f1925d83000-7f1925d84000 r--p 00032000 08:11 7634353                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/date_core.so
7f1925d84000-7f1925d85000 rw-p 00033000 08:11 7634353                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/date_core.so
7f1925d85000-7f1925d87000 rw-p 00000000 00:00 0
7f1925d87000-7f1925da6000 r-xp 00000000 08:11 4849742                    /home/cmyers/.rvm/usr/lib/libyaml-0.so.2.0.2
7f1925da6000-7f1925fa5000 ---p 0001f000 08:11 4849742                    /home/cmyers/.rvm/usr/lib/libyaml-0.so.2.0.2
7f1925fa5000-7f1925fa6000 r--p 0001e000 08:11 4849742                    /home/cmyers/.rvm/usr/lib/libyaml-0.so.2.0.2
7f1925fa6000-7f1925fa7000 rw-p 0001f000 08:11 4849742                    /home/cmyers/.rvm/usr/lib/libyaml-0.so.2.0.2
7f1925fa7000-7f1925fad000 r-xp 00000000 08:11 7634423                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/psych.so
7f1925fad000-7f19261ac000 ---p 00006000 08:11 7634423                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/psych.so
7f19261ac000-7f19261ad000 r--p 00005000 08:11 7634423                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/psych.so
7f19261ad000-7f19261ae000 rw-p 00006000 08:11 7634423                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/x86_64-linux/psych.so
7f19261ae000-7f192624c000 r-xp 00000000 08:11 6029414                    /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7f192624c000-7f192644c000 ---p 0009e000 08:11 6029414                    /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7f192644c000-7f192644e000 r--p 0009e000 08:11 6029414                    /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7f192644e000-7f1926450000 rw-p 000a0000 08:11 6029414                    /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7f1926450000-7f1926451000 rw-p 00000000 00:00 0
7f1926451000-7f1926496000 r-xp 00000000 08:11 6029866                    /usr/lib/x86_64-linux-gnu/libhx509.so.5.0.0
7f1926496000-7f1926696000 ---p 00045000 08:11 6029866                    /usr/lib/x86_64-linux-gnu/libhx509.so.5.0.0
7f1926696000-7f1926698000 r--p 00045000 08:11 6029866                    /usr/lib/x86_64-linux-gnu/libhx509.so.5.0.0
7f1926698000-7f192669a000 rw-p 00047000 08:11 6029866                    /usr/lib/x86_64-linux-gnu/libhx509.so.5.0.0
7f192669a000-7f192669b000 rw-p 00000000 00:00 0
7f192669b000-7f19266a9000 r-xp 00000000 08:11 6029429                    /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0
7f19266a9000-7f19268a8000 ---p 0000e000 08:11 6029429                    /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0
7f19268a8000-7f19268a9000 r--p 0000d000 08:11 6029429                    /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0
7f19268a9000-7f19268aa000 rw-p 0000e000 08:11 6029429                    /usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0
7f19268aa000-7f19268d2000 r-xp 00000000 08:11 6029540                    /usr/lib/x86_64-linux-gnu/libwind.so.0.0.0
7f19268d2000-7f1926ad1000 ---p 00028000 08:11 6029540                    /usr/lib/x86_64-linux-gnu/libwind.so.0.0.0
7f1926ad1000-7f1926ad2000 r--p 00027000 08:11 6029540                    /usr/lib/x86_64-linux-gnu/libwind.so.0.0.0
7f1926ad2000-7f1926ad3000 rw-p 00028000 08:11 6029540                    /usr/lib/x86_64-linux-gnu/libwind.so.0.0.0
7f1926ad3000-7f1926ad6000 r-xp 00000000 08:11 3145816                    /lib/x86_64-linux-gnu/libkeyutils.so.1.4
7f1926ad6000-7f1926cd5000 ---p 00003000 08:11 3145816                    /lib/x86_64-linux-gnu/libkeyutils.so.1.4
7f1926cd5000-7f1926cd6000 r--p 00002000 08:11 3145816                    /lib/x86_64-linux-gnu/libkeyutils.so.1.4
7f1926cd6000-7f1926cd7000 rw-p 00003000 08:11 3145816                    /lib/x86_64-linux-gnu/libkeyutils.so.1.4
7f1926cd7000-7f1926cda000 r-xp 00000000 08:11 3145875                    /lib/x86_64-linux-gnu/libgpg-error.so.0.8.0
7f1926cda000-7f1926ed9000 ---p 00003000 08:11 3145875                    /lib/x86_64-linux-gnu/libgpg-error.so.0.8.0
7f1926ed9000-7f1926eda000 r--p 00002000 08:11 3145875                    /lib/x86_64-linux-gnu/libgpg-error.so.0.8.0
7f1926eda000-7f1926edb000 rw-p 00003000 08:11 3145875                    /lib/x86_64-linux-gnu/libgpg-error.so.0.8.0
7f1926edb000-7f1926eec000 r-xp 00000000 08:11 6030217                    /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.0.0
7f1926eec000-7f19270eb000 ---p 00011000 08:11 6030217                    /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.0.0
7f19270eb000-7f19270ec000 r--p 00010000 08:11 6030217                    /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.0.0
7f19270ec000-7f19270ed000 rw-p 00011000 08:11 6030217                    /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.0.0
7f19270ed000-7f19270fd000 r-xp 00000000 08:11 6029937                    /usr/lib/x86_64-linux-gnu/libtasn1.so.3.1.12

#... snip
7f192d0df000-7f192d2f7000 r-xp 00000000 08:11 7633749                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/libruby.so.1.9.1
7f192d2f7000-7f192d4f6000 ---p 00218000 08:11 7633749                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/libruby.so.1.9.1
7f192d4f6000-7f192d4fb000 r--p 00217000 08:11 7633749                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/libruby.so.1.9.1
7f192d4fb000-7f192d4ff000 rw-p 0021c000 08:11 7633749                    /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/lib/libruby.so.1.9.1
7f192d4ff000-7f192d51b000 rw-p 00000000 00:00 0
7f192d51b000-7f192d53d000 r-xp 00000000 08:11 3146242                    /lib/x86_64-linux-gnu/ld-2.15.so
7f192d58a000-7f192d58b000 ---p 00000000 00:00 0
7f192d58b000-7f192d711000 rw-p 00000000 00:00 0
7f192d730000-7f192d737000 r--s 00000000 08:11 6450915                    /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache
7f192d737000-7f192d738000 ---p 00000000 00:00 0
7f192d738000-7f192d73d000 rw-p 00000000 00:00 0
7f192d73d000-7f192d73e000 r--p 00022000 08:11 3146242                    /lib/x86_64-linux-gnu/ld-2.15.so
7f192d73e000-7f192d740000 rw-p 00023000 08:11 3146242                    /lib/x86_64-linux-gnu/ld-2.15.so
7fff625fe000-7fff62620000 rw-p 00000000 00:00 0                          [stack]
7fff62776000-7fff62777000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]


[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

rake aborted!
ruby /home/cmyers/.rvm/rubies/ruby-1.9.3-p385/bin/ruby -S rspec --colour --format progress spec/response_spec.rb spec/request_spec.rb spec/util_spec.rb spec/patron_spec.rb spec/session_spec.rb failed

Tasks: TOP => spec
(See full trace by running task with --trace)

This may be related to issue #65?

Installation on Ubuntu 10.04 with ruby 1.9.3-p215 fails

I get the following error:

Building native extensions.  This could take a while...
ERROR:  Error installing patron:
    ERROR: Failed to build gem native extension.

        /home/apps/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb
checking for curl-config... yes
checking for rb_thread_blocking_region()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/home/apps/.rvm/rubies/ruby-1.9.3-p125/bin/ruby
    --with-curl-dir
    --without-curl-dir
    --with-curl-include
    --without-curl-include=${curl-dir}/include
    --with-curl-lib
    --without-curl-lib=${curl-dir}/lib
/home/apps/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from /home/apps/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:461:in `try_link0'
    from /home/apps/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:476:in `try_link'
    from /home/apps/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:619:in `try_func'
    from /home/apps/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:894:in `block in have_func'
    from /home/apps/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
    from /home/apps/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
    from /home/apps/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:254:in `open'
    from /home/apps/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
    from /home/apps/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:254:in `open'
    from /home/apps/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
    from /home/apps/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
    from /home/apps/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:893:in `have_func'
    from extconf.rb:46:in `<main>'

And mkmf.log looks like this:

find_executable: checking for curl-config... -------------------- yes

--------------------

"gcc -o conftest -I/home/apps/.rvm/rubies/ruby-1.9.3-p125/include/ruby-1.9.1/x86_64-linux -I/home/apps/.rvm/rubies/ruby-1.9.3-p125/include/ruby-1.9.1/ruby/backward -I/home/apps/.rvm/rubies/ruby-1.9.3-p125/include/ruby-1.9.1 -I. -I/home/apps/.rvm/usr/include     -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration  -fPIC  -pedantic -Wall conftest.c  -L. -L/home/apps/.rvm/rubies/ruby-1.9.3-p125/lib -Wl,-R/home/apps/.rvm/rubies/ruby-1.9.3-p125/lib -L/home/apps/.rvm/usr/lib -Wl,-R/home/apps/.rvm/usr/lib -L.  -rdynamic -Wl,-export-dynamic     -Wl,-R -Wl,/home/apps/.rvm/rubies/ruby-1.9.3-p125/lib -L/home/apps/.rvm/rubies/ruby-1.9.3-p125/lib -lruby  -lpthread -lrt -ldl -lcrypt -lm   -lc -lcurl"
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `X509_STORE_set_flags@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `PKCS12_parse@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `X509V3_EXT_print@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `ENGINE_init@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `MD4_Final@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `ERR_remove_state@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `ENGINE_get_id@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `ENGINE_free@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `DES_set_key@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `X509_get_ext_d2i@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `ASN1_STRING_to_UTF8@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_get_verify_result@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_CTX_add_client_CA@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_get_peer_cert_chain@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_CTX_set_cipher_list@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `ENGINE_load_private_key@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `X509_NAME_get_index_by_NID@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `DES_set_odd_parity@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `ENGINE_finish@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_SESSION_free@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `X509_free@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `GENERAL_NAMES_free@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_get_current_cipher@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `X509_EXTENSION_get_critical@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_CTX_new@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_CTX_callback_ctrl@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_pending@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `i2t_ASN1_OBJECT@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `sk_value@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `RAND_add@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `EVP_PKEY_free@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `X509_get_pubkey@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `EVP_PKEY_copy_parameters@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_CTX_set_verify@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `X509_verify_cert_error_string@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_new@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `UI_OpenSSL@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `MD5_Final@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_get_error@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `ERR_get_error@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `X509_load_crl_file@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `ASN1_STRING_data@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `ENGINE_by_id@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_write@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `X509_check_issued@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `MD4_Update@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `ASN1_STRING_type@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_get_privatekey@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `CRYPTO_free@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_load_error_strings@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_CTX_free@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `ASN1_STRING_length@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSLeay@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_CTX_load_verify_locations@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `X509_NAME_get_entry@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `BIO_ctrl@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `d2i_PKCS12_fp@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `ERR_error_string@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSLv3_client_method@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `X509_NAME_print_ex@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_ctrl@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `ASN1_STRING_print@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `ENGINE_get_first@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `ERR_error_string_n@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_free@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_CTX_use_certificate_file@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_CTX_use_PrivateKey_file@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `X509_EXTENSION_get_object@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_set_session@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `BIO_free@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `BIO_new@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `RAND_egd@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `RAND_bytes@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `X509_get_subject_name@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_shutdown@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `MD4_Init@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `TLSv1_client_method@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `PKCS12_PBE_add@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_get1_session@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `BN_num_bits@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `PKCS12_free@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSLv2_client_method@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `BN_bn2bin@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `sk_num@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `ENGINE_set_default@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_CTX_use_PrivateKey@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `MD5_Update@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `PEM_write_bio_X509@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `BIO_s_mem@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `ERR_free_strings@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `ENGINE_get_next@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_CTX_set_default_passwd_cb@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `EVP_cleanup@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_CTX_check_private_key@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `OPENSSL_add_all_algorithms_noconf@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `X509_STORE_CTX_get_current_cert@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `MD5_Init@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSLv23_client_method@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_read@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_CTX_ctrl@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_CTX_use_certificate_chain_file@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_set_connect_state@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `X509_get_serialNumber@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_get_peer_certificate@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_CTX_use_certificate@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `PEM_read_X509@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_peek@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `RAND_load_file@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `RAND_file_name@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_set_fd@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_CIPHER_get_name@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `X509_get_issuer_name@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `CRYPTO_malloc@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `ENGINE_load_builtin_engines@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `DES_ecb_encrypt@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_CTX_set_default_passwd_cb_userdata@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `X509_NAME_ENTRY_get_data@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `X509_LOOKUP_file@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_library_init@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_get_certificate@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `RAND_status@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `ASN1_INTEGER_get@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `X509_STORE_add_lookup@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_connect@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `CRYPTO_cleanup_all_ex_data@OPENSSL_0.9.8'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libcurl.so: undefined reference to `SSL_get_shutdown@OPENSSL_0.9.8'
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main() {return 0;}
/* end */

Installation with ree on the same machine succeeds, tho.

GET requests with body not supported

GET requests with body are unusual, but they are allowed (so I've heard, I couldn't find relevant quote from the HTTP spec).

Patron silently discards the body of a GET request. Proof:

require 'patron'

session = Patron::Session.new
response = session.request :get,
  'http://localhost:4567/echo',
  {'Content-type'=>'application/x-www-form-urlencoded'},
  :data => 'name=mislav'

p response.body
# server reports that there was no request body!

Posting an Int (Fixnum) causes Patron to segfault.

I use Patron as part of a Rest API automated testing suite and I recently noticed that a change we made caused some bare ints to get passed to a Post which caused the suite to segfault. Our tester just worked around it by forcing the values to Strings before passing them, but this seems like it's probably a problem?

I didn't see any other tickets on it, but I guess it could be related to #51

Simple steps to repro:

require 'patron'
@session = Patron::Session.new
@session.base_url = 'http://localhost/'
@session.post 'test', '1'
@session.post 'test', 1

Here's how it dies when run in irb:

1.9.3p194 :001 > require 'patron'
 => true
1.9.3p194 :002 > @session = Patron::Session.new
 => #<Patron::Session:0x007f8d74b53188>
1.9.3p194 :003 > @session.base_url = 'http://localhost/'
 => "http://localhost/"
1.9.3p194 :004 > @session.post 'test', '1'
 => #<Patron::Response @status_line='HTTP/1.1 404 Not Found'> 
1.9.3p194 :005 > @session.post 'test', 1

/Users/bhaberer/.rvm/gems/ruby-1.9.3-p194/gems/patron-0.4.18/lib/patron/session.rb:223: [BUG] Segmentation fault
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.2.0]

-- Ruby level backtrace information ----------------------------------------
/Users/bhaberer/.rvm/rubies/ruby-1.9.3-p194/bin/irb:16:in `<main>'
/Users/bhaberer/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:69:in `start'
/Users/bhaberer/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:69:in `catch'
/Users/bhaberer/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:70:in `block in start'
/Users/bhaberer/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:155:in `eval_input'
/Users/bhaberer/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in `each_top_level_statement'
/Users/bhaberer/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in `catch'
/Users/bhaberer/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `block in each_top_level_statement'
/Users/bhaberer/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `loop'
/Users/bhaberer/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/ruby-lex.rb:243:in `block (2 levels) in each_top_level_statement'
/Users/bhaberer/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:156:in `block in eval_input'
/Users/bhaberer/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:273:in `signal_status'
/Users/bhaberer/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb.rb:159:in `block (2 levels) in eval_input'
/Users/bhaberer/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/context.rb:254:in `evaluate'
/Users/bhaberer/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/workspace.rb:80:in `evaluate'
/Users/bhaberer/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/workspace.rb:80:in `eval' (irb):4:in `irb_binding'
/Users/bhaberer/.rvm/gems/ruby-1.9.3-p194/gems/patron-0.4.18/lib/patron/session.rb:163:in `post'
/Users/bhaberer/.rvm/gems/ruby-1.9.3-p194/gems/patron-0.4.18/lib/patron/session.rb:223:in `request'
/Users/bhaberer/.rvm/gems/ruby-1.9.3-p194/gems/patron-0.4.18/lib/patron/session.rb:223:in `handle_request'

I know that the docs state that 'Uploads the passed data to the specified url using HTTP POST. data must be a string.' But a segfault seems to be a bit rough.

Let me know if you need any additional info from the segfaults, or if I'm just doing something wrong.

installation on debian fails

When trying to install it on a Debian Lenny box (either with libcurl4-gnutls-dev or libcurl4-openssl-dev installed) I get the following error:

Building native extensions. This could take a while...
ERROR: Error installing patron:
ERROR: Failed to build gem native extension.

/usr/local/rvm/rubies/ruby-1.9.2-p136/bin/ruby extconf.rb
checking for curl-config... yes
checking for rb_thread_blocking_region()... yes
creating Makefile

make
gcc -I. -I/usr/local/rvm/rubies/ruby-1.9.2-p136/include/ruby-1.9.1/x86_64-linux -I/usr/local/rvm/rubies/ruby-1.9.2-p136/include/ruby-1.9.1/ruby/backward -I/usr/local/rvm/rubies/ruby-1.9.2-p136/include/ruby-1.9.1 -I. -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_TBR -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -Wall -o session_ext.o -c session_ext.c
session_ext.c: In function ‘libcurl_version’:
session_ext.c:106: warning: unused parameter ‘klass’
session_ext.c: In function ‘set_options_from_request’:
session_ext.c:234: warning: passing argument 2 of ‘open_file’ discards qualifiers from pointer target type
session_ext.c:267: warning: passing argument 2 of ‘open_file’ discards qualifiers from pointer target type
session_ext.c: In function ‘set_debug_file’:
session_ext.c:484: warning: passing argument 2 of ‘open_file’ discards qualifiers from pointer target type
session_ext.c: In function ‘Init_session_ext’:
session_ext.c:531: error: ‘CURLPROXY_HTTP_1_0’ undeclared (first use in this function)
session_ext.c:531: error: (Each undeclared identifier is reported only once
session_ext.c:531: error: for each function it appears in.)
make: *** [session_ext.o] Error 1

any hint??

Threading Issue (0.4.6)

I am trying to use Patron for benchmarking an app, and have come across a threading issue which I believe was introduced in the fix for issue #10 (change 3d8b8e0).

The script I am using to test this is as follows: http://gist.github.com/360176

With 0.4.4 (under Ruby 1.9.1-p378) it takes around 0m0.394s to run. However 0.4.6 takes around 0m8.950s. There is a noticeable delay of threads being started.

Header values are all prefixed with a space

Not sure if you mean to have that or not, but all the values of headers all include the space after the :.

 >> s = Patron::Session.new
 >> r = s.get("http://patron.rubyforge.org")
 >> puts r.headers['Content-Length'].inspect
 " 627"

specs fail with "couldn't connect to host"

Almost all the specs are failed with "couldn't connect to host" but curl it self works fine.

Ubuntu 9.10
curl 7.19.5 (i486-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz

Same on CentOS:
curl 7.19.7 (i686-redhat-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 libssh2/0.17

Support PATCH verb

I've tried adding :patch to Patron::Request::VALID_ACTIONS and Patron is able to make a PATCH request after that, but it seems it doesn't send POST params right.

incompatible with sequel

I am working on a project that uses ruby sequel to connect to the database.
I have run into an issue where if I require patron in the project, I cannot connect to the
database with sequel.

Here is an example:

This works:
require 'mysql'
require 'sequel'
DB = Sequel.connect('mysql://root@localhost/test123')

When I simply include patron, I get an error
require 'patron'
require 'mysql'
require 'sequel'
DB = Sequel.connect('mysql://root@localhost/test123')

/opt/ruby-1.9.1-p243/lib/ruby/gems/1.9.1/gems/sequel-3.4.0/lib/sequel/
core.rb:184:in require': can't convert Pathname into String (TypeError) from /opt/ruby-1.9.1-p243/lib/ruby/gems/1.9.1/gems/sequel-3.4.0/lib/ sequel/core.rb:184:inblock in require'
from /opt/ruby-1.9.1-p243/lib/ruby/gems/1.9.1/gems/sequel-3.4.0/lib/
sequel/core.rb:184:in each' from /opt/ruby-1.9.1-p243/lib/ruby/gems/1.9.1/gems/sequel-3.4.0/lib/ sequel/core.rb:184:inrequire'
from /opt/ruby-1.9.1-p243/lib/ruby/gems/1.9.1/gems/sequel-3.4.0/lib/
sequel/core.rb:335:in <module:Sequel>' from /opt/ruby-1.9.1-p243/lib/ruby/gems/1.9.1/gems/sequel-3.4.0/lib/ sequel/core.rb:61:in<top (required)>'
from /opt/ruby-1.9.1-p243/lib/ruby/gems/1.9.1/gems/sequel-3.4.0/lib/
sequel/model.rb:1:in require' from /opt/ruby-1.9.1-p243/lib/ruby/gems/1.9.1/gems/sequel-3.4.0/lib/ sequel/model.rb:1:in<top (required)>'
from /opt/ruby-1.9.1-p243/lib/ruby/gems/1.9.1/gems/sequel-3.4.0/lib/
sequel.rb:1:in require' from /opt/ruby-1.9.1-p243/lib/ruby/gems/1.9.1/gems/sequel-3.4.0/lib/ sequel.rb:1:in<top (required)>'
from test.rb:3:in require' from test.rb:3:in

'

I looked through the patron code and I couldn't spot anything that was overriding core classes or doing anything interesting.

Any suggestions on figuring this one out? I have also posted this on the sequel mailing list to see if they have any ideas.

-Dusty

How to Include options to a patron session

I'm having some troubles trying to access to a ssl server. This is what patron.debug throws:

* Hostname was NOT found in DNS cache
*   Trying 216.33.197.77...
* Connected to api.mercadolibre.com (216.33.197.77) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* Operation timed out after 0 milliseconds with 0 out of 0 bytes received
* Closing connection 0

Trying to do the same call with curl happens the same

curl -v https://api.mercadolibre.com
* Hostname was NOT found in DNS cache
*   Trying 216.33.197.77...
* Connected to api.mercadolibre.com (216.33.197.77) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* Unknown SSL protocol error in connection to api.mercadolibre.com:443 
* Closing connection 0
curl: (35) Unknown SSL protocol error in connection to api.mercadolibre.com:443

It seems to be a known bug in curl and I upgrade from 7.35 to 7.36 but I had no luck. Then I found if I add -sslv3 it works:

curl -sslv3 -v https://api.mercadolibre.com
* Hostname was NOT found in DNS cache
*   Trying 216.33.197.77...
* Connected to api.mercadolibre.com (216.33.197.77) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using SSLv3 / AES128-SHA
* Server certificate:
*        subject: serialNumber=VspctO3tGWuA2Vrk6pOlXRPFUPIFkegt; C=AR; ST=Buenos Aires; L=Ciudad de Buenos Aires; O=Mercadolibre Inc; OU=IT; CN=api.mercadolibre.com
*        start date: 2014-07-30 01:02:46 GMT
*        expire date: 2016-08-31 15:59:50 GMT
*        subjectAltName: api.mercadolibre.com matched
*        issuer: C=US; O=GeoTrust, Inc.; CN=GeoTrust SSL CA
*        SSL certificate verify ok.
> GET / HTTP/1.1
> User-Agent: curl/7.36.0
> Host: api.mercadolibre.com
> Accept: */*
> 
< HTTP/1.1 301 Moved Permanently
< Date: Thu, 23 Oct 2014 20:58:22 GMT
< Content-Type: text/html
< Content-Length: 184
< Connection: keep-alive
< Location: http://developers.mercadolibre.com
< X-GAV: master
< X-Nginx-Host: e-00003f77
< X-Request-Id: eed5c2de-5eae-4576-a434-de04556ade54
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Headers: Content-Type
< Access-Control-Allow-Methods: PUT, GET, POST, DELETE, OPTIONS
< Access-Control-Max-Age: 86400
< 
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.4.1</center>
</body>
</html>

Is there a way to include this sslv3 option into my patron session?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.