Permalink
Browse files

A hack to work with rutracker.org

  • Loading branch information...
1 parent 0f9aa4d commit de7c8f4da5d900a99dd67b4fe33d76533c4ab035 @feuerbach feuerbach committed Feb 19, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/Process/Tracker.hs
View
@@ -264,7 +264,13 @@ trackerRequest uri =
buildRequestURL :: Status.StatusState -> Process CF ST String
buildRequestURL ss = do ti <- gets torrentInfo
params <- urlEncodeVars <$> buildRequestParams ss
- return $ concat [fromBS $ announceURL ti, "?", params]
+ let announceString = fromBS $ announceURL ti
+ -- announce string might already have some
+ -- parameters in it
+ sep = if '?' `elem` announceString
+ then "&"
+ else "?"
+ return $ concat [announceString, sep, params]
buildRequestParams :: Status.StatusState -> Process CF ST [(String, String)]
buildRequestParams ss = do

0 comments on commit de7c8f4

Please sign in to comment.