git-annex/standalone/android/haskell-patches/warp_avoid-ipv6-for-android.patch

40 lines
1.7 KiB
Diff
Raw Normal View History

From a33437e3150fb33d2fd22d29ff196be28a81c747 Mon Sep 17 00:00:00 2001
From: androidbuilder <androidbuilder@example.com>
Date: Thu, 2 Jul 2015 21:48:18 +0000
Subject: [PATCH] avoid ipv6 for android
---
Network/Wai/Handler/Warp/Run.hs | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/Network/Wai/Handler/Warp/Run.hs b/Network/Wai/Handler/Warp/Run.hs
index 34ae455..ea7475c 100644
--- a/Network/Wai/Handler/Warp/Run.hs
+++ b/Network/Wai/Handler/Warp/Run.hs
@@ -14,7 +14,7 @@ import Control.Monad (when, unless, void)
import Data.ByteString (ByteString)
import qualified Data.ByteString as S
import Data.Char (chr)
-import Data.IP (toHostAddress, toHostAddress6)
+import Data.IP (toHostAddress)
import Data.IORef (IORef, newIORef, readIORef, writeIORef)
import Data.Streaming.Network (bindPortTCP)
import Network (sClose, Socket)
@@ -323,13 +323,6 @@ serveConnection conn ii origAddr transport settings app = do
[a] -> Just (SockAddrInet (readInt clientPort)
(toHostAddress a))
_ -> Nothing
- ["PROXY","TCP6",clientAddr,_,clientPort,_] ->
- case [x | (x, t) <- reads (decodeAscii clientAddr), null t] of
- [a] -> Just (SockAddrInet6 (readInt clientPort)
- 0
- (toHostAddress6 a)
- 0)
- _ -> Nothing
("PROXY":"UNKNOWN":_) ->
Just origAddr
_ ->
--
2.1.4