28 Commits

Author SHA1 Message Date
Hawk Newton
565b2a49af Make multipart boundary unique (#673)
* Make multipart boundary unique

* Use a distinct connection each time
2017-03-03 11:24:37 +01:00
Leon Miller-Out
a712938071 Fix Ruby 1.9.3 tests on Travis. Drop support for Ruby 1.8.7. (#600)
* Drop support for Ruby 1.9.2, which no-one should be using any more.

* Constraint gem versions for Ruby 1.9.3

* Drop support for Ruby 1.8.7. Many dependencies have dropped support for it.

* Remove conditionals checking for Ruby 1.8.7

* Document Ruby version dependency
2016-08-26 21:45:28 +01:00
Lloyd
4488ce523e fix multipart post for servers that choke on Content-Type
Some servers such as Exchange 2010 don't like that there isn't a space
after a semicolon separator in the Content-Type request header. Since
Net::HTTPHeader#set_content_type adds the space, as well as it appearing
in the examples of RFC 2616, this follows suit and adds a space which
should help bad-behaving servers and not harm others.
2013-07-12 13:01:03 +02:00
Mislav Marohnić
872b45a781 configure script/test to not tolerate Ruby warnings
This makes CI fail if code is added to the project that generates
warnings in Ruby's verbose mode.
2013-06-25 05:55:26 +02: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
technoweenie
04a8514cba Response#env is always an Env 2012-10-21 15:41:56 -06:00
technoweenie
fa397470e2 simplify test requires 2012-10-21 10:25:34 -06:00
Bob Aman
ab2a855658 Introduces a parameter encoder option to connections.
Allows parameter encoding behavior to be overridden.
Fixes technoweenie/faraday#182.
Based on sqrrrl/faraday@dc8409d4d5.
2012-10-15 18:03:12 +03:00
Mislav Marohnić
86925fd5d5 eliminate Ruby warnings 2012-01-19 16:07:09 +01:00
Mislav Marohnić
445152b164 escape square brackets in keys for nested query strings
Closes #82
2012-01-02 19:23:50 +01:00
Mislav Marohnić
c78cb61ef1 ensure no regex warnings about UTF-8 strings
This is a cherry-pick of 3dddbfcd776930910d065744517394565339ec2f

References #95
2012-01-02 19:10:17 +01:00
Mislav Marohnić
db554b2926 remove JSON request middleware 2011-12-29 14:22:07 +01:00
Mislav Marohnić
0d517cda5f remove Rack dependency 2011-12-29 02:01:05 +01:00
kookster
0e4a05242d Add recursive search through request to see if it is multi-part, with test. 2011-12-15 18:19:05 -05:00
Rhett Sutphin
f87ea6e636 Raise an error if JSON encoding adapters are missing 2011-06-27 17:34:14 +02:00
Erik Michaels-Ober
706468e70f Don't use symbol to proc in tests so that they'll run on Ruby 1.8.6 2011-05-14 19:24:23 -07:00
Mislav Marohnić
d6d86dd043 extract multipart stuff from Adapter to Request::Multipart middleware 2011-03-26 21:20:21 +01:00
Mislav Marohnić
862c98344f JSON and UrlEncoded request middleware now encode body conditionally
These middleware now pay attention to "Content-Type" of the request.
Each will only encode the body if the content-type value matches.

When a body is present but no Content-Type, the middleware higher on
the stack will use its encoding.

This makes it possible to keep both middlewares on the stack and choose
encoding type by Content-Type switching.
2011-03-26 21:20:21 +01:00
Mislav Marohnić
37542f953a add Request::UrlEncoded middleware for "x-www-form-urlencoded" posts 2011-03-26 21:20:18 +01:00
Mislav Marohnić
401d712987 new ":json" middleware replaces :yajl and :active_support_json
"JSON" middleware will use either Yajl or ActiveSupport::JSON,
whichever happens to load successfully (with a preference for Yajl).
2011-03-26 21:18:29 +01:00
Mislav Marohnić
20eee87486 warn if some modules haven't loaded in tests 2011-03-26 21:16:42 +01:00
rick
7d12ed5ddb Faraday.new shortcut 2011-02-27 10:20:18 -08:00
Erik Michaels-Ober
bfae62f840 Cleanup EOL whitespace 2010-10-08 12:33:09 -07:00
rick
61de2b9db6 test that json request middleware sets req headers 2010-10-04 13:51:41 -07:00
rick
f3c927c451 finished conversion, tests pass on 1.8.x and 1.9.1 2010-02-18 14:04:14 -08:00
rick
57dfcfcb11 convert dynamic adapter tests to test/unit 2010-02-18 13:49:00 -08:00
rick
a47c6066fa remove dependency on context 2010-02-18 13:33:50 -08:00
rick
67d619d780 rename Alice => Faraday. 2010-01-12 17:03:34 -08:00