Lines Matching refs:resource

114 	php_url *resource = NULL;  in php_stream_url_wrap_http_ex()  local
149 resource = php_url_parse(path); in php_stream_url_wrap_http_ex()
150 if (resource == NULL) { in php_stream_url_wrap_http_ex()
154 …if (strncasecmp(resource->scheme, "http", sizeof("http")) && strncasecmp(resource->scheme, "https"… in php_stream_url_wrap_http_ex()
159 php_url_free(resource); in php_stream_url_wrap_http_ex()
174 php_url_free(resource); in php_stream_url_wrap_http_ex()
178 use_ssl = resource->scheme && (strlen(resource->scheme) > 4) && resource->scheme[4] == 's'; in php_stream_url_wrap_http_ex()
180 if (use_ssl && resource->port == 0) in php_stream_url_wrap_http_ex()
181 resource->port = 443; in php_stream_url_wrap_http_ex()
182 else if (resource->port == 0) in php_stream_url_wrap_http_ex()
183 resource->port = 80; in php_stream_url_wrap_http_ex()
193 …rintf(&transport_string, 0, "%s://%s:%d", use_ssl ? "ssl" : "tcp", resource->host, resource->port); in php_stream_url_wrap_http_ex()
227 smart_str_appends(&header, resource->host); in php_stream_url_wrap_http_ex()
229 smart_str_append_unsigned(&header, resource->port); in php_stream_url_wrap_http_ex()
394 if (resource->path && *resource->path) { in php_stream_url_wrap_http_ex()
395 strlcat(scratch, resource->path, scratch_len); in php_stream_url_wrap_http_ex()
401 if (resource->query) { in php_stream_url_wrap_http_ex()
403 strlcat(scratch, resource->query, scratch_len); in php_stream_url_wrap_http_ex()
522 if (((have_header & HTTP_HEADER_AUTH) == 0) && resource->user) { in php_stream_url_wrap_http_ex()
524 php_url_decode(resource->user, strlen(resource->user)); in php_stream_url_wrap_http_ex()
527 strcpy(scratch, resource->user); in php_stream_url_wrap_http_ex()
531 if (resource->pass) { in php_stream_url_wrap_http_ex()
532 php_url_decode(resource->pass, strlen(resource->pass)); in php_stream_url_wrap_http_ex()
533 strcat(scratch, resource->pass); in php_stream_url_wrap_http_ex()
555 if ((use_ssl && resource->port != 443 && resource->port != 0) || in php_stream_url_wrap_http_ex()
556 (!use_ssl && resource->port != 80 && resource->port != 0)) { in php_stream_url_wrap_http_ex()
557 if (snprintf(scratch, scratch_len, "Host: %s:%i\r\n", resource->host, resource->port) > 0) in php_stream_url_wrap_http_ex()
560 if (snprintf(scratch, scratch_len, "Host: %s\r\n", resource->host) > 0) { in php_stream_url_wrap_http_ex()
816 if (*(location+1) != '\0' && resource->path) { in php_stream_url_wrap_http_ex()
817 char *s = strrchr(resource->path, '/'); in php_stream_url_wrap_http_ex()
819 s = resource->path; in php_stream_url_wrap_http_ex()
822 s = resource->path = estrdup("/"); in php_stream_url_wrap_http_ex()
828 if (resource->path && *(resource->path) == '/' && *(resource->path + 1) == '\0') { in php_stream_url_wrap_http_ex()
829 snprintf(loc_path, sizeof(loc_path) - 1, "%s%s", resource->path, location); in php_stream_url_wrap_http_ex()
831 snprintf(loc_path, sizeof(loc_path) - 1, "%s/%s", resource->path, location); in php_stream_url_wrap_http_ex()
839 if ((use_ssl && resource->port != 443) || (!use_ssl && resource->port != 80)) { in php_stream_url_wrap_http_ex()
840 …printf(new_path, sizeof(new_path) - 1, "%s://%s:%d%s", resource->scheme, resource->host, resource-… in php_stream_url_wrap_http_ex()
842 … snprintf(new_path, sizeof(new_path) - 1, "%s://%s%s", resource->scheme, resource->host, loc_path); in php_stream_url_wrap_http_ex()
848 php_url_free(resource); in php_stream_url_wrap_http_ex()
850 if ((resource = php_url_parse(new_path)) == NULL) { in php_stream_url_wrap_http_ex()
872 CHECK_FOR_CNTRL_CHARS(resource->user) in php_stream_url_wrap_http_ex()
873 CHECK_FOR_CNTRL_CHARS(resource->pass) in php_stream_url_wrap_http_ex()
874 CHECK_FOR_CNTRL_CHARS(resource->path) in php_stream_url_wrap_http_ex()
894 if (resource) { in php_stream_url_wrap_http_ex()
895 php_url_free(resource); in php_stream_url_wrap_http_ex()