소스 검색

Fix off-by-one error for non-chunked responses

master
JustAnotherArchivist 1 년 전
부모
커밋
10c7ab0889
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. +1
    -1
      http-response-bodies.c

+ 1
- 1
http-response-bodies.c 파일 보기

@@ -205,7 +205,7 @@ checkstate:
return 1;
}
} else if (state == STATE_BODY || state == STATE_CHUNK_CONTENTS) {
if (length + 2 - bytes_read > n) {
if (length + (state == STATE_BODY ? 1 : 2) - bytes_read > n) {
// Only got part of the body
DEBUG_PRINTF("Partial body\n");
DEBUG_PRINTF("Copying %zu bytes to stdout\n", n);


불러오는 중...
취소
저장