1
0
Fork 0
mirror of https://github.com/rest-client/rest-client.git synced 2022-11-09 13:49:40 -05:00
Commit graph

20 commits

Author SHA1 Message Date
Andy Brody
cc7887f0a0 Fix tests, verify_callback functionality on jruby. 2014-04-09 22:12:41 -07:00
Andy Brody
72a5b19a9b Add some tests around ssl_verify_callback. 2014-04-09 20:59:56 -07:00
Andy Brody
b59e2e5b3c Don't use verify_callback.
The OpenSSL verify_callback isn't supported on jruby [1], and behaves in
somewhat surprising ways on OS X due to Apple monkey patching OpenSSL.

We probably want to move in the direction of just passing through the
OpenSSL exceptions anyway.

[1] https://github.com/jruby/jruby/issues/597

Fixes: #165
See also: #168, e03e5e6c
2014-04-02 01:39:23 -07:00
Andy Brody
d7ddc7e928 Refactor SSL options for better default handling.
Move SSL options into their own hash so we can handle defaults in a more
sane way. This also makes it much clearer to the user what's happening
when defaults are used for SSL parameters.
2014-03-31 16:03:26 -07:00
Andy Brody
e30ecc8929 Set an SSL cert_store by default. 2014-03-30 17:43:13 -07:00
Andy Brody
f378ad154a Expose option to set SSL cert_store.
Fixes: #254
2014-03-16 15:46:11 -07:00
Andy Brody
cf9d706917 Test that OpenSSL constants have expected values. 2014-03-16 14:46:36 -07:00
Andy Brody
b41a3941c3 Add tests around SSL cipher defaults behavior. 2014-03-16 14:45:59 -07:00
Andy Brody
534cd8fc62 Fix up tests.
Most of the should_not_receive calls should not have been passed a
with(), since that's not what they were intended to test.
2014-03-13 00:35:08 -07:00
Andy Brody
c7ca540bc3 Expose specifying SSL cipher suite list. 2014-03-13 00:32:59 -07:00
Andy Brody
f270844339 Enable SSL peer verification by default.
Fixes #139, #255

SSL verification will not be performed if `:verify_ssl` is falsy or a
constant like `OpenSSL::SSL::VERIFY_NONE` that disables verification.
2014-03-13 00:09:54 -07:00
Andy Brody
ae88da404c Don't set ssl_version unless it's provided.
Fixes #166, #167
2014-03-12 17:55:18 -07:00
Andy Brody
39a0034c3e Fix test failures and deprecation warnings. 2014-03-12 15:49:21 -07:00
Andy Brody
8f021b158b Merge pull request #128 from jeremy/nil-timeout
Disable timeouts by setting :timeout => nil or :open_timeout => nil

Merge remote-tracking branch 'jeremy/nil-timeout' into 1.7.x

Conflicts:
	lib/restclient/request.rb
2014-03-12 15:45:08 -07:00
Jeffrey Hardy
425596a847 Test that raw responses are read into a binary-mode tempfile
Re: https://github.com/rest-client/rest-client/pull/110
2014-03-12 12:58:01 -04:00
Andy Brody
e99defb99b Merge pull request #261 from gottfrois/fix_209_rescue_errno_etimedout
Rescue Errno::ETIMEDOUT exception. Fixes #209
2014-03-06 23:27:34 -08:00
Andy Brody
825f5bb8b2 Do some sanity checks on cookie names and values.
Validate that cookie names and values don't flagrantly violate RFC 6265
by containing things like control characters or ';'. This will help
prevent users from accidentally breaking boundaries of cookies or the
cookie header.

If you really want to send scary characters, you can set the Cookie
header directly.
2014-03-06 23:20:05 -08:00
Andy Brody
3c95dbd45c Do not CGI.unescape cookies sent in requests.
It isn't appropriate to call CGI.unescape on cookie values: any URI
encoding performed by servers on cookies should remain that way to avoid
sending invalid characters in the Cookie request HTTP header. (e.g. If
you send a cookie containing '%0A', it should send those three octets,
not a newline character.)

Fixes #89
2014-03-06 22:53:27 -08:00
Pierre-Louis Gottfrois
04640e8ba0 Rescue Errno::ETIMEDOUT exception. Fixes #209 2014-02-17 16:07:53 +01:00
Larry Gilbert
d7a11503af Reorganize specs
* Put unit and integration specs into separate subdirectories
* Consolidate all requires of 'webmock/rspec' into spec_helper.rb
* Use WebMock.{disable!,enable!} for specs calling live server
2013-08-30 18:45:06 -07:00
Renamed from spec/request_spec.rb (Browse further)