Only hyper needs to know this, and it can use it as a boolean.
Closes #13928
struct SingleRequest *k = &data->req;
CURLcode result = CURLE_OK;
- if(0 == k->bodywrites) {
+ if(!k->bodywritten) {
#if defined(USE_NTLM)
struct connectdata *conn = data->conn;
if(conn->bits.close &&
/* end of transfer */
data->req.done = TRUE;
infof(data, "hyperstream is done");
- if(!k->bodywrites) {
+ if(!k->bodywritten) {
/* hyper doesn't always call the body write callback */
result = Curl_http_firstwrite(data);
}
req->keepon = 0;
req->upgr101 = UPGR101_INIT;
req->timeofdoc = 0;
- req->bodywrites = 0;
req->location = NULL;
req->newurl = NULL;
#ifndef CURL_DISABLE_COOKIES
req->no_body = data->set.opt_no_body;
req->authneg = FALSE;
req->shutdown = FALSE;
+#ifdef USE_HYPER
+ req->bodywritten = FALSE;
+#endif
}
void Curl_req_free(struct SingleRequest *req, struct Curl_easy *data)
struct bufq sendbuf; /* data which needs to be send to the server */
size_t sendbuf_hds_len; /* amount of header bytes in sendbuf */
time_t timeofdoc;
- long bodywrites;
char *location; /* This points to an allocated version of the Location:
header data */
char *newurl; /* Set to the new URL to use when a redirect or a retry is
negotiation. */
BIT(sendbuf_init); /* sendbuf is initialized */
BIT(shutdown); /* request end will shutdown connection */
+#ifdef USE_HYPER
+ BIT(bodywritten);
+#endif
};
/**
}
/* Update stats, write and report progress */
data->req.bytecount += nwrite;
- ++data->req.bodywrites;
+#ifdef USE_HYPER
+ data->req.bodywritten = TRUE;
+#endif
result = Curl_pgrsSetDownloadCounter(data, data->req.bytecount);
if(result)
return result;