curl-users
Re: Wrong for "Content-Range: " in HTTP Resume Uploading with Digest Authentication
Date: Wed, 8 Aug 2007 14:17:17 +0200 (CEST)
On Wed, 8 Aug 2007, Song Ma wrote:
> I've found "Content-Range: " field would get wrong value if user want to use
> resume uploading to a HTTP server with Digest Authentication method. Here is
> the scenario.
Any chance you can write up a test case for curl's test suite that does this?
> I made one patch for it. The idea is when user is doing resume uploading we
> need to check not only if the resume position is set but also if the
> file-to-be-uploaded is the same file with the previous "curl_http()"
> calling. For the same file, we do not make the re-calculation for resume.
But your patch doesn't check if it is the same file that is uploaded, it
checks if the URL is the same. But the major remark follows:
> +char fupload_swap[512];
This is a global variable and we can't have global variables!
Can you just check 'data->state.this_is_a_follow' and skip the re-calculation
if that is true?
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2007-08-08