nitcorn: fix input buffer containing unicode
authorAlexis Laferrière <alexis.laf@xymus.net>
Wed, 21 Sep 2016 20:08:25 +0000 (16:08 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Wed, 21 Sep 2016 20:16:18 +0000 (16:16 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/nitcorn/http_request_buffer.nit

index 573d5f5..84fb8ca 100644 (file)
@@ -100,7 +100,7 @@ class HTTPConnection
 
        # We are receiving body parts.
        private fun parse_body(str: String) do
-               current_length += str.length
+               current_length += str.byte_length
                current_body.add str
                if current_length >= content_length then
                        parse_end