www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p..@hyperreal.org
Subject Re: protocol/1793: Accept: text/html happily returns application/zip files.
Date Sun, 15 Feb 1998 15:34:12 GMT
[In order for any reply to be added to the PR database, ]
[you need to include <apbugs@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]


Synopsis: Accept: text/html happily returns application/zip files.

State-Changed-From-To: open-feedback
State-Changed-By: pcs
State-Changed-When: Sun Feb 15 07:34:12 PST 1998
State-Changed-Why:
Yes, the is unfortunately the current behaviour of Apache.
If you request a document which exists on the disk with
the same name, the negotiation algorithm is *NOT* applied.
In this case, foo.zip exists, so Apache returns is despite
the Accept: header. This is not really correct, so hopefully
a later version of Apache will fix this, by always applying
the Accept* headers to all requests.

In the meantime, the only way to get this to work is to
force mod_negotiation to kick in the negotiation algorithm.
This can be done in one of two ways:

  - either enable MultiViews (Options +Multi), then request
    the URL without the extension (e.g. GET /foo HTTP/1.0).
    This is a performance implication because now Apache
    will do a search for files called /foo.* to perform
    the negotiation

  or

  - enable "type-map" files (AddHandle type-map var), then
    create a type-map for (say) resource foo - create a file
    called foo.var containing

URI: z.zip
Content-Type: application/zip

  Now make requests for /foo.var instead of /foo.zip.

This is documented in /manual/content-negotiation.html on any
Apache mirror site.

Paul


Mime
View raw message