Lines Matching refs:handlep
604 establish_http_connection(const char *what, http_handle_t *handlep,
640 *handlep = http_srv_init(url);
641 if (*handlep == NULL) {
655 if (http_set_random_file(*handlep, "/dev/urandom") < 0) {
656 print_errors("http_set_random_file", *handlep);
657 (void) http_srv_close(*handlep);
670 *handlep);
671 (void) http_srv_close(*handlep);
690 if (http_set_client_certificate_file(*handlep,
693 *handlep);
694 (void) http_srv_close(*handlep);
698 if (http_set_private_key_file(*handlep,
701 *handlep);
702 (void) http_srv_close(*handlep);
713 http_set_password(*handlep, WANBOOT_PASSPHRASE) < 0) {
714 print_errors("http_set_password", *handlep);
715 (void) http_srv_close(*handlep);
724 if (http_set_proxy(*handlep, &proxy_hp) != 0) {
725 print_errors("http_set_proxy", *handlep);
726 (void) http_srv_close(*handlep);
731 (void) http_set_socket_read_timeout(*handlep, SOCKET_READ_TIMEOUT);
736 if (http_srv_connect(*handlep) == -1) {
737 print_errors("http_srv_connect", *handlep);
738 (void) http_srv_close(*handlep);
749 if ((ret = http_get_request(*handlep, url->abspath)) == 0) {
753 print_errors("http_get_request", *handlep);
754 (void) http_srv_close(*handlep);
758 if ((ret = http_get_range_request(*handlep, url->abspath,
763 print_errors("http_get_range_request", *handlep);
764 (void) http_srv_close(*handlep);
772 ret = http_process_headers(*handlep, &resp);
774 print_errors("http_process_headers", *handlep);
775 (void) http_srv_close(*handlep);
790 (void) http_srv_close(*handlep);