Bug 29445 - headers in type map not honored
Summary: headers in type map not honored
Status: CLOSED WONTFIX
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_negotiation (show other bugs)
Version: 2.0.49
Hardware: Other Linux
: P3 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL: http://cgi.w3.org/cgi-bin/headers?url...
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-08 16:17 UTC by John Belmonte
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments
HTML target (221 bytes, text/html)
2004-06-08 16:19 UTC, John Belmonte
Details
type map (45 bytes, text/plain)
2004-06-08 16:20 UTC, John Belmonte
Details
access control file (70 bytes, text/plain)
2004-06-08 16:21 UTC, John Belmonte
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Belmonte 2004-06-08 16:17:27 UTC
I have a file foo.x containing HTML, and a type map that references that file 
and sets its type to text/html.  However, when the resource is accessed via 
the type map, the resulting type is text/plain (just as if foo.x were accessed 
directly).  Likewise, Content-Language and Content-Length in the type map seem 
to be ignored. 
 
I will attach foo.x, foo.var, and .htaccess.  Test is at 
<http://memebeam.org/john/tests/type-map/foo>.  See 
<http://cgi.w3.org/cgi-bin/headers?url=http%3A%2F%2Fmemebeam.org%2Fjohn%
2Ftests%2Ftype-map%2Ffoo> for headers.
Comment 1 John Belmonte 2004-06-08 16:19:49 UTC
Created attachment 11793 [details]
HTML target
Comment 2 John Belmonte 2004-06-08 16:20:44 UTC
Created attachment 11794 [details]
type map
Comment 3 John Belmonte 2004-06-08 16:21:38 UTC
Created attachment 11795 [details]
access control file
Comment 4 André Malo 2004-06-08 16:22:04 UTC
That is, how it works. The typemaps just define the negotiation parameters. The
resource must be configured properly nevertheless. Actually, the client is
*allowed* to request the resource directly, so you should do this anyway.
Comment 5 John Belmonte 2004-06-08 16:26:41 UTC
Perhaps there is a documentation bug then.  I'd appreciate a discussion 
*before* the bug was summarily closed. 
 
According to <http://httpd.apache.org/docs-2.0/mod/mod_negotiation.html>: 
 
    "Note also that a typemap file will take precedence over the filename's 
extension, even when Multiviews is on." 
 
My use case is that I want to set an explicit qs value for a certain resource.  
If the Content-type in the type map is ignored, how can I do this? 
 
Comment 6 André Malo 2004-06-17 21:02:21 UTC
The content-type in the type map is not ignored. It's used for negotiation. This
doesn't prevent you from configuring the rest of your server properly. Remember,
the file can and will be called directly.

The sentence in the docs describes the behaviour during the negotiation stage.
That's all what mod_negotiation does - to negotiate ;-)