summaryrefslogtreecommitdiff
path: root/src/Network
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2014-02-26 20:27:19 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2014-02-26 20:27:19 +0400
commitac56fc5a2111ff0a5fcb97566a15e598b53b62bb (patch)
tree4b5076ee8a8bb4762fee0800960893dbf29d2410 /src/Network
parent6146b69ecc0f47b1b09e0a3edfa92cb2eda61963 (diff)
Allow https uri scheme in tracker uris
Diffstat (limited to 'src/Network')
-rw-r--r--src/Network/BitTorrent/Tracker/RPC.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Network/BitTorrent/Tracker/RPC.hs b/src/Network/BitTorrent/Tracker/RPC.hs
index 022751b4..3acffce9 100644
--- a/src/Network/BitTorrent/Tracker/RPC.hs
+++ b/src/Network/BitTorrent/Tracker/RPC.hs
@@ -143,9 +143,10 @@ packException f m = try m >>= either (throwIO . f) return
143 143
144dispatch :: URI -> IO a -> IO a -> IO a 144dispatch :: URI -> IO a -> IO a -> IO a
145dispatch URI {..} http udp 145dispatch URI {..} http udp
146 | uriScheme == "http:" = packException HttpException http 146 | uriScheme == "http:" ||
147 | uriScheme == "udp:" = packException UdpException udp 147 uriScheme == "https:" = packException HttpException http
148 | otherwise = throwIO $ UnrecognizedProtocol uriScheme 148 | uriScheme == "udp:" = packException UdpException udp
149 | otherwise = throwIO $ UnrecognizedProtocol uriScheme
149 150
150announce :: Manager -> URI -> SAnnounceQuery -> IO AnnounceInfo 151announce :: Manager -> URI -> SAnnounceQuery -> IO AnnounceInfo
151announce Manager {..} uri simpleQuery 152announce Manager {..} uri simpleQuery