Commits

Bryan O'Sullivan  committed 18b1d0a

Ignore redirects, per hvr

  • Participants
  • Parent commits ddf1543

Comments (0)

Files changed (2)

       check (Just "POST") = return "POST"
       check (Just "PUT")  = return "PUT"
       check _      = fatal "only POST or PUT may have a body"
+      req = req0 { E.redirectCount = 0, E.checkStatus = \_ _ -> Nothing }
   case (from_file, literal) of
-    (Nothing,Nothing) -> return req0 { E.method = maybe "GET" B.pack method }
+    (Nothing,Nothing) -> return req { E.method = maybe "GET" B.pack method }
     (Just f,Nothing) -> do
       s <- B.readFile f
       meth <- check method
-      return req0 { E.method = meth
-                  , E.requestBody = E.RequestBodyBS s }
+      return req { E.method = meth
+                 , E.requestBody = E.RequestBodyBS s }
     (Nothing,Just s) -> do
       meth <- check method
-      return req0 { E.method = meth
-                  , E.requestBody = E.RequestBodyBS . encodeUtf8 . pack $ s
-                  }
+      return req { E.method = meth
+                 , E.requestBody = E.RequestBodyBS . encodeUtf8 . pack $ s
+                 }
     _ -> do
       hPutStrLn stderr "Error: --literal and --from-file are mutually exclusive"
       exitWith (ExitFailure 1)
     text-format >= 0.3.0.4,
     time,
     transformers >= 0.2.2,
-    unix-compat >= 0.2.2,
+    unix-compat >= 0.3.0.2,
     unordered-containers >= 0.1.4.0,
     vector,
     vector-algorithms