Lines Matching refs:resource

117 	php_url *resource = NULL;  in php_stream_url_wrap_http_ex()  local
154 resource = php_url_parse(path); in php_stream_url_wrap_http_ex()
155 if (resource == NULL) { in php_stream_url_wrap_http_ex()
159 …if (strncasecmp(resource->scheme, "http", sizeof("http")) && strncasecmp(resource->scheme, "https"… in php_stream_url_wrap_http_ex()
164 php_url_free(resource); in php_stream_url_wrap_http_ex()
179 php_url_free(resource); in php_stream_url_wrap_http_ex()
183 use_ssl = resource->scheme && (strlen(resource->scheme) > 4) && resource->scheme[4] == 's'; in php_stream_url_wrap_http_ex()
185 if (use_ssl && resource->port == 0) in php_stream_url_wrap_http_ex()
186 resource->port = 443; in php_stream_url_wrap_http_ex()
187 else if (resource->port == 0) in php_stream_url_wrap_http_ex()
188 resource->port = 80; in php_stream_url_wrap_http_ex()
198 …rintf(&transport_string, 0, "%s://%s:%d", use_ssl ? "ssl" : "tcp", resource->host, resource->port); in php_stream_url_wrap_http_ex()
241 ZVAL_STRING(&ssl_proxy_peer_name, resource->host); in php_stream_url_wrap_http_ex()
247 smart_str_appends(&header, resource->host); in php_stream_url_wrap_http_ex()
249 smart_str_append_unsigned(&header, resource->port); in php_stream_url_wrap_http_ex()
395 if (resource->path && *resource->path) { in php_stream_url_wrap_http_ex()
396 smart_str_appends(&req_buf, resource->path); in php_stream_url_wrap_http_ex()
402 if (resource->query) { in php_stream_url_wrap_http_ex()
404 smart_str_appends(&req_buf, resource->query); in php_stream_url_wrap_http_ex()
531 if (((have_header & HTTP_HEADER_AUTH) == 0) && resource->user) { in php_stream_url_wrap_http_ex()
538 php_url_decode(resource->user, strlen(resource->user)); in php_stream_url_wrap_http_ex()
540 strcpy(scratch, resource->user); in php_stream_url_wrap_http_ex()
544 if (resource->pass) { in php_stream_url_wrap_http_ex()
545 php_url_decode(resource->pass, strlen(resource->pass)); in php_stream_url_wrap_http_ex()
546 strcat(scratch, resource->pass); in php_stream_url_wrap_http_ex()
571 smart_str_appends(&req_buf, resource->host); in php_stream_url_wrap_http_ex()
572 if ((use_ssl && resource->port != 443 && resource->port != 0) || in php_stream_url_wrap_http_ex()
573 (!use_ssl && resource->port != 80 && resource->port != 0)) { in php_stream_url_wrap_http_ex()
575 smart_str_append_unsigned(&req_buf, resource->port); in php_stream_url_wrap_http_ex()
879 if (*(location+1) != '\0' && resource->path) { in php_stream_url_wrap_http_ex()
880 char *s = strrchr(resource->path, '/'); in php_stream_url_wrap_http_ex()
882 s = resource->path; in php_stream_url_wrap_http_ex()
885 s = resource->path = estrdup("/"); in php_stream_url_wrap_http_ex()
891 if (resource->path && *(resource->path) == '/' && *(resource->path + 1) == '\0') { in php_stream_url_wrap_http_ex()
892 snprintf(loc_path, sizeof(loc_path) - 1, "%s%s", resource->path, location); in php_stream_url_wrap_http_ex()
894 snprintf(loc_path, sizeof(loc_path) - 1, "%s/%s", resource->path, location); in php_stream_url_wrap_http_ex()
902 if ((use_ssl && resource->port != 443) || (!use_ssl && resource->port != 80)) { in php_stream_url_wrap_http_ex()
903 …printf(new_path, sizeof(new_path) - 1, "%s://%s:%d%s", resource->scheme, resource->host, resource-… in php_stream_url_wrap_http_ex()
905 … snprintf(new_path, sizeof(new_path) - 1, "%s://%s%s", resource->scheme, resource->host, loc_path); in php_stream_url_wrap_http_ex()
911 php_url_free(resource); in php_stream_url_wrap_http_ex()
913 if ((resource = php_url_parse(new_path)) == NULL) { in php_stream_url_wrap_http_ex()
935 CHECK_FOR_CNTRL_CHARS(resource->user) in php_stream_url_wrap_http_ex()
936 CHECK_FOR_CNTRL_CHARS(resource->pass) in php_stream_url_wrap_http_ex()
937 CHECK_FOR_CNTRL_CHARS(resource->path) in php_stream_url_wrap_http_ex()
952 if (resource) { in php_stream_url_wrap_http_ex()
953 php_url_free(resource); in php_stream_url_wrap_http_ex()