Permalink
Browse files

webserver: use parseHttpAccept

  • Loading branch information...
1 parent 968cf3e commit ac2c2e7d7d9d564d70ba41f99d0b1abdafaabf29 @kfish committed Jan 7, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 System/Remote/WebServer.hs
@@ -70,7 +70,7 @@ getPath counters gauges labels req
toText = T.pack . map (chr . fromIntegral) . S.unpack
acceptCT :: Comm a => CT -> a -> Bool
-acceptCT ct = maybe False (S.isInfixOf ct) . lookupField FkAccept
+acceptCT ct = maybe False ((ct `elem`) . parseHttpAccept) . lookupField FkAccept
splitAPI :: T.Text -> (T.Text, Maybe T.Text)
splitAPI path = f components

0 comments on commit ac2c2e7

Please sign in to comment.