Created
August 10, 2012 18:09
-
-
Save sadache/3316242 to your computer and use it in GitHub Desktop.
Http Chunked protocole implemented on top of Play's API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Enumeratee.map[Array[Byte]]{ e => | |
val length = e.size | |
val CRLF = "\r\n".getBytes("UTF-8") | |
(length.toHexString.getBytes ++ CRLF ++ e ++ CRLF):Array[Byte] | |
} ><> | |
Enumeratee.trailing(Seq((0.toHexString.getBytes) ++ (CRLF ++ CRLF))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment