mod_proxy uses "text/plain" as Content-Type for proxied FTP binary transfers. Most browsers don't show their fancy "Save to disk" box for ISO images, instead they start showing binary garbage in the browser. I've created a small patch to force the Content-Type to "binary" for FTP binary transfers.
Created attachment 12052 [details] Workaround-patch for this bug
Isn't this really a configuration error? We already have if (r->content_type) { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "proxy: FTP: Content-Type set to %s", r->content_type); } else { ap_set_content_type(r, ap_default_type(r)); } so the real fix is a DefaultType directive for the proxy. Or am I missing something?
Thanks! Adding <Proxy *> DefaultType application/octet-stream </Prox> works. But this will change the content type of every proxy request with unknown mime type. Or can this be changed only for mod_proxy_ftp?
I've added a note about this to the mod_proxy documentation (in CVS). I'm neutral-to-slightly-negative on the subject of adding your patch. So unless you can convince me or someone, I'm inclined to close this as WONTFIX. As for changing every request with unknown MIME type - that's a red herring. Any HTTP response MUST have a mime type, so it's only FTP that's affected. And even if an "HTTP" server violates this part of the spec, how better could we handle it than by falling back to FTP behaviour?
Good point. I think closing this bug with the documentation note is the best thing to do. Thanks again, Thomas