You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@httpd.apache.org by Rich Bowen <rb...@rcbowen.com> on 2001/09/02 21:48:47 UTC

Type-map files

I'm still missing something from the documentation for content
negotiation, and want to make sure that I am understanding this
correctly before I add something incorrect to the docs.

What you do, if I'm getting this, is to do an AddHandler ...

AddHandler type-map .var

and then create a file called foo.var which lists the various
representations of the resource called foo. Is that correct? So a given
directory may contain multiple .var files - in fact, is rather required
to contain multiple of them, one per negotiated resource? This
particular point is not clear in the docs, which seems to imply that you
might be able to just create one .var file that listed all the resources
for the entire directory.

Either way, whether or not I am correctly understanding this, the docs
need to be more explicit on this point, since it is not immediately
apparent from the docs what the AddHandler directive is doing here,
where the .var file is to go, and what it is to contain. (ie whether you
list one or more than one resource per file.)

The docs point off to the sample configuration file for more details,
which seems rather backwards to me. But I don't see anything in
httpd-std.conf which enlightens me any further.

Thanks for any pointers on this. I know I'm probably just overlooking
this somewhere, as I did the first time, but I rest in the defence that
if I can't find it, neither can the average docs user.

-- 
Oh I have slipped the surly bonds of earth
And danced the sky on laughter-silvered wings
 --High Flight (John Gillespie Magee)


---------------------------------------------------------------------
To unsubscribe, e-mail: apache-docs-unsubscribe@apache.org
For additional commands, e-mail: apache-docs-help@apache.org


Re: Type-map files

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
From: "Rich Bowen" <rb...@rcbowen.com>
Sent: Saturday, September 15, 2001 10:54 PM


> > Yes, this is correct.  Also, note the following behavior.  If the user
> > enables Multiviews, requests index.html, and creats an index.html.var file
> > amoungst other index.html.xx variants, the index.html.var file _WILL_
> > take precedence over the filename's extension parsing!
> >
> > They are no more required than multiple language versions.  However, you
> > can note that parsing a .var file is far less CPU intensive than scanning
> > for matching files.  Of course, if the system does _both_ (and hits a .var
> > file while looking at all the Multiview variants) it can sometimes be more
> > expensive.
> 
> Would it be desirable to add .var files to the documentation itself.
> This would (in my mind anyway) have two effects. It would improve the
> performance of sites serving Apache documentation, and it would provide
> lots of examples of how to do .var files.
> 
> Or is this just one more thing to maintain, and one more thing to get
> out of sync? I suppose if someone added a translation, and did not add
> it to the .var file, someone would notice pretty quickly.

I think your second instinct is more likely.  The .var file was added since
previously undefined languages are frequently added for the default index.html
translation.  We've seen many errors because the user failed to update httpd.conf
when they upgraded their default htdocs directory.  Rodent's idea of a script
to auto-create these .var maps is interesting, but perhaps not required as a
default (it could even 'fix' the s/Multiviews// and add the typemap handler,
if the user 'fixed' the docs to a specific point in time.)

Multiviews for documents keeps the growth of documentation very simple.  We
don't have new translations therein for the more obscure language translations,
usually it's the more common languages that users contribute [and maintain, in
the long term.]  We don't have the same 'oops - forgot a new language extension'
errors in that area.

It's nice that different parts of the distribution 'excersize' different parts
of the server - Multiviews included.




---------------------------------------------------------------------
To unsubscribe, e-mail: apache-docs-unsubscribe@apache.org
For additional commands, e-mail: apache-docs-help@apache.org


Re: Type-map files

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Rich Bowen wrote:
> 
> Would it be desirable to add .var files to the documentation
> itself. This would (in my mind anyway) have two effects.
> It would improve the performance of sites serving Apache
> documentation, and it would provide lots of examples of how
> to do .var files.

Well, as an untested WAG, if we do that and the enabling
'AddHandler type-map .var' directive is commented out, I
suspect the .var file may be included if the server ever
sends a 300 Multiple Choices for the document. :-)  Not
a real problem, but if so it will probably increase the
WTH factor a tiny bit in those cases. :-)

> Or is this just one more thing to maintain, and one more
> thing to get out of sync? I suppose if someone added a
> translation, and did not add it to the .var file, someone
> would notice pretty quickly.

Foo, build them automagically with a script.

+1 from me..
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"All right everyone!  Step away from the glowing hamburger!"

---------------------------------------------------------------------
To unsubscribe, e-mail: apache-docs-unsubscribe@apache.org
For additional commands, e-mail: apache-docs-help@apache.org


Re: Type-map files

Posted by Rich Bowen <rb...@rcbowen.com>.
On Sun, 2 Sep 2001, William A. Rowe, Jr. wrote:

> Yes, this is correct.  Also, note the following behavior.  If the user
> enables Multiviews, requests index.html, and creats an index.html.var file
> amoungst other index.html.xx variants, the index.html.var file _WILL_
> take precedence over the filename's extension parsing!
>
> They are no more required than multiple language versions.  However, you
> can note that parsing a .var file is far less CPU intensive than scanning
> for matching files.  Of course, if the system does _both_ (and hits a .var
> file while looking at all the Multiview variants) it can sometimes be more
> expensive.

Would it be desirable to add .var files to the documentation itself.
This would (in my mind anyway) have two effects. It would improve the
performance of sites serving Apache documentation, and it would provide
lots of examples of how to do .var files.

Or is this just one more thing to maintain, and one more thing to get
out of sync? I suppose if someone added a translation, and did not add
it to the .var file, someone would notice pretty quickly.

-- 
Rich Bowen - rbowen@rcbowen.com
... and another brother out of his mind, and another brother out at New
York (not the same, though it might appear so)
	Somebody's Luggage (Charles Dickens)


---------------------------------------------------------------------
To unsubscribe, e-mail: apache-docs-unsubscribe@apache.org
For additional commands, e-mail: apache-docs-help@apache.org


Re: Type-map files

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
From: "Rich Bowen" <rb...@rcbowen.com>
Sent: Sunday, September 02, 2001 2:48 PM


> I'm still missing something from the documentation for content
> negotiation, and want to make sure that I am understanding this
> correctly before I add something incorrect to the docs.
> 
> What you do, if I'm getting this, is to do an AddHandler ...
> 
> AddHandler type-map .var
> 
> and then create a file called foo.var which lists the various
> representations of the resource called foo. Is that correct? So a given
> directory may contain multiple .var files - in fact, is rather required
> to contain multiple of them, one per negotiated resource? This
> particular point is not clear in the docs, which seems to imply that you
> might be able to just create one .var file that listed all the resources
> for the entire directory.

Yes, this is correct.  Also, note the following behavior.  If the user
enables Multiviews, requests index.html, and creats an index.html.var file
amoungst other index.html.xx variants, the index.html.var file _WILL_
take precedence over the filename's extension parsing!

They are no more required than multiple language versions.  However, you
can note that parsing a .var file is far less CPU intensive than scanning
for matching files.  Of course, if the system does _both_ (and hits a .var
file while looking at all the Multiview variants) it can sometimes be more
expensive.

> Either way, whether or not I am correctly understanding this, the docs
> need to be more explicit on this point, since it is not immediately
> apparent from the docs what the AddHandler directive is doing here,
> where the .var file is to go, and what it is to contain. (ie whether you
> list one or more than one resource per file.)
> 
> The docs point off to the sample configuration file for more details,
> which seems rather backwards to me. But I don't see anything in
> httpd-std.conf which enlightens me any further.
> 
> Thanks for any pointers on this. I know I'm probably just overlooking
> this somewhere, as I did the first time, but I rest in the defence that
> if I can't find it, neither can the average docs user.

Look at the mod_negotiation comments, some are very well documented, e.g.
file format etc, about .var files.

You can document that we used the type map to avoid the user introducing
new index.html.xx variants and forgetting to update the list of languages
and character sets in their httpd.conf file.

Bill



---------------------------------------------------------------------
To unsubscribe, e-mail: apache-docs-unsubscribe@apache.org
For additional commands, e-mail: apache-docs-help@apache.org