Home
last modified time | relevance | path

Searched refs:req (Results 1 – 25 of 74) sorted by relevance

123

/curl/lib/
H A Drequest.c45 memset(req, 0, sizeof(*req)); in Curl_req_init()
53 req->done = FALSE; in Curl_req_soft_reset()
62 req->bytecount = 0; in Curl_req_soft_reset()
103 (void)req; in Curl_req_done()
129 req->size = -1; in Curl_req_hard_reset()
133 req->start = t0; in Curl_req_hard_reset()
138 req->offset = 0; in Curl_req_hard_reset()
139 req->httpcode = 0; in Curl_req_hard_reset()
140 req->keepon = 0; in Curl_req_hard_reset()
316 if(data->req.eos_read && !data->req.eos_sent) { in req_flush()
[all …]
H A Dhttp1.c53 Curl_http_req_free(parser->req); in Curl_h1_req_parse_free()
55 parser->req = NULL; in Curl_h1_req_parse_free()
145 DEBUGASSERT(!parser->req); in start_req()
289 else if(!parser->req) { in Curl_h1_req_parse_read()
298 if(!parser->req) { in Curl_h1_req_parse_read()
327 req->method, in Curl_h1_req_write_head()
328 req->scheme ? req->scheme : "", in Curl_h1_req_write_head()
329 req->scheme ? "://" : "", in Curl_h1_req_write_head()
330 req->authority ? req->authority : "", in Curl_h1_req_write_head()
331 req->path ? req->path : "", in Curl_h1_req_write_head()
[all …]
H A Dsmb.c394 struct smb_request *req = data->req.p.smb; in request_state() local
411 (void *)req, names[req->state], names[newstate]); in request_state()
426 if(!req) in smb_setup_connection()
539 struct smb_request *req = data->req.p.smb; in smb_format_message() local
705 struct smb_request *req = data->req.p.smb; in smb_send_open() local
734 struct smb_request *req = data->req.p.smb; in smb_send_close() local
755 struct smb_request *req = data->req.p.smb; in smb_send_read() local
776 struct smb_request *req = data->req.p.smb; in smb_send_write() local
939 struct smb_request *req = data->req.p.smb; in smb_request_state() local
1060 if(data->req.bytecount >= data->req.size) in smb_request_state()
[all …]
H A Dhttp.c500 if(100 <= data->req.httpcode && data->req.httpcode <= 199) in Curl_http_auth_act()
509 (data->req.authneg && data->req.httpcode < 300))) { in Curl_http_auth_act()
523 (data->req.authneg && data->req.httpcode < 300))) { in Curl_http_auth_act()
1627 (void)req; in Curl_add_timecondition()
4070 req = calloc(1, sizeof(*req)); in Curl_http_req_make()
4071 if(!req) in Curl_http_req_make()
4226 req = calloc(1, sizeof(*req)); in Curl_http_req_make2()
4227 if(!req) in Curl_http_req_make2()
4260 if(req) { in Curl_http_req_free()
4266 free(req); in Curl_http_req_free()
[all …]
H A Dc-hyper.c552 if(!req) in debug_request()
554 Curl_debug(data, CURLINFO_HEADER_OUT, req, strlen(req)); in debug_request()
555 free(req); in debug_request()
706 if(!data->req.upload_done && data->req.eos_read) { in uploadstreamed()
727 struct dynbuf req; in finalize_request() local
740 if(Curl_dyn_len(&req) != 2 || strcmp(Curl_dyn_ptr(&req), "\r\n")) { in finalize_request()
765 struct dynbuf req; in cookies() local
965 if(!req) { in Curl_http()
1133 if(data->req.upload_chunky && data->req.authneg) { in Curl_http()
1145 req = NULL; in Curl_http()
[all …]
H A Dsendf.c84 if(!data->req.writer_stack) { in Curl_client_write()
124 data->req.bytecount = 0; in Curl_client_cleanup()
125 data->req.headerline = 0; in Curl_client_cleanup()
130 if(data->req.rewind_read) { in Curl_client_reset()
140 data->req.bytecount = 0; in Curl_client_reset()
141 data->req.headerline = 0; in Curl_client_reset()
146 if(data->req.rewind_read) { in Curl_client_start()
168 return data->req.rewind_read; in Curl_creader_will_rewind()
294 (data->req.maxdownload > data->req.bytecount)) { in cw_download_write()
296 data->req.maxdownload - data->req.bytecount); in cw_download_write()
[all …]
H A Dcurl_range.c62 data->req.maxdownload = to; in Curl_range()
78 data->req.maxdownload = totalsize + 1; /* include last byte */ in Curl_range()
82 from, data->req.maxdownload)); in Curl_range()
86 from, to, data->req.maxdownload)); in Curl_range()
89 data->req.maxdownload = -1; in Curl_range()
H A Dhttp_proxy.c94 struct httpreq *req = NULL; in Curl_http_proxy_create_CONNECT() local
107 result = Curl_http_req_make(&req, "CONNECT", sizeof("CONNECT")-1, in Curl_http_proxy_create_CONNECT()
115 req->authority, TRUE); in Curl_http_proxy_create_CONNECT()
122 result = Curl_dynhds_cadd(&req->headers, "Host", authority); in Curl_http_proxy_create_CONNECT()
128 result = Curl_dynhds_h1_cadd_line(&req->headers, in Curl_http_proxy_create_CONNECT()
136 result = Curl_dynhds_cadd(&req->headers, "User-Agent", in Curl_http_proxy_create_CONNECT()
149 result = Curl_dynhds_add_custom(data, TRUE, &req->headers); in Curl_http_proxy_create_CONNECT()
152 if(result && req) { in Curl_http_proxy_create_CONNECT()
153 Curl_http_req_free(req); in Curl_http_proxy_create_CONNECT()
154 req = NULL; in Curl_http_proxy_create_CONNECT()
[all …]
H A Dif2ip.c192 struct ifreq req; in Curl_if2ip() local
208 if(len >= sizeof(req.ifr_name)) in Curl_if2ip()
215 memset(&req, 0, sizeof(req)); in Curl_if2ip()
216 memcpy(req.ifr_name, interf, len + 1); in Curl_if2ip()
217 req.ifr_addr.sa_family = AF_INET; in Curl_if2ip()
224 if(ioctl(dummy, SIOCGIFADDR, &req) < 0) { in Curl_if2ip()
235 s = (struct sockaddr_in *)(void *)&req.ifr_addr; in Curl_if2ip()
H A Drequest.h163 void Curl_req_init(struct SingleRequest *req);
168 CURLcode Curl_req_start(struct SingleRequest *req,
175 CURLcode Curl_req_soft_reset(struct SingleRequest *req,
185 CURLcode Curl_req_done(struct SingleRequest *req,
191 void Curl_req_free(struct SingleRequest *req, struct Curl_easy *data);
197 void Curl_req_hard_reset(struct SingleRequest *req, struct Curl_easy *data);
H A Dtransfer.c217 if(!eos_reliable && !data->req.header && data->req.size != -1) { in xfer_recv_resp()
218 curl_off_t totalleft = data->req.size - data->req.bytecount; in xfer_recv_resp()
241 if(data->req.shutdown) { in xfer_recv_resp()
310 if(data->req.download_done && data->req.no_body && in sendrecv_dl()
342 if(result || data->req.done) in sendrecv_dl()
441 if(result || data->req.done) in Curl_sendrecv()
450 if(result || data->req.done) in Curl_sendrecv()
517 data->req.done = TRUE; in Curl_sendrecv()
699 data->req.headerbytecount = 0; in Curl_pretransfer()
720 if((data->req.bytecount + data->req.headerbytecount == 0) && in Curl_retry_request()
[all …]
H A Drtsp.c274 data->req.no_body = FALSE; in rtsp_do()
294 data->req.no_body = FALSE; in rtsp_do()
305 data->req.no_body = FALSE; in rtsp_do()
566 data->req.no_body = TRUE; in rtsp_do()
617 (data->req.bytecount < data->req.size); in rtp_write_body_junk()
618 body_remain = in_body ? (data->req.size - data->req.bytecount) : 0; in rtp_write_body_junk()
641 (data->req.bytecount < data->req.size); in rtsp_filter_rtp()
800 if(!data->req.header) in rtsp_rtp_write_resp()
832 if(!data->req.header) in rtsp_rtp_write_resp()
840 data->req.size = 0; in rtsp_rtp_write_resp()
[all …]
H A Dhttp1.h39 struct httpreq *req; member
56 CURLcode Curl_h1_req_dprint(const struct httpreq *req,
59 CURLcode Curl_h1_req_write_head(struct httpreq *req, int http_minor,
H A Dcf-h1-proxy.c220 struct httpreq *req = NULL; in start_CONNECT() local
247 if(req) in start_CONNECT()
248 Curl_http_req_free(req); in start_CONNECT()
577 hyper_request *req = NULL; in start_CONNECT() local
654 req = hyper_request_new(); in start_CONNECT()
655 if(!req) { in start_CONNECT()
764 req = NULL; in start_CONNECT()
787 if(req) in start_CONNECT()
788 hyper_request_free(req); in start_CONNECT()
843 *done = data->req.done; in recv_CONNECT_resp()
[all …]
H A Dhttp.h79 struct dynbuf *req
87 struct dynbuf *req
101 struct dynbuf *req);
250 void Curl_http_req_free(struct httpreq *req);
274 struct httpreq *req, struct Curl_easy *data);
H A Dfile.c141 data->req.p.file = calloc(1, sizeof(struct FILEPROTO)); in file_setup_connection()
142 if(!data->req.p.file) in file_setup_connection()
156 struct FILEPROTO *file = data->req.p.file; in file_connect()
266 struct FILEPROTO *file = data->req.p.file; in file_done()
298 struct FILEPROTO *file = data->req.p.file; in file_upload()
444 file = data->req.p.file; in file_do()
507 if(data->req.no_body) in file_do()
539 if(data->req.maxdownload > 0) in file_do()
540 expected_size = data->req.maxdownload; in file_do()
/curl/tests/server/
H A Drtspd.c205 char *line = &req->reqbuf[req->checkindex]; in ProcessRequest()
278 req->partno = req->testno % 10000; in ProcessRequest()
285 req->testno, req->partno); in ProcessRequest()
486 req->cl = clen - req->skip; in ProcessRequest()
571 line = &req->reqbuf[req->checkindex]; in ProcessRequest()
583 if(req->auth_req && !req->auth) in ProcessRequest()
587 if(req->cl <= req->offset - (end - req->reqbuf) - strlen(END_OF_HEADERS)) in ProcessRequest()
666 pipereq_length = req->offset - req->checkindex; in get_request()
703 got = sread(sock, reqbuf + req->offset, req->cl); in get_request()
756 storerequest(reqbuf, req->pipelining ? req->checkindex : req->offset); in get_request()
[all …]
H A Dsws.c366 char *line = &req->reqbuf[req->checkindex]; in ProcessRequest()
461 req->partno = req->testno % 10000; in ProcessRequest()
470 req->testno, req->partno); in ProcessRequest()
532 req->connect_port, req->testno); in ProcessRequest()
594 req->partno = req->testno % 10000; in ProcessRequest()
602 req->testno, req->partno); in ProcessRequest()
644 req->cl = clen - req->skip; in ProcessRequest()
764 if(req->auth_req && !req->auth) { in ProcessRequest()
777 if(req->cl <= req->offset - (end - req->reqbuf) - strlen(end_of_headers)) in ProcessRequest()
977 req->done_processing = ProcessRequest(req); in get_request()
[all …]
/curl/src/
H A Dtool_helpers.c83 int SetHTTPrequest(struct OperationConfig *config, HttpReq req, HttpReq *store) in SetHTTPrequest() argument
96 (*store == req)) { in SetHTTPrequest()
97 *store = req; in SetHTTPrequest()
102 reqname[req], reqname[*store]); in SetHTTPrequest()
107 void customrequest_helper(struct OperationConfig *config, HttpReq req, in customrequest_helper() argument
122 else if(curl_strequal(method, dflt[req])) { in customrequest_helper()
124 "inferred.", dflt[req]); in customrequest_helper()
H A Dtool_helpers.h30 int SetHTTPrequest(struct OperationConfig *config, HttpReq req,
33 void customrequest_helper(struct OperationConfig *config, HttpReq req,
/curl/tests/unit/
H A Dunit1650.c64 static const struct dohrequest req[] = { variable
163 for(i = 0; i < sizeof(req) / sizeof(req[0]); i++) {
164 DOHcode rc = doh_req_encode(req[i].name, req[i].type,
166 if(rc != req[i].rc) {
168 req[i].rc, rc);
169 abort_if(rc != req[i].rc, "return code");
171 if(size != req[i].size) {
173 req[i].size, size);
175 abort_if(size != req[i].size, "size");
177 if(req[i].packet && memcmp(req[i].packet, buffer, size)) {
[all …]
H A Dunit2603.c101 fail_if(!p.req, "not request created"); in parse_success()
107 if(p.req) { in parse_success()
108 check_eq(p.req->method, t->method, "method"); in parse_success()
109 check_eq(p.req->scheme, t->scheme, "scheme"); in parse_success()
110 check_eq(p.req->authority, t->authority, "authority"); in parse_success()
111 check_eq(p.req->path, t->path, "path"); in parse_success()
112 if(Curl_dynhds_count(&p.req->headers) != t->header_count) { in parse_success()
114 Curl_dynhds_count(&p.req->headers)); in parse_success()
/curl/docs/libcurl/opts/
H A DCURLINFO_REQUEST_SIZE.md48 long req;
49 res = curl_easy_getinfo(curl, CURLINFO_REQUEST_SIZE, &req);
51 printf("Request size: %ld bytes\n", req);
/curl/tests/certs/scripts/
H A Dgenroot.sh73 "$OPENSSL" req -config "$PREFIX-ca.prm" -new -key "$PREFIX-ca.key" -out "$PREFIX-ca.csr" -passin fd…
76 "$OPENSSL" x509 -extfile "$PREFIX-ca.prm" -days "$DURATION" -req -signkey "$PREFIX-ca.key" -in "$PR…
/curl/docs/examples/
H A Dmulti-uv.c141 static void on_uv_socket(uv_poll_t *req, int status, int events) in on_uv_socket() argument
145 curl_context_t *context = (curl_context_t *) req->data; in on_uv_socket()
158 static void on_uv_timeout(uv_timer_t *req) in on_uv_timeout() argument
160 curl_context_t *context = (curl_context_t *) req->data; in on_uv_timeout()

Completed in 77 milliseconds

123