424 Commits

Author SHA1 Message Date
Jason Garber
c328e5285a Fix #93 again: ActiveSupport::SafeBuffer#gsub bug 2013-06-24 11:03:39 -04:00
rick
2c5bf666b3 fix Faraday::Options#update 2013-06-22 17:24:52 -07:00
Erik Michaels-Ober
60842fac4e Add missing word, cut in e42a21a697950b55ad7646bcd7e4ec787138b3dd 2013-05-20 06:54:49 -07:00
Erik Michaels-Ober
e42a21a697 Remove comment made false by 7aeda79760e6538873e897fd5ce96e59dfe36557 2013-05-18 07:55:12 -07:00
rick
f4e3fc3440 Release 0.9.0.rc5 2013-05-13 15:21:10 -06:00
rick
ab13cac5d5 expose false options in Faraday::Options#to_hash 2013-05-13 15:21:05 -06:00
rick
50023ad11d Release 0.9.0.rc4 2013-05-13 15:18:40 -06:00
rick
cf5e8a691f teach Faraday::Options about merge! 2013-05-13 15:14:51 -06:00
rick
615516bbb5 allow initializing of Faraday::Options with falsey values 2013-05-13 15:14:51 -06:00
rick
eb2a411cd0 Release 0.9.0.rc3 2013-05-13 14:41:08 -06:00
rick
7cdff322cf respect Faraday::RequestOptions#params_encoder
Fixes #269
2013-05-13 14:38:14 -06:00
rick
3a9e033d00 auto load authorization middlewhere when possible 2013-05-13 14:30:18 -06:00
rick
e35819bbec Release 0.9.0.rc2 2013-05-13 13:32:06 -06:00
rick
01b9fd390a don't need this extra method laying around 2013-05-13 13:29:29 -06:00
rick
7aeda79760 don't need to chomp that last / off
Fixes #212
2013-05-13 13:27:39 -06:00
rick
5af44c90e1 stop testing with Connection#build_url since nothing uses it 2013-05-13 13:26:28 -06:00
risk danger olson
f94f30f1bf allow Utils.default_uri_parser to take a URI object that responds to #parse 2013-05-08 09:01:07 -06:00
risk danger olson
c24a02c73b make the default uri parser configurable 2013-05-08 08:43:28 -06:00
risk danger olson
63b8a1d977 EM Synchrony should use Utils::URI 2013-05-08 08:37:39 -06:00
risk danger olson
baac8f0aab Release 0.9.0.rc1 2013-05-08 08:10:41 -06:00
Erik Michaels-Ober
2c7da3bea6 Merge pull request #261 from ajsharp/patch-1
remove net_http_persistent todo
2013-05-06 21:42:44 -07:00
Vijay Ramesh
7b9d583b62 Reset Faraday.default_connection on Faraday.default_adapter update 2013-05-06 14:31:10 -07:00
Alex Sharp
9a077510b2 remove net_http_persistent todo
From the docs: "Multiple Net::HTTP::Persistent objects will share the same set of connections."

http://docs.seattlerb.org/net-http-persistent/Net/HTTP/Persistent.html
2013-04-25 12:31:20 -07:00
risk danger olson
c4d835493a Merge pull request #252 from leocassarani/constants-mutex
Make the @@constants Hash thread-safe by wrapping it in a Mutex
2013-04-17 09:07:16 -07:00
Mislav Marohnić
505587954f prevent Typhoeus from using "Expect: 100-continue" on PUT
It seems whether the request method for Typhoeus request is `:put` or
"PUT" decides whether it will use "Expect: 100-continue" when performing
that request. In our test suite, such PUTs would fail randomly against
WEBrick which doesn't have stable support for 100 Continue. This seems
to be a problem with WEBrick, not Typhoeus.

This also speeds up these requests, which WEBrick was slow to process
even if they've succeeded.

"Expect: 100-continue" is a mode where the client sends this header, but
doesn't send the body of the request until the server inspects the
headers and decides it wants to allow the request by sending
"HTTP/1.1 100 Continue" back.
2013-04-04 01:17:41 +02:00
Mislav Marohnić
d164dae907 fix Typhoeus proxy support 2013-04-04 01:17:41 +02:00
Mislav Marohnić
7a38f177dc fix net-http-persistent timeout detection on Ruby 2.0
Re-enable timeout test because drbrain/net-http-persistent#33 got fixed
in net-http-persistent 2.8
2013-04-02 21:41:58 +02:00
Leo Cassarani
76701fddb4 Make the @@constants Hash thread-safe by wrapping it in a Mutex
When multiple threads are creating instances of
Faraday::RackBuilder::Handler, the `@@constants` hash may exhibit
unexpected behaviour, as the Hash class is not thread-safe in Ruby.

This commit wraps all writes to `@@constants` in a Mutex, thereby
ensuring mutual exclusion.
2013-04-02 20:08:42 +01:00
Leo Cassarani
69096c0f1a Fix race conditions in Faraday::Utils::Headers
Faraday::Utils::Headers uses a shared 'KeyMap' hash to cache
symbol -> string mappings of HTTP header names. When multiple threads
are writing to the cache, race conditions may occur, as the Hash class
is not thread-safe in Ruby.

This commit adds a mutex to synchronize writes to the KeyMap hash.
2013-04-01 02:04:16 +01:00
Joe Pym
ca8c169072 fix escaping Unicode characters in Ruby 1.8.7
In Ruby 1.8, when you are operating with unicode encoding, \w includes
UTF-8 characters such as ☃. Faraday therefore does not escape these
correctly.

Closes #245
2013-03-24 18:07:11 +01:00
Mislav Marohnić
28653690c6 fix copy_stream test for Rubinius and JRuby 2013-02-25 03:02:46 +01:00
Mislav Marohnić
f619a5d334 fix file uploads with Ruby 2.0 net/http
Rewrite Faraday::CompositeReadIO because the one inherited from
multipart-post library doesn't behave well when used with
IO.copy_stream which net/http uses internally in Ruby 2.0.
2013-02-25 03:02:45 +01:00
rick
f6831b53b3 set a default user agent 2013-02-17 14:51:13 -07:00
Colin Jones
8f6a14685f Don't VERIFY_NONE when VERIFY_PEER is requested
Looks like a5e9485d inverted the logic on this.
2013-01-15 17:12:31 -06:00
Erik Michaels-Ober
0819790251 Don't redefine constants if they're already defined
Closes #233.
2013-01-10 11:22:55 -08:00
Lucas Mazza
abccadd2be Convert Env keys to symbols 2013-01-07 22:57:40 -02:00
technoweenie
c99350905d faraday/autoload requires faraday 2013-01-05 11:30:00 -07:00
technoweenie
4b30bf8b5e add instrumentation middleware. original work by @mislav
https://github.com/pengwynn/faraday_middleware/commit/23d5e614eea4f48dd5
a0eee68eb8b3d5e65b5275
2013-01-05 10:41:02 -07:00
Brian D. Burns
5d6faf7671 use Utils.normalize_path() for Stubs 2012-12-31 16:28:10 -07:00
Brian D. Burns
a27c952f5e move Connection.URI to Utils 2012-12-31 16:28:02 -07:00
Brian D. Burns
f24b1b373f handled in superclass 2012-12-31 16:26:20 -07:00
technoweenie
cc27ff9fb4 add Faraday::Builder warning 2012-12-30 11:47:48 -07:00
technoweenie
e63f490693 more ProxyOptions tests 2012-12-30 11:35:16 -07:00
technoweenie
ac1d9e4f36 Option method access 2012-12-30 11:27:30 -07:00
technoweenie
03504db53b allow you to set RequestOptions#proxy 2012-12-30 11:26:35 -07:00
technoweenie
aa8b420739 better Options inspect message 2012-12-30 11:19:49 -07:00
technoweenie
b38bc47b72 fix a few cases where the configured params encoder was not being used 2012-12-28 09:28:58 -07:00
technoweenie
b035bcb990 make NestedParamsEncoder the default in 0.9 2012-12-28 09:24:42 -07:00
technoweenie
af73cdddc5 revert back to FlatParamsEncoder as the default, but make it customizable 2012-12-28 08:43:36 -07:00
technoweenie
0431614bfe require monitor lazily 2012-12-28 02:06:46 -07:00