Skip to content

Commit

Permalink
Fix slow uploads by ensuring that the Expect header is set.
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Toland committed Mar 1, 2010
1 parent 27d119e commit f0d5ebc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/patron/session.rb
Expand Up @@ -159,6 +159,9 @@ def copy(url, dest, headers = {})

# Send an HTTP request to the specified +url+.
def request(action, url, headers, options = {})
# If the Expect header isn't set uploads are really slow
headers['Expect'] ||= ''

req = Request.new
req.action = action
req.timeout = self.timeout
Expand Down

0 comments on commit f0d5ebc

Please sign in to comment.