projects
/
functorrent.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c324cc9
)
Fix failing test
author
Jaseem Abid
<jaseemabid@gmail.com>
Sat, 21 Feb 2015 18:59:06 +0000
(
00:29
+0530)
committer
Jaseem Abid
<jaseemabid@gmail.com>
Sat, 21 Feb 2015 18:59:06 +0000
(
00:29
+0530)
src/Tracker.hs
patch
|
blob
|
history
diff --git
a/src/Tracker.hs
b/src/Tracker.hs
index 65290c3ff26d3623fe0cb022e2152c066585565e..eab09795338ddeedad9a7e356e58e1104a69e7b9 100644
(file)
--- a/
src/Tracker.hs
+++ b/
src/Tracker.hs
@@
-17,8
+17,8
@@
type Url = String
-- | urlEncodeHash
--
--- >>> urlEncodeHash $
BC.
pack "123456789abcdef123456789abcdef123456789a"
--- "%124
v
x%9a%bc%de%f1%23Eg%89%ab%cd%ef%124Vx%9a"
+-- >>> urlEncodeHash $ pack "123456789abcdef123456789abcdef123456789a"
+-- "%124
V
x%9a%bc%de%f1%23Eg%89%ab%cd%ef%124Vx%9a"
urlEncodeHash :: ByteString -> String
urlEncodeHash bs = concatMap (encode' . unpack) (splitN 2 bs)
where encode' b@[c1, c2] = let c = chr (read ("0x" ++ b))