Lines Matching refs:url

680 _http_connect(struct url *URL, struct url *purl, const char *flags)  in _http_connect()
732 static struct url *
735 struct url *purl; in _http_get_proxy()
803 _http_request(struct url *URL, const char *op, struct url_stat *us, in _http_request()
804 struct url *purl, const char *flags) in _http_request()
807 struct url *url, *new; in _http_request() local
827 url = URL; in _http_request()
845 if (!url->port) in _http_request()
846 url->port = _fetch_default_port(url->scheme); in _http_request()
849 if (purl == NULL && strcmp(url->scheme, SCHEME_FTP) == 0) { in _http_request()
851 return (_ftp_request(url, "RETR", us, purl, flags)); in _http_request()
853 return (_ftp_request(url, "STAT", us, purl, flags)); in _http_request()
857 if ((conn = _http_connect(url, purl, flags)) == NULL) in _http_request()
860 host = url->host; in _http_request()
862 if (strchr(url->host, ':')) { in _http_request()
863 snprintf(hbuf, sizeof(hbuf), "[%s]", url->host); in _http_request()
867 if (url->port != _fetch_default_port(url->scheme)) { in _http_request()
873 sizeof(hbuf) - strlen(hbuf), ":%d", url->port); in _http_request()
879 url->scheme, host, url->doc); in _http_request()
882 op, url->scheme, host, url->doc); in _http_request()
885 op, url->doc); in _http_request()
901 if (need_auth || *url->user || *url->pwd) { in _http_request()
902 if (*url->user || *url->pwd) in _http_request()
903 _http_basic_auth(conn, "Authorization", url->user, url->pwd); in _http_request()
906 else if (fetchAuthMethod && fetchAuthMethod(url) == 0) { in _http_request()
907 _http_basic_auth(conn, "Authorization", url->user, url->pwd); in _http_request()
918 url->scheme, host, url->doc); in _http_request()
926 if (url->offset > 0) in _http_request()
927 _http_cmd(conn, "Range: bytes=%lld-", (long long)url->offset); in _http_request()
1028 new = fetchMakeURL(url->scheme, url->host, url->port, p, in _http_request()
1029 url->user, url->pwd); in _http_request()
1038 strcpy(new->user, url->user); in _http_request()
1039 strcpy(new->pwd, url->pwd); in _http_request()
1041 new->offset = url->offset; in _http_request()
1042 new->length = url->length; in _http_request()
1072 if (url->offset == size && url->length == 0) { in _http_request()
1074 offset = url->offset; in _http_request()
1096 if (url != URL) in _http_request()
1097 fetchFreeURL(url); in _http_request()
1098 url = new; in _http_request()
1150 if (url != URL) in _http_request()
1151 fetchFreeURL(url); in _http_request()
1164 if (url != URL) in _http_request()
1165 fetchFreeURL(url); in _http_request()
1182 fetchXGetHTTP(struct url *URL, struct url_stat *us, const char *flags) in fetchXGetHTTP()
1191 fetchGetHTTP(struct url *URL, const char *flags) in fetchGetHTTP()
1201 fetchPutHTTP(struct url *URL __unused, const char *flags __unused) in fetchPutHTTP()
1211 fetchStatHTTP(struct url *URL, struct url_stat *us, const char *flags) in fetchStatHTTP()
1227 fetchListHTTP(struct url *url __unused, const char *flags __unused) in fetchListHTTP()