Just knocking out a minimal patch. I'm looking at cabal-install's
Hackage/HttpUtils.hs. It seems like there is a whole module's worth
of work just to get proxy server support. Since bug reporting is the
only place we use fetchUrl (according to grep), I think we can get
away with just failing.
Tue Sep 23 13:35:39 BST 2008 Eric Kow <[EMAIL PROTECTED]>
* HTTP: detect proxy server (failing if we want one)
The HTTP package has proxy server support, but putting it to use seems
to be complicated. Since fetchUrl seems to be used only in optional
situations, it seems safe to just return an error message (as opposed
to waiting around for a timeout).
New patches:
[HTTP: detect proxy server (failing if we want one)
Eric Kow <[EMAIL PROTECTED]>**20080923123539
The HTTP package has proxy server support, but putting it to use seems
to be complicated. Since fetchUrl seems to be used only in optional
situations, it seems safe to just return an error message (as opposed
to waiting around for a timeout).
] hunk ./src/HTTP.hs 7
import Darcs.Global ( debugFail )
#ifdef HAVE_HTTP
+import Control.Monad ( when )
import Data.IORef ( newIORef, readIORef, writeIORef, IORef )
import Network.HTTP
import Network.URI
hunk ./src/HTTP.hs 11
+import System.Environment ( getEnv )
import System.IO.Error ( ioeGetErrorString )
import System.IO.Unsafe ( unsafePerformIO )
import Darcs.Global ( debugMessage )
hunk ./src/HTTP.hs 35
fetchUrl url = case parseURI url of
Nothing -> fail $ "Invalid URI: " ++ url
Just uri -> do debugMessage $ "Fetching over HTTP: "++url
+ proxy <- getProxy
+ when (not $ null proxy) $
+ debugFail "No proxy support yet!"
resp <- simpleHTTP $ Request { rqURI = uri,
rqMethod = GET,
rqHeaders = headers,
hunk ./src/HTTP.hs 51
postUrl url body mime = case parseURI url of
Nothing -> fail $ "Invalid URI: " ++ url
Just uri -> do debugMessage $ "Posting to HTTP: "++url
+ proxy <- getProxy
+ when (not $ null proxy) $
+ debugFail "No proxy support yet!"
resp <- simpleHTTP $ Request { rqURI = uri,
rqMethod = POST,
rqHeaders = headers ++ [Header HdrContentType mime,
hunk ./src/HTTP.hs 90
return (u, e)
where h = return . ioeGetErrorString
+getProxy :: IO String
+getProxy =
+ getEnv "http_proxy"
+ `catch` \_ -> getEnv "HTTP_PROXY"
+ `catch` \_ -> return ""
#else
fetchUrl _ = debugFail "Network.HTTP does not exist"
Context:
[Resolve issue53: check for windows filename validity in darcs add/mv.
Eric Kow <[EMAIL PROTECTED]>**20080922172004]
[Use --reserved-ok to allow a file with ':' in it in tests.
Eric Kow <[EMAIL PROTECTED]>**20080922171519
It's likely that this test will just fail under Windows and
we will have to disable it.
]
[Add test for issue53.
Eric Kow <[EMAIL PROTECTED]>**20080922152256]
[Add --reserved-ok flag for darcs add and mv.
Eric Kow <[EMAIL PROTECTED]>**20080922141532
This is just the flag, not the actual effect.
]
[Check for filepath package in configure.
Eric Kow <[EMAIL PROTECTED]>**20080922140520]
[fix bug I introduced into issue1039 test.
David Roundy <[EMAIL PROTECTED]>**20080921213043
Ignore-this: 5b3c6476abae6bb050be014555d05bbe
]
[Fix hang after a user input error (for example, EOF).
Judah Jacobson <[EMAIL PROTECTED]>**20080918163017]
[replace consRLSealed with a more general mapFlipped.
David Roundy <[EMAIL PROTECTED]>**20080921185241
Ignore-this: c28f73f165254582cba6a14ba6ce93
]
[make issue1039 fix allow small dissimilar repositories.
David Roundy <[EMAIL PROTECTED]>**20080921184515
Ignore-this: 918a09df18ef48c649c1bfaa866d6176
]
[revert refactor that breaks type witnesses.
David Roundy <[EMAIL PROTECTED]>**20080921182331
Ignore-this: dd692cffc1a238d6726448bacfe9cacc
]
[Add '--ignore-unrelated-repos' option to disable unrelated repositories check.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080919152631]
[Resolve issue1039: detect seemingly unrelated repositories when doing push, pull and send.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080919144553]
[Refactor in pull_cmd.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080919135349
Ignore-this: e26a489a7a53aeaba544ae5ad0006700
]
[Test for issue1039.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080919153011]
[manual: add an example of record --pipe prompts similar to tag --pipe docs
Simon Michael <[EMAIL PROTECTED]>**20080918205353]
[user manual corrections regarding what record and tag --pipe prompt for
Simon Michael <[EMAIL PROTECTED]>**20080918204500]
[clarify the short help for --pipe
Simon Michael <[EMAIL PROTECTED]>**20080918193717]
[Use gmakeisms for prettier output.
Trent W. Buck <[EMAIL PROTECTED]>**20080919071358]
[Spaces in Darcs.Arguments.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080919150440]
[Spaces in Darcs.Commands.Send.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080919150139]
[Spaces in Darcs.Commands.Pull.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080919145812]
[Spaces in Darcs.Commands.Push.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080919145553]
[Print "We have the following patches to send:" only when we really have somthing to send.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080919114229]
[fix changes.pl test (translating to bash)
David Roundy <[EMAIL PROTECTED]>**20080917182432
Ignore-this: 5f8bc7e1f9eadc073402a935142281c4
This test made assumptions such as that darcs wouldn't ever add a long
comment to its internal representation of changes, which are now
broken.
]
[hokey fix to allow unit tests to generate random input.
David Roundy <[EMAIL PROTECTED]>**20080917170913
Ignore-this: 31e847e82eef741f4c6cc857fd79a245
A nicer fix would be to move namepatch and patchinfo into some sort of
random-number monad rather than leaving them in IO and using
unsafePerformIO in the example-generation scripts.
]
[resolve issue27: add junk to patch identifiers.
David Roundy <[EMAIL PROTECTED]>**20080917154657
Ignore-this: b91ab6f6e05e0fda25488fa51653b741
]
[TAG 2.0.3pre1
Eric Kow <[EMAIL PROTECTED]>**20080918023645]
Patch bundle hash:
5cae29578b02b133cb2d77395629fc479147e25e
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users