Lines Matching refs:resource
117 php_url *resource = NULL; in php_stream_url_wrap_http_ex() local
152 resource = php_url_parse(path); in php_stream_url_wrap_http_ex()
153 if (resource == NULL) { in php_stream_url_wrap_http_ex()
157 …if (strncasecmp(resource->scheme, "http", sizeof("http")) && strncasecmp(resource->scheme, "https"… in php_stream_url_wrap_http_ex()
162 php_url_free(resource); in php_stream_url_wrap_http_ex()
177 php_url_free(resource); in php_stream_url_wrap_http_ex()
181 use_ssl = resource->scheme && (strlen(resource->scheme) > 4) && resource->scheme[4] == 's'; in php_stream_url_wrap_http_ex()
183 if (use_ssl && resource->port == 0) in php_stream_url_wrap_http_ex()
184 resource->port = 443; in php_stream_url_wrap_http_ex()
185 else if (resource->port == 0) in php_stream_url_wrap_http_ex()
186 resource->port = 80; in php_stream_url_wrap_http_ex()
196 …rintf(&transport_string, 0, "%s://%s:%d", use_ssl ? "ssl" : "tcp", resource->host, resource->port); in php_stream_url_wrap_http_ex()
232 ZVAL_STRING(ssl_proxy_peer_name, resource->host, 1); in php_stream_url_wrap_http_ex()
237 smart_str_appends(&header, resource->host); in php_stream_url_wrap_http_ex()
239 smart_str_append_unsigned(&header, resource->port); in php_stream_url_wrap_http_ex()
404 if (resource->path && *resource->path) { in php_stream_url_wrap_http_ex()
405 strlcat(scratch, resource->path, scratch_len); in php_stream_url_wrap_http_ex()
411 if (resource->query) { in php_stream_url_wrap_http_ex()
413 strlcat(scratch, resource->query, scratch_len); in php_stream_url_wrap_http_ex()
535 if (((have_header & HTTP_HEADER_AUTH) == 0) && resource->user) { in php_stream_url_wrap_http_ex()
537 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()
568 if ((use_ssl && resource->port != 443 && resource->port != 0) || in php_stream_url_wrap_http_ex()
569 (!use_ssl && resource->port != 80 && resource->port != 0)) { in php_stream_url_wrap_http_ex()
570 if (snprintf(scratch, scratch_len, "Host: %s:%i\r\n", resource->host, resource->port) > 0) in php_stream_url_wrap_http_ex()
573 if (snprintf(scratch, scratch_len, "Host: %s\r\n", resource->host) > 0) { in php_stream_url_wrap_http_ex()
857 if (*(location+1) != '\0' && resource->path) { in php_stream_url_wrap_http_ex()
858 char *s = strrchr(resource->path, '/'); in php_stream_url_wrap_http_ex()
860 s = resource->path; in php_stream_url_wrap_http_ex()
863 s = resource->path = estrdup("/"); in php_stream_url_wrap_http_ex()
869 if (resource->path && *(resource->path) == '/' && *(resource->path + 1) == '\0') { in php_stream_url_wrap_http_ex()
870 snprintf(loc_path, sizeof(loc_path) - 1, "%s%s", resource->path, location); in php_stream_url_wrap_http_ex()
872 snprintf(loc_path, sizeof(loc_path) - 1, "%s/%s", resource->path, location); in php_stream_url_wrap_http_ex()
880 if ((use_ssl && resource->port != 443) || (!use_ssl && resource->port != 80)) { in php_stream_url_wrap_http_ex()
881 …printf(new_path, sizeof(new_path) - 1, "%s://%s:%d%s", resource->scheme, resource->host, resource-… in php_stream_url_wrap_http_ex()
883 … snprintf(new_path, sizeof(new_path) - 1, "%s://%s%s", resource->scheme, resource->host, loc_path); in php_stream_url_wrap_http_ex()
889 php_url_free(resource); in php_stream_url_wrap_http_ex()
891 if ((resource = php_url_parse(new_path)) == NULL) { in php_stream_url_wrap_http_ex()
913 CHECK_FOR_CNTRL_CHARS(resource->user) in php_stream_url_wrap_http_ex()
914 CHECK_FOR_CNTRL_CHARS(resource->pass) in php_stream_url_wrap_http_ex()
915 CHECK_FOR_CNTRL_CHARS(resource->path) in php_stream_url_wrap_http_ex()
935 if (resource) { in php_stream_url_wrap_http_ex()
936 php_url_free(resource); in php_stream_url_wrap_http_ex()