http-types
http-types copied to clipboard
Avoid creating new `ByteString` s
While i'm tackling #66 , i found an interesting problem: http-type would create too many ByteString:
parseQueryText/parseQueryuseurlDecodewhich create newByteStrings.HeaderItemuseCI ByteStringwhich in turn create a case-foldedByteString.
These ByteString s are not created via slice thus will be slow and create memory fragment, i would suggest to simply use Text instead.