Commit 88388b6f authored by Alexandre Janniaux's avatar Alexandre Janniaux Committed by Jean-Baptiste Kempf
Browse files

http: chunked: fix chunked transfer encoding output

Chunks in chunked transfer-encoding are supposed to be ended with \r\n.
Without that, servers can be confused on how to parse the next chunk
size, and are typically returning a 400 Bad Request. This can be seen in
the Mozilla developer documentation[1], or more exhaustively in the
document RFC[2] section 4.1.

This is in particular needed to signal that no other headers are exposed
in the chunk.

parent 7cb75e56
......@@ -49,6 +49,8 @@ ssize_t vlc_https_chunked_write(struct vlc_tls *tls, const void *base,
return -1;
if (vlc_tls_Write(tls, base, len) < (ssize_t)len)
return -1;
if (vlc_tls_Write(tls, "\r\n", 2) < 2)
return -1;
if (eos)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment