Lines Matching full:http
34 http_status_t /* O - HTTP status */
35 cupsGetFd(http_t *http, /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */ in cupsGetFd() argument
41 http_status_t status; /* HTTP status from server */ in cupsGetFd()
52 DEBUG_printf(("cupsGetFd(http=%p, resource=\"%s\", fd=%d)", (void *)http, resource, fd)); in cupsGetFd()
56 if (http) in cupsGetFd()
57 http->error = EINVAL; in cupsGetFd()
62 if (!http) in cupsGetFd()
63 if ((http = _cupsConnect()) == NULL) in cupsGetFd()
67 * Then send GET requests to the HTTP server... in cupsGetFd()
70 strlcpy(if_modified_since, httpGetField(http, HTTP_FIELD_IF_MODIFIED_SINCE), in cupsGetFd()
75 if (!_cups_strcasecmp(httpGetField(http, HTTP_FIELD_CONNECTION), "close")) in cupsGetFd()
77 httpClearFields(http); in cupsGetFd()
78 if (httpReconnect2(http, 30000, NULL)) in cupsGetFd()
85 httpClearFields(http); in cupsGetFd()
86 httpSetField(http, HTTP_FIELD_IF_MODIFIED_SINCE, if_modified_since); in cupsGetFd()
88 digest = http->authstring && !strncmp(http->authstring, "Digest ", 7); in cupsGetFd()
96 _httpSetDigestAuthString(http, http->nextnonce, "GET", resource); in cupsGetFd()
100 if (http->authstring && !strncmp(http->authstring, "Negotiate", 9) && !new_auth) in cupsGetFd()
107 _cupsSetNegotiateAuthString(http, "GET", resource); in cupsGetFd()
111 httpSetField(http, HTTP_FIELD_AUTHORIZATION, http->authstring); in cupsGetFd()
113 if (httpGet(http, resource)) in cupsGetFd()
115 if (httpReconnect2(http, 30000, NULL)) in cupsGetFd()
129 while ((status = httpUpdate(http)) == HTTP_STATUS_CONTINUE); in cupsGetFd()
137 httpFlush(http); in cupsGetFd()
145 if (cupsDoAuthentication(http, "GET", resource)) in cupsGetFd()
151 if (httpReconnect2(http, 30000, NULL)) in cupsGetFd()
163 httpFlush(http); in cupsGetFd()
166 if (httpReconnect2(http, 30000, NULL)) in cupsGetFd()
173 httpEncryption(http, HTTP_ENCRYPTION_REQUIRED); in cupsGetFd()
192 while ((bytes = httpRead2(http, buffer, sizeof(buffer))) > 0) in cupsGetFd()
198 httpFlush(http); in cupsGetFd()
219 http_status_t /* O - HTTP status */
220 cupsGetFile(http_t *http, /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */ in cupsGetFile() argument
232 if (!http || !resource || !filename) in cupsGetFile()
234 if (http) in cupsGetFile()
235 http->error = EINVAL; in cupsGetFile()
250 http->error = errno; in cupsGetFile()
259 status = cupsGetFd(http, resource, fd); in cupsGetFile()
271 * Return the HTTP status code... in cupsGetFile()
287 http_status_t /* O - HTTP status */
288 cupsPutFd(http_t *http, /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */ in cupsPutFd() argument
295 http_status_t status; /* HTTP status from server */ in cupsPutFd()
304 DEBUG_printf(("cupsPutFd(http=%p, resource=\"%s\", fd=%d)", (void *)http, resource, fd)); in cupsPutFd()
308 if (http) in cupsPutFd()
309 http->error = EINVAL; in cupsPutFd()
314 if (!http) in cupsPutFd()
315 if ((http = _cupsConnect()) == NULL) in cupsPutFd()
319 * Then send PUT requests to the HTTP server... in cupsPutFd()
326 if (!_cups_strcasecmp(httpGetField(http, HTTP_FIELD_CONNECTION), "close")) in cupsPutFd()
328 httpClearFields(http); in cupsPutFd()
329 if (httpReconnect2(http, 30000, NULL)) in cupsPutFd()
337 http->authstring)); in cupsPutFd()
339 httpClearFields(http); in cupsPutFd()
340 httpSetField(http, HTTP_FIELD_TRANSFER_ENCODING, "chunked"); in cupsPutFd()
341 httpSetExpect(http, HTTP_STATUS_CONTINUE); in cupsPutFd()
343 digest = http->authstring && !strncmp(http->authstring, "Digest ", 7); in cupsPutFd()
351 _httpSetDigestAuthString(http, http->nextnonce, "PUT", resource); in cupsPutFd()
355 if (http->authstring && !strncmp(http->authstring, "Negotiate", 9) && !new_auth) in cupsPutFd()
362 _cupsSetNegotiateAuthString(http, "PUT", resource); in cupsPutFd()
366 httpSetField(http, HTTP_FIELD_AUTHORIZATION, http->authstring); in cupsPutFd()
368 if (httpPut(http, resource)) in cupsPutFd()
370 if (httpReconnect2(http, 30000, NULL)) in cupsPutFd()
386 if (httpWait(http, 1000)) in cupsPutFd()
387 status = httpUpdate(http); in cupsPutFd()
400 if (httpCheck(http)) in cupsPutFd()
402 if ((status = httpUpdate(http)) != HTTP_STATUS_CONTINUE) in cupsPutFd()
406 httpWrite2(http, buffer, (size_t)bytes); in cupsPutFd()
411 httpWrite2(http, buffer, 0); in cupsPutFd()
413 while ((status = httpUpdate(http)) == HTTP_STATUS_CONTINUE); in cupsPutFd()
423 httpFlush(http); in cupsPutFd()
426 if (httpReconnect2(http, 30000, NULL)) in cupsPutFd()
446 httpFlush(http); in cupsPutFd()
454 if (cupsDoAuthentication(http, "PUT", resource)) in cupsPutFd()
460 if (httpReconnect2(http, 30000, NULL)) in cupsPutFd()
472 httpFlush(http); in cupsPutFd()
475 if (httpReconnect2(http, 30000, NULL)) in cupsPutFd()
482 httpEncryption(http, HTTP_ENCRYPTION_REQUIRED); in cupsPutFd()
499 httpFlush(http); in cupsPutFd()
517 http_status_t /* O - HTTP status */
518 cupsPutFile(http_t *http, /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */ in cupsPutFile() argument
530 if (!http || !resource || !filename) in cupsPutFile()
532 if (http) in cupsPutFile()
533 http->error = EINVAL; in cupsPutFile()
548 http->error = errno; in cupsPutFile()
557 status = cupsPutFd(http, resource, fd); in cupsPutFile()