songkick-transport 0.1.4 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/songkick/transport/curb.rb +7 -1
  2. metadata +2 -2
@@ -5,6 +5,12 @@ module Songkick
5
5
  module Transport
6
6
 
7
7
  class Curb < Base
8
+ # Send this so that curb will not implement Section 8.2.3 of RFC 2616,
9
+ # which our Ruby HTTP servers are not equipped to respond to. (If not
10
+ # sent it causes an additional 1s of latency for all requests with post
11
+ # data longer than 1k)
12
+ DEFAULT_HEADERS = {"Expect" => ""}
13
+
8
14
  def self.clear_thread_connection
9
15
  Thread.current[:transport_curb_easy] = nil
10
16
  end
@@ -31,7 +37,7 @@ module Songkick
31
37
 
32
38
  connection.url = req.url
33
39
  connection.timeout = req.timeout || @timeout
34
- connection.headers.update(req.headers)
40
+ connection.headers.update(DEFAULT_HEADERS.merge(req.headers))
35
41
 
36
42
  response_headers = {}
37
43
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: songkick-transport
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-26 00:00:00.000000000 Z
12
+ date: 2012-12-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multipart-post