Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Disable redirect handling when running Patron specs

Patron's default settings allow it to automatically follow up to 5
redirects. Since example.com has started issuing a 302 Found response,
patron's behavior deviates from other backends.
  • Loading branch information...
commit bc4ae3fddbe8cc5bac665194ae672378f1e87cb3 1 parent d85b8b0
@grig authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  spec/patron_spec_helper.rb
View
1  spec/patron_spec_helper.rb
@@ -10,6 +10,7 @@ def http_request(method, uri, options = {}, &block)
sess.connect_timeout = 10
sess.timeout = 10
+ sess.max_redirects = 0
response = sess.request(method, "#{uri.path}#{uri.query ? '?' : ''}#{uri.query}", options[:headers] || {}, {
:data => options[:body]
Please sign in to comment.
Something went wrong with that request. Please try again.