mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-01-12 07:18:31 +01:00
Patch for aycanirican/hweblib#1
This commit is contained in:
parent
5555a1738e
commit
3395f3d812
23
patching/patches/hweblib-0.6.1.patch
Normal file
23
patching/patches/hweblib-0.6.1.patch
Normal file
@ -0,0 +1,23 @@
|
||||
diff -ru orig/src/Network/Parser/Mime.hs new/src/Network/Parser/Mime.hs
|
||||
--- orig/src/Network/Parser/Mime.hs 2014-03-19 12:03:48.222054709 +0200
|
||||
+++ new/src/Network/Parser/Mime.hs 2014-03-19 12:03:47.000000000 +0200
|
||||
@@ -43,7 +43,7 @@
|
||||
_ -> MultiPart (Extension s)
|
||||
(t, s) -> Other t s
|
||||
where
|
||||
- paired s = let (a,b) = (T.break (== '/') . T.toLower . TE.decodeLatin1) s in
|
||||
+ paired s = let (a,b) = (T.break (== '/') . T.toLower . TE.decodeUtf8) s in
|
||||
(a, T.drop 1 b)
|
||||
|
||||
-- Parse headers and map them to a MimeValue
|
||||
@@ -53,8 +53,8 @@
|
||||
let mv = L.foldl f nullMimeValue eh
|
||||
return mv
|
||||
where
|
||||
- bs2t = M.fromList . Prelude.map (TE.decodeLatin1 *** TE.decodeLatin1) . M.toList
|
||||
- hVal = TE.decodeLatin1 . hValue
|
||||
+ bs2t = M.fromList . Prelude.map (TE.decodeUtf8 *** TE.decodeUtf8) . M.toList
|
||||
+ hVal = TE.decodeUtf8 . hValue
|
||||
f z x =
|
||||
case hType x of
|
||||
IdH -> z { mvHeaders = M.insert IdH (hVal x) (mvHeaders z) }
|
||||
Loading…
Reference in New Issue
Block a user