Add a explicit ReceivedData to HttpsMethod that indicates when
we got data from the connection so that we can send URISTart()
to the parent.
This is needed because URIStart got moved in
f9b4f12d from
the progress_callback to write_data() and it only checks for
Res.Size. In the old code if progress_callback is called by
libcurl (and sets Res.Size) before write_data is called then
URIStart() is never send. Making this a explicit ReceivedData
variable fixes this issue.
if (me->Server->JunkSize != 0)
return buffer_size;
if (me->Server->JunkSize != 0)
return buffer_size;
+ if (me->ReceivedData == false)
+ {
+ me->ReceivedData = true;
+ }
+
if(me->File->Write(buffer, buffer_size) != true)
return false;
if(me->File->Write(buffer, buffer_size) != true)
return false;
int
HttpsMethod::progress_callback(void *clientp, double dltotal, double /*dlnow*/,
int
HttpsMethod::progress_callback(void *clientp, double dltotal, double /*dlnow*/,
- double /*ultotal*/, double /*ulnow*/)
+ double /*ultotal*/, double /*ulnow*/)
{
HttpsMethod *me = (HttpsMethod *)clientp;
if(dltotal > 0 && me->Res.Size == 0) {
{
HttpsMethod *me = (HttpsMethod *)clientp;
if(dltotal > 0 && me->Res.Size == 0) {
char curl_errorstr[CURL_ERROR_SIZE];
URI Uri = Itm->Uri;
string remotehost = Uri.Host;
char curl_errorstr[CURL_ERROR_SIZE];
URI Uri = Itm->Uri;
string remotehost = Uri.Host;
// TODO:
// - http::Pipeline-Depth
// TODO:
// - http::Pipeline-Depth
CURL *curl;
FetchResult Res;
HttpsServerState *Server;
CURL *curl;
FetchResult Res;
HttpsServerState *Server;