[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-wget] Two fixes: Memory leak with chunked responses / Chunked respo
From: |
Gijs van Tulder |
Subject: |
[Bug-wget] Two fixes: Memory leak with chunked responses / Chunked responses and WARC files |
Date: |
Fri, 27 Jan 2012 09:36:16 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111220 Thunderbird/9.0 |
Hi,
Here are two small patches. I hope they will be useful.
First, a patch that fixes a memory leak in fd_read_body (src/retr.c) and
skip_short_body (src/http.c) when it retrieves a response with
"Transfer-Encoding: chunked". Both functions make calls to fd_read_line
but never free the result.
Second, a patch to the fd_read_body function that changes the way
chunked responses are saved in the WARC file. Until now, wget would
write a de-chunked response to the WARC file, which is wrong: the WARC
file is supposed to have an exact copy of the HTTP response, so it
should also include the chunk headers.
The first patch fixes the memory leaks. The second patch changes
fd_read_body to save the full, chunked response in the WARC file.
Regards,
Gijs
1-fd_read_body-memory-leak.patch
Description: Text Data
2-add-chunks-to-warc.patch
Description: Text Data
- [Bug-wget] Two fixes: Memory leak with chunked responses / Chunked responses and WARC files,
Gijs van Tulder <=