Lines Matching refs:k

2377   struct SingleRequest *k = &data->req;  in Curl_http_firstwrite()  local
2383 k->keepon &= ~KEEP_RECV; in Curl_http_firstwrite()
2384 k->done = TRUE; in Curl_http_firstwrite()
2389 k->ignorebody = TRUE; in Curl_http_firstwrite()
2392 if(data->state.resume_from && !k->content_range && in Curl_http_firstwrite()
2394 !k->ignorebody) { in Curl_http_firstwrite()
2396 if(k->size == data->state.resume_from) { in Curl_http_firstwrite()
2402 k->keepon &= ~KEEP_RECV; in Curl_http_firstwrite()
2403 k->done = TRUE; in Curl_http_firstwrite()
2420 if(!Curl_meets_timecondition(data, k->timeofdoc)) { in Curl_http_firstwrite()
2421 k->done = TRUE; in Curl_http_firstwrite()
2824 struct SingleRequest *k = &data->req; in Curl_http_header() local
2852 v = (!k->http_bodyless && !data->set.ignorecl) ? in Curl_http_header()
2859 k->size = contentlength; in Curl_http_header()
2860 k->maxdownload = k->size; in Curl_http_header()
2878 v = (!k->http_bodyless && data->set.str[STRING_ENCODING]) ? in Curl_http_header()
2927 v = !k->http_bodyless ? HD_VAL(hd, hdlen, "Content-Range:") : NULL; in Curl_http_header()
2948 if(!curlx_strtoofft(ptr, NULL, 10, &k->offset)) { in Curl_http_header()
2949 if(data->state.resume_from == k->offset) in Curl_http_header()
2951 k->content_range = TRUE; in Curl_http_header()
2954 else if(k->httpcode < 300) in Curl_http_header()
2960 v = (!k->http_bodyless && in Curl_http_header()
2964 k->timeofdoc = Curl_getdate_capped(v); in Curl_http_header()
2966 data->info.filetime = k->timeofdoc; in Curl_http_header()
2969 if((k->httpcode >= 300 && k->httpcode < 400) && in Curl_http_header()
3028 if((407 == k->httpcode) && HD_IS(hd, hdlen, "Proxy-authenticate:")) { in Curl_http_header()
3132 v = (!k->http_bodyless && in Curl_http_header()
3134 (k->httpcode != 304)) ? in Curl_http_header()
3142 if(!k->chunk && data->set.http_transfer_encoding) { in Curl_http_header()
3147 k->ignore_cl = TRUE; in Curl_http_header()
3159 if((401 == k->httpcode) && HD_IS(hd, hdlen, "WWW-Authenticate:")) { in Curl_http_header()
3185 struct SingleRequest *k = &data->req; in Curl_http_statusline() local
3187 switch(k->httpversion) { in Curl_http_statusline()
3198 (k->httpversion/10 != conn->httpversion/10)) { in Curl_http_statusline()
3200 conn->httpversion/10, k->httpversion/10); in Curl_http_statusline()
3206 k->httpversion/10, k->httpversion%10); in Curl_http_statusline()
3210 data->info.httpcode = k->httpcode; in Curl_http_statusline()
3211 data->info.httpversion = k->httpversion; in Curl_http_statusline()
3212 conn->httpversion = (unsigned char)k->httpversion; in Curl_http_statusline()
3214 if(!data->state.httpversion || data->state.httpversion > k->httpversion) in Curl_http_statusline()
3216 data->state.httpversion = (unsigned char)k->httpversion; in Curl_http_statusline()
3227 k->httpcode == 416) { in Curl_http_statusline()
3230 k->ignorebody = TRUE; /* Avoid appending error msg to good data. */ in Curl_http_statusline()
3233 if(k->httpversion == 10) { in Curl_http_statusline()
3240 else if(k->httpversion == 20 || in Curl_http_statusline()
3241 (k->upgr101 == UPGR101_H2 && k->httpcode == 101)) { in Curl_http_statusline()
3245 k->http_bodyless = k->httpcode >= 100 && k->httpcode < 200; in Curl_http_statusline()
3246 switch(k->httpcode) { in Curl_http_statusline()
3261 k->size = 0; in Curl_http_statusline()
3262 k->maxdownload = 0; in Curl_http_statusline()
3263 k->http_bodyless = TRUE; in Curl_http_statusline()
3278 struct SingleRequest *k = &data->req; in Curl_http_size() local
3279 if(data->req.ignore_cl || k->chunk) { in Curl_http_size()
3280 k->size = k->maxdownload = -1; in Curl_http_size()
3282 else if(k->size != -1) { in Curl_http_size()
3284 !k->ignorebody && in Curl_http_size()
3285 (k->size > data->set.max_filesize)) { in Curl_http_size()
3289 if(k->ignorebody) in Curl_http_size()
3291 Curl_pgrsSetDownloadSize(data, k->size); in Curl_http_size()
3292 k->maxdownload = k->size; in Curl_http_size()
3300 struct SingleRequest *k = &data->req; in verify_header() local
3307 if(k->headerline < 2) in verify_header()
3310 if(((hd[0] == ' ') || (hd[0] == '\t')) && k->headerline > 2) in verify_header()
3385 struct SingleRequest *k = &data->req; in http_on_response() local
3390 if(k->upgr101 == UPGR101_RECEIVED) { in http_on_response()
3396 if(k->httpcode < 200 && last_hd) { in http_on_response()
3406 if(k->httpcode < 100) { in http_on_response()
3411 else if(k->httpcode < 200) { in http_on_response()
3414 k->header = TRUE; in http_on_response()
3415 k->headerline = 0; /* restart the header line counter */ in http_on_response()
3417 switch(k->httpcode) { in http_on_response()
3435 if(k->upgr101 == UPGR101_H2) { in http_on_response()
3438 k->upgr101 = UPGR101_RECEIVED; in http_on_response()
3441 k->header = TRUE; in http_on_response()
3442 k->headerline = 0; /* restart the header line counter */ in http_on_response()
3451 else if(k->upgr101 == UPGR101_WS) { in http_on_response()
3458 k->header = FALSE; /* we will not get more responses */ in http_on_response()
3460 k->keepon &= ~KEEP_RECV; /* read no more content */ in http_on_response()
3468 k->header = FALSE; in http_on_response()
3481 k->header = FALSE; in http_on_response()
3483 if(k->upgr101 == UPGR101_H2) { in http_on_response()
3490 if((k->size == -1) && !k->chunk && !conn->bits.close && in http_on_response()
3538 failf(data, "Refused WebSockets upgrade: %d", k->httpcode); in http_on_response()
3547 k->httpcode); in http_on_response()
3559 if(k->httpcode >= 300) { in http_on_response()
3583 if((k->httpcode == 417) && Curl_http_exp100_is_selected(data)) { in http_on_response()
3586 if(!k->writebytecount && http_exp100_is_waiting(data)) { in http_on_response()
3624 k->keepon |= KEEP_SEND; in http_on_response()
3633 k->download_done = TRUE; in http_on_response()
3640 if(0 == k->maxdownload in http_on_response()
3643 k->download_done = TRUE; in http_on_response()
3670 struct SingleRequest *k = &data->req; in http_rw_hd() local
3702 if(!k->headerline++) { in http_rw_hd()
3707 k->httpversion = 0; /* Do not know yet */ in http_rw_hd()
3727 k->httpversion = 10 + (p[1] - '0'); in http_rw_hd()
3730 k->httpcode = (p[0] - '0') * 100 + (p[1] - '0') * 10 + in http_rw_hd()
3747 k->httpversion = (*p - '0') * 10; in http_rw_hd()
3750 k->httpcode = (p[0] - '0') * 100 + (p[1] - '0') * 10 + in http_rw_hd()
3771 k->httpcode = 200; in http_rw_hd()
3772 k->httpversion = 10; in http_rw_hd()
3788 k->httpcode = (p[0] - '0') * 100 + (p[1] - '0') * 10 + in http_rw_hd()
3793 k->httpversion = 11; /* RTSP acts like HTTP 1.1 */ in http_rw_hd()
3811 k->header = FALSE; /* this is not a header line */ in http_rw_hd()
3829 if(k->httpcode/100 == 1) in http_rw_hd()
3851 struct SingleRequest *k = &data->req; in http_parse_headers() local
3857 while(blen && k->header) { in http_parse_headers()
3869 if(!k->headerline) { in http_parse_headers()
3878 k->header = FALSE; in http_parse_headers()
3908 if(!k->headerline) { in http_parse_headers()
3924 k->header = FALSE; in http_parse_headers()
3950 if(!k->header && !leftover_body) { in http_parse_headers()