Skip to content
Snippets Groups Projects
Commit 951f9c05 authored by Stephen R. van den Berg's avatar Stephen R. van den Berg
Browse files

HTTP.Query: Support skipping chunked options.

parent cd940774
Branches
Tags
No related merge requests found
......@@ -430,7 +430,7 @@ OUTER: while (sizeof(buf) > cpos) {
if (sscanf(buf[cpos..f], "%x", np)) {
if (np) cpos = f+np+4;
else {
if (sscanf(buf[cpos..f+3], "%*x%*[ ]%s", data)
if (sscanf(buf[cpos..f+3], "%*x%*[^\r\n]%s", data)
== 3 && sizeof(data) == 4) break;
return;
}
......@@ -891,7 +891,7 @@ string data(int|void max_length)
DBG("got %d; chunk: %O left: %d\n",strlen(lbuf),rbuf[..40],strlen(rbuf));
if (sscanf(rbuf,"%x%*[ ]\r\n%s",len,s)==3)
if (sscanf(rbuf,"%x%*[^\r\n]\r\n%s",len,s)==3)
{
if (len==0)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment