View | Details | Raw Unified | Return to bug 24922
Collapse All | Expand All

(-)proxy_ftp.c.orig (-6 / +17 lines)
Lines 793-798 Link Here
793
    char buffer[MAX_STRING_LEN];
793
    char buffer[MAX_STRING_LEN];
794
    char *ftpmessage = NULL;
794
    char *ftpmessage = NULL;
795
    char *path, *strp, *type_suffix, *cwd = NULL;
795
    char *path, *strp, *type_suffix, *cwd = NULL;
796
	apr_uri_t uri;							 
796
    char *user = NULL;
797
    char *user = NULL;
797
/*    char *account = NULL; how to supply an account in a URL? */
798
/*    char *account = NULL; how to supply an account in a URL? */
798
    const char *password = NULL;
799
    const char *password = NULL;
Lines 847-859 Link Here
847
    if (r->method_number != M_GET)
848
    if (r->method_number != M_GET)
848
        return HTTP_NOT_IMPLEMENTED;
849
        return HTTP_NOT_IMPLEMENTED;
849
850
850
851
    /* We break the URL into host, port, path-search */
851
    /* We break the URL into host, port, path-search */
852
    connectname = r->parsed_uri.hostname;
852
    if(r->parsed_uri.hostname==NULL){
853
    connectport = (r->parsed_uri.port != 0)
853
        if (APR_SUCCESS != apr_uri_parse(p, url, &uri)) {
854
        ? r->parsed_uri.port
854
            return ap_proxyerror(r, HTTP_BAD_REQUEST,
855
        : apr_uri_port_of_scheme("ftp");
855
								 apr_pstrcat(p,"URI cannot be parsed: ", *url,
856
    path = apr_pstrdup(p, r->parsed_uri.path);
856
											 NULL));
857
		}
858
		connectname = uri.hostname;
859
		connectport = uri.port;
860
		path = apr_pstrdup(p, uri.path);
861
    } else {
862
	    connectname = r->parsed_uri.hostname;
863
		connectport = r->parsed_uri.port;
864
		path = apr_pstrdup(p, r->parsed_uri.path);
865
	}
866
	if (connectport==0)
867
	  connectport = apr_uri_port_of_scheme("ftp");
857
    path = (path != NULL && path[0] != '\0') ? &path[1] : "";
868
    path = (path != NULL && path[0] != '\0') ? &path[1] : "";
858
869
859
    type_suffix = strchr(path, ';');
870
    type_suffix = strchr(path, ';');

Return to bug 24922