httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Poirier <>
Subject Re: Serving filenames with wildcards using mod_proxy_ftp
Date Tue, 24 Feb 2009 15:29:27 GMT
Sorry, I didn't expect the patch to end up before the explanation.
Here's the message that should have come first.

We need to be able to serve files whose names contain wildcards using
mod_proxy_ftp.  Right now, mod_proxy_ftp provides a file listing when
it sees wildcards in the filename requested, which is reasonable for
interactive browsing of an FTP site.  In this case, though, we need to
actually get files with those names, and we don't need the browsing
function (we already know the filenames).  Unfortunately, we don't
control the filenames, or we'd just use filenames without wildcards
and avoid all this.

The solution I'm thinking about is to add a directive to allow
selectively disabling the behavior of doing file listings when
wildcards are seen in the requested filename.  E.g.:

  The ProxyFtpListOnWildcard directive controls whether wildcard
  characters ("*?[{~") in requested filenames cause mod_proxy_ftp to
  return a listing of files instead of downloading a file.  By default
  (value on), they do.  Set to "off" to allow downloading files even
  if they have wildcard characters in their names.  (directory

I'd appreciate comments on this approach, and my proposed
implementation (patch against trunk is attached).  

Also, in testing that change, I found that mod_proxy_ftp escapes
wildcards in filenames using backslashes when sending them to the FTP
server, which none of the FTP servers I was testing with understood.
To continue with my testing, I added another directive to turn that
behavior off, but I'd like to better understand why that behavior is
there, since it appears to assume a behavior that my FTP servers don't
have, and doesn't seem to be mentioned in RFC 959.

Dan Poirier <>

View raw message