mirror of
https://github.com/Open-Argon/http.ar.git
synced 2026-10-28 18:02:53 +00:00
fix broken content type being 0
This commit is contained in:
1 parent
362eb3ad06
commit
c682fb599d
1 file changed
+2
-2
+2
-2
@@ -22,10 +22,10 @@ let parse(conn) = do
|
||||
|
||||
let body = buffer()
|
||||
if (method in methodsWithBody) do
|
||||
let contentLength = 0
|
||||
let contentLength = -1
|
||||
if ("content-length" in headers) do
|
||||
contentLength = number(headers["content-length"])
|
||||
while ((not conn.isClosed()) && (body.length < contentLength || contentLength == 0)) do
|
||||
while ((not conn.isClosed()) && (body.length < contentLength || contentLength == -1)) do
|
||||
try do
|
||||
let chunk = conn.read(readChunkSize)
|
||||
if (chunk.length == 0) break
|
||||
|
||||
Reference in new issue
Block a user