Minor bugfixes
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run

This commit is contained in:
Vladimir Dubrovin committed 2026-07-23 19:43:47 +03:00
1 parent 01f85cf755
commit c60af54c98
4 files changed
+22 -7

No files matched your search

+17 -2
View File
@@ -956,7 +956,13 @@ for(;;){
}
smallbuf[i] = 0;
contentlength64 = 0;
sscanf((char *)smallbuf, "%"SCNx64"", &contentlength64);
if(sscanf((char *)smallbuf, "%"SCNx64"", &contentlength64) != 1) RETURN(537);
/* chunk-size line may be longer than smallbuf: drain and relay the
remainder up to LF so client/backend framing stays in sync */
while(i > 0 && smallbuf[i-1] != '\n'){
if((i = sockgetlinebuf(param, CLIENT, smallbuf, 30, '\n', conf.timeouts[STRING_S])) <= 0) RETURN(537);
if (socksend(param, param->remsock, smallbuf, i, conf.timeouts[STRING_S]) != i) RETURN(536);
}
if(contentlength64 == 0) chunkedcli = 2;
else {
param->waitclient64 = contentlength64;
@@ -1144,7 +1150,16 @@ for(;;){
}
smallbuf[i] = 0;
contentlength64 = 0;
sscanf((char *)smallbuf, "%"SCNx64"", &contentlength64);
if(sscanf((char *)smallbuf, "%"SCNx64"", &contentlength64) != 1) {
keepalive = 0;
break;
}
/* chunk-size line may be longer than smallbuf: drain and relay the
remainder up to LF so client/backend framing stays in sync */
while(i > 0 && smallbuf[i-1] != '\n'){
if((i = sockgetlinebuf(param, SERVER, smallbuf, 30, '\n', conf.timeouts[STRING_S])) <= 0) RETURN(534);
if (socksend(param, param->clisock, smallbuf, i, conf.timeouts[STRING_S]) != i) RETURN(535);
}
if(contentlength64 == 0) {
param->chunked = 2;
}