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

(-)proxy_ftp.c.orig (-3 / +14 lines)
Lines 1531-1539 Link Here
1531
                 size = ftpmessage; /* already pstrdup'ed: no copy necessary */
1531
                 size = ftpmessage; /* already pstrdup'ed: no copy necessary */
1532
        }
1532
        }
1533
        else if (rc == 550) {    /* Not a regular file */
1533
        else if (rc == 550) {    /* Not a regular file */
1534
		    char *nuri;
1535
			char *ext;
1536
            
1534
            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
1537
            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
1535
                             "proxy: FTP: SIZE shows this is a directory");
1538
                             "proxy: FTP: SIZE shows this is a directory");
1536
            dirlisting = 1;
1539
1537
            rc = proxy_ftp_command(apr_pstrcat(p, "CWD ", 
1540
            rc = proxy_ftp_command(apr_pstrcat(p, "CWD ", 
1538
                           ftp_escape_globbingchars(p, path), CRLF, NULL),
1541
                           ftp_escape_globbingchars(p, path), CRLF, NULL),
1539
                           r, origin, bb, &ftpmessage);
1542
                           r, origin, bb, &ftpmessage);
Lines 1555-1562 Link Here
1555
            if (rc != 250) {
1558
            if (rc != 250) {
1556
                return ap_proxyerror(r, HTTP_BAD_GATEWAY, ftpmessage);
1559
                return ap_proxyerror(r, HTTP_BAD_GATEWAY, ftpmessage);
1557
            }
1560
            }
1558
            path = "";
1561
			if ((ext = strstr(r->parsed_uri.path, ";")) != NULL)
1559
            len = 0;
1562
			  *ext++ = '\0';
1563
            r->parsed_uri.path = apr_pstrcat(r->pool, r->parsed_uri.path,
1564
                                         "/", NULL);
1565
            nuri = apr_uri_unparse(r->pool,
1566
                           &r->parsed_uri,
1567
                           APR_URI_UNP_REVEALPASSWORD);
1568
1569
            apr_table_set(r->headers_out, "Location", nuri);
1570
            return HTTP_MOVED_PERMANENTLY;
1560
        }
1571
        }
1561
    }
1572
    }
1562
1573

Return to bug 27834