From 1a8eb3334f70065d281c7c798c1172ee5f56c941 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 10 Oct 2012 11:26:30 -0400 Subject: deal with incompatable api change in network 2.4.0.1 On the cabal side, let's just require this new version, and set -DURI_24 to enable the code using it. --- Utility/Url.hs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Utility') diff --git a/Utility/Url.hs b/Utility/Url.hs index b75229e1b..6a45c559c 100644 --- a/Utility/Url.hs +++ b/Utility/Url.hs @@ -5,6 +5,8 @@ - Licensed under the GNU GPL version 3 or higher. -} +{-# LANGUAGE CPP #-} + module Utility.Url ( URLString, check, @@ -108,6 +110,10 @@ request url headers requesttype = go 5 url Nothing -> return rsp Just newURI -> go n newURI_abs where +#ifdef URI_24 + newURI_abs = newURI `relativeTo` u +#else newURI_abs = fromMaybe newURI (newURI `relativeTo` u) +#endif addheaders req = setHeaders req (rqHeaders req ++ userheaders) userheaders = rights $ map parseHeader headers -- cgit v1.2.3