summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2014-02-26 12:05:42 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2014-02-26 12:05:42 +0400
commitd8dba40ba5431182ab6acdcadc619d8c4fa8206a (patch)
tree88aff17429d5d47b8bb2d5fd8e92a9ee071e45b7 /src
parent6d381df09aecc797d9e20acaf5996399c21a6916 (diff)
Bump http-conduit dependency
Diffstat (limited to 'src')
-rw-r--r--src/Network/BitTorrent/Tracker/RPC/HTTP.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Network/BitTorrent/Tracker/RPC/HTTP.hs b/src/Network/BitTorrent/Tracker/RPC/HTTP.hs
index 32a5e79c..c5bf4e31 100644
--- a/src/Network/BitTorrent/Tracker/RPC/HTTP.hs
+++ b/src/Network/BitTorrent/Tracker/RPC/HTTP.hs
@@ -43,8 +43,9 @@ import Data.Typeable
43import Network.URI 43import Network.URI
44import Network.HTTP.Conduit hiding 44import Network.HTTP.Conduit hiding
45 (Manager, newManager, closeManager, withManager) 45 (Manager, newManager, closeManager, withManager)
46import Network.HTTP.Client (defaultManagerSettings)
47import Network.HTTP.Client.Internal (setUri)
46import qualified Network.HTTP.Conduit as HTTP 48import qualified Network.HTTP.Conduit as HTTP
47import Network.HTTP.Conduit.Internal (setUri)
48import Network.HTTP.Types.Header (hUserAgent) 49import Network.HTTP.Types.Header (hUserAgent)
49import Network.HTTP.Types.URI (SimpleQuery, renderSimpleQuery) 50import Network.HTTP.Types.URI (SimpleQuery, renderSimpleQuery)
50 51
@@ -92,7 +93,7 @@ instance Default Options where
92 { optAnnounceExt = def 93 { optAnnounceExt = def
93 , optHttpProxy = Nothing 94 , optHttpProxy = Nothing
94 , optUserAgent = BC.pack libUserAgent 95 , optUserAgent = BC.pack libUserAgent
95 , optHttpOptions = def 96 , optHttpOptions = defaultManagerSettings
96 } 97 }
97 98
98-- | HTTP tracker manager. 99-- | HTTP tracker manager.
@@ -114,7 +115,7 @@ withManager opts = bracket (newManager opts) closeManager
114-- Queries 115-- Queries
115-----------------------------------------------------------------------} 116-----------------------------------------------------------------------}
116 117
117fillRequest :: Options -> SimpleQuery -> Request m -> Request m 118fillRequest :: Options -> SimpleQuery -> Request -> Request
118fillRequest Options {..} q r = r 119fillRequest Options {..} q r = r
119 { queryString = joinQuery (queryString r) (renderSimpleQuery False q) 120 { queryString = joinQuery (queryString r) (renderSimpleQuery False q)
120 , requestHeaders = (hUserAgent, optUserAgent) : requestHeaders r 121 , requestHeaders = (hUserAgent, optUserAgent) : requestHeaders r