Bug 27835 - When proxying FTP, all errors turns into 404
Summary: When proxying FTP, all errors turns into 404
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_proxy (show other bugs)
Version: 2.0.48
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Keywords: MassUpdate, PatchAvailable
Depends on:
Reported: 2004-03-22 10:59 UTC by Pascal Terjan
Modified: 2018-11-07 21:09 UTC (History)
0 users

A patch for not accessing failed files as directories (2.41 KB, patch)
2004-03-22 11:01 UTC, Pascal Terjan
Details | Diff
Patch to avoid going in for LIST when it is already detected as a file. (1.34 KB, patch)
2007-08-29 10:52 UTC, rahul
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Terjan 2004-03-22 10:59:03 UTC
When encountering a 550 error on a regular file, proxy_ftp tries to get it as a
directory and fails (as it is a regular file) and send a 404.
This occurs especially on permission denied.

Either the original error message (ftpmessage variable) should be kept and
displayed, or we should not try accessing it as a directory as it was not
detected as a directory.
Comment 1 Pascal Terjan 2004-03-22 11:01:21 UTC
Created attachment 10895 [details]
A patch for not accessing failed files as directories
Comment 2 rahul 2007-08-29 10:52:48 UTC
Created attachment 20729 [details]
Patch to avoid going in for LIST when it is already detected as a file.

SIZE command, while widely implemented, is still not in RFC 959. Which means
if a server responds with 5xx to it, we can not take it to mean that it
it. But if it responds with 2xx, then the server does understand SIZE, and the
entity thus referred is certainly a file.

With this in mind, what the patch does is to not to try CWD into an entity if
the size has already responded with a valid size. (thus asserting it is a file)

This reduces the network transactions by atleast one, making the whole process
Comment 3 Ruediger Pluem 2007-08-29 12:11:44 UTC
Please do NOT change the assignment of bugs. This cuts off the
bugs@httpd.apache.org mailing list from change notifications.
Comment 4 Rainer Jung 2018-02-25 20:55:05 UTC
Undo spam change
Comment 5 William A. Rowe Jr. 2018-11-07 21:09:02 UTC
Please help us to refine our list of open and current defects; this is a mass update of old and inactive Bugzilla reports which reflect user error, already resolved defects, and still-existing defects in httpd.

As repeatedly announced, the Apache HTTP Server Project has discontinued all development and patch review of the 2.2.x series of releases. The final release 2.2.34 was published in July 2017, and no further evaluation of bug reports or security risks will be considered or published for 2.2.x releases. All reports older than 2.4.x have been updated to status RESOLVED/LATER; no further action is expected unless the report still applies to a current version of httpd.

If your report represented a question or confusion about how to use an httpd feature, an unexpected server behavior, problems building or installing httpd, or working with an external component (a third party module, browser etc.) we ask you to start by bringing your question to the User Support and Discussion mailing list, see [https://httpd.apache.org/lists.html#http-users] for details. Include a link to this Bugzilla report for completeness with your question.

If your report was clearly a defect in httpd or a feature request, we ask that you retest using a modern httpd release (2.4.33 or later) released in the past year. If it can be reproduced, please reopen this bug and change the Version field above to the httpd version you have reconfirmed with.

Your help in identifying defects or enhancements still applicable to the current httpd server software release is greatly appreciated.