Lines Matching refs:resource

152 	php_url *resource = NULL;  in php_stream_url_wrap_http_ex()  local
186 resource = php_url_parse(path); in php_stream_url_wrap_http_ex()
187 if (resource == NULL) { in php_stream_url_wrap_http_ex()
191 ZEND_ASSERT(resource->scheme); in php_stream_url_wrap_http_ex()
192 if (!zend_string_equals_literal_ci(resource->scheme, "http") && in php_stream_url_wrap_http_ex()
193 !zend_string_equals_literal_ci(resource->scheme, "https")) { in php_stream_url_wrap_http_ex()
198 php_url_free(resource); in php_stream_url_wrap_http_ex()
211 php_url_free(resource); in php_stream_url_wrap_http_ex()
220 use_ssl = (ZSTR_LEN(resource->scheme) > 4) && ZSTR_VAL(resource->scheme)[4] == 's'; in php_stream_url_wrap_http_ex()
222 if (use_ssl && resource->port == 0) in php_stream_url_wrap_http_ex()
223 resource->port = 443; in php_stream_url_wrap_http_ex()
224 else if (resource->port == 0) in php_stream_url_wrap_http_ex()
225 resource->port = 80; in php_stream_url_wrap_http_ex()
234 …end_strpprintf(0, "%s://%s:%d", use_ssl ? "ssl" : "tcp", ZSTR_VAL(resource->host), resource->port); in php_stream_url_wrap_http_ex()
240 php_url_free(resource); in php_stream_url_wrap_http_ex()
256 php_url_free(resource); in php_stream_url_wrap_http_ex()
296 ZVAL_STR_COPY(&ssl_proxy_peer_name, resource->host); in php_stream_url_wrap_http_ex()
302 smart_str_appends(&header, ZSTR_VAL(resource->host)); in php_stream_url_wrap_http_ex()
304 smart_str_append_unsigned(&header, resource->port); in php_stream_url_wrap_http_ex()
410 if (resource->path && ZSTR_LEN(resource->path)) { in php_stream_url_wrap_http_ex()
411 smart_str_appends(&req_buf, ZSTR_VAL(resource->path)); in php_stream_url_wrap_http_ex()
417 if (resource->query) { in php_stream_url_wrap_http_ex()
419 smart_str_appends(&req_buf, ZSTR_VAL(resource->query)); in php_stream_url_wrap_http_ex()
532 if (((have_header & HTTP_HEADER_AUTH) == 0) && resource->user) { in php_stream_url_wrap_http_ex()
539 php_url_decode(ZSTR_VAL(resource->user), ZSTR_LEN(resource->user)); in php_stream_url_wrap_http_ex()
541 strcpy(scratch, ZSTR_VAL(resource->user)); in php_stream_url_wrap_http_ex()
545 if (resource->pass) { in php_stream_url_wrap_http_ex()
546 php_url_decode(ZSTR_VAL(resource->pass), ZSTR_LEN(resource->pass)); in php_stream_url_wrap_http_ex()
547 strcat(scratch, ZSTR_VAL(resource->pass)); in php_stream_url_wrap_http_ex()
572 smart_str_appends(&req_buf, ZSTR_VAL(resource->host)); in php_stream_url_wrap_http_ex()
573 if ((use_ssl && resource->port != 443 && resource->port != 0) || in php_stream_url_wrap_http_ex()
574 (!use_ssl && resource->port != 80 && resource->port != 0)) { in php_stream_url_wrap_http_ex()
576 smart_str_append_unsigned(&req_buf, resource->port); in php_stream_url_wrap_http_ex()
880 if (*(location+1) != '\0' && resource->path) { in php_stream_url_wrap_http_ex()
881 char *s = strrchr(ZSTR_VAL(resource->path), '/'); in php_stream_url_wrap_http_ex()
883 s = ZSTR_VAL(resource->path); in php_stream_url_wrap_http_ex()
884 if (!ZSTR_LEN(resource->path)) { in php_stream_url_wrap_http_ex()
885 zend_string_release_ex(resource->path, 0); in php_stream_url_wrap_http_ex()
886 resource->path = ZSTR_INIT_LITERAL("/", 0); in php_stream_url_wrap_http_ex()
887 s = ZSTR_VAL(resource->path); in php_stream_url_wrap_http_ex()
893 if (resource->path && in php_stream_url_wrap_http_ex()
894 ZSTR_VAL(resource->path)[0] == '/' && in php_stream_url_wrap_http_ex()
895 ZSTR_VAL(resource->path)[1] == '\0') { in php_stream_url_wrap_http_ex()
896 snprintf(loc_path, sizeof(loc_path) - 1, "%s%s", ZSTR_VAL(resource->path), location); in php_stream_url_wrap_http_ex()
898 snprintf(loc_path, sizeof(loc_path) - 1, "%s/%s", ZSTR_VAL(resource->path), location); in php_stream_url_wrap_http_ex()
906 if ((use_ssl && resource->port != 443) || (!use_ssl && resource->port != 80)) { in php_stream_url_wrap_http_ex()
907 …h, sizeof(new_path) - 1, "%s://%s:%d%s", ZSTR_VAL(resource->scheme), ZSTR_VAL(resource->host), res… in php_stream_url_wrap_http_ex()
909 …ntf(new_path, sizeof(new_path) - 1, "%s://%s%s", ZSTR_VAL(resource->scheme), ZSTR_VAL(resource->ho… in php_stream_url_wrap_http_ex()
915 php_url_free(resource); in php_stream_url_wrap_http_ex()
917 if ((resource = php_url_parse(new_path)) == NULL) { in php_stream_url_wrap_http_ex()
938 CHECK_FOR_CNTRL_CHARS(resource->user); in php_stream_url_wrap_http_ex()
939 CHECK_FOR_CNTRL_CHARS(resource->pass); in php_stream_url_wrap_http_ex()
940 CHECK_FOR_CNTRL_CHARS(resource->path); in php_stream_url_wrap_http_ex()
964 if (resource) { in php_stream_url_wrap_http_ex()
965 php_url_free(resource); in php_stream_url_wrap_http_ex()