ASF Bugzilla – Attachment 10894 Details for
Bug 27834
Proxyied FTP directories without / generate wrong links in listing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
A patch to add / using Location: when on a directory
httpd-2.0.48-mod_proxy_ftp_location.patch (text/plain), 1.33 KB, created by
Pascal Terjan
on 2004-03-22 10:49:44 UTC
(
hide
)
Description:
A patch to add / using Location: when on a directory
Filename:
MIME Type:
Creator:
Pascal Terjan
Created:
2004-03-22 10:49:44 UTC
Size:
1.33 KB
patch
obsolete
>--- proxy_ftp.c.orig 2004-03-22 11:36:51.397510760 +0100 >+++ proxy_ftp.c 2004-03-22 11:47:04.141359536 +0100 >@@ -1531,9 +1531,12 @@ > size = ftpmessage; /* already pstrdup'ed: no copy necessary */ > } > else if (rc == 550) { /* Not a regular file */ >+ char *nuri; >+ char *ext; >+ > ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, > "proxy: FTP: SIZE shows this is a directory"); >- dirlisting = 1; >+ > rc = proxy_ftp_command(apr_pstrcat(p, "CWD ", > ftp_escape_globbingchars(p, path), CRLF, NULL), > r, origin, bb, &ftpmessage); >@@ -1555,8 +1558,16 @@ > if (rc != 250) { > return ap_proxyerror(r, HTTP_BAD_GATEWAY, ftpmessage); > } >- path = ""; >- len = 0; >+ if ((ext = strstr(r->parsed_uri.path, ";")) != NULL) >+ *ext++ = '\0'; >+ r->parsed_uri.path = apr_pstrcat(r->pool, r->parsed_uri.path, >+ "/", NULL); >+ nuri = apr_uri_unparse(r->pool, >+ &r->parsed_uri, >+ APR_URI_UNP_REVEALPASSWORD); >+ >+ apr_table_set(r->headers_out, "Location", nuri); >+ return HTTP_MOVED_PERMANENTLY; > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 27834
:
10894
|
13844