You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jeff Trawick <tr...@bellsouth.net> on 2001/04/20 04:44:00 UTC

Re: cvs commit: httpd-2.0/docs/manual index.html.html index.html.ja.jis index.html

yoshiki@apache.org writes:

> yoshiki     01/04/18 19:54:28
> 
>   Added:       docs/manual index.html.html index.html.ja.jis
>   Removed:     docs/manual index.html
>   Log:
>   New Japanese translation.

Can somebody explain to the ignorant what needs to be done so that
index.html.html will be returned when I ask for /manual/ ?  I guess a
tweak to DirectoryIndex would work, but I doubt that was the
intention. 

Thanks,

Jeff

-- 
Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: cvs commit: httpd-2.0/docs/manual index.html.html index.html.ja.jis index.html

Posted by "William A. Rowe, Jr." <ad...@rowe-clan.net>.
From: "Martin Kraemer" <Ma...@Fujitsu-Siemens.com>
Sent: Thursday, April 26, 2001 9:10 AM
> 
> Remember that current browsers have their own cache. After a configuration
> change (of the language for instance), they will compare their cached copy
> against the server, based on the time stamp. So, depending on the time
> stamps of the various copies, chances are that reload wioll NOT get you
> the right copy. With Netscape, use shift-Reload to force a new transfer
> (with IE, I don't know. Does Ctl-Reload work?).

Where they pay attention to the etag _and_ the server supports inode etags,
this shouldn't pose a problem.  [Note, I don't claim that it doesn't pose
a problem, only that an intellegent browser should know the difference.]


Re: cvs commit: httpd-2.0/docs/manual index.html.html index.html.ja.jis index.html

Posted by Martin Kraemer <Ma...@Fujitsu-Siemens.com>.
On Fri, Apr 20, 2001 at 07:29:29AM -0400, Jeff Trawick wrote:
> > Options +Multiviews
> > will probably do the trick.  (In reality, you want to set your browser
> > correctly so that index.html.en will be returned.  index.html.html is
> > just there for misconfigured browsers.)
> 
> multiviews doesn't help, at least like this
> 
> <Directory /home/trawick/apacheinst/manual>
>     Options Indexes MultiViews
> </Directory>
> 
> Personally, I'd like to know how to make this work, but I'm wondering
> why a non-trivial exercise is required so that somebody who installs
> Apache can read the manual.  Doesn't it seem wrong that the pages
> don't just work without changing the browser?
> 
> About the browser cfg...  I have netscape set up to prefer En.  What
> else is there to do?

You also need
    AddLanguage en .en
    AddLanguage fr .fr
    AddLanguage de .de
    AddLanguage tw .tw
    AddLanguage ... ...
for all language suffixes you want to use. That is standard stuff.

Also, make sure that the file name specified with DirectoryIndex does
NOT exist (but they should exist with a language suffix). If the file
exists like requested, then apache will simply serve it, and not look
for any alternatives.

* In your test directory, create:
    index.html.en
    index.html.de
    index.fr.html
    index.tw.txt

* If you set DirectoryIndex to "index.html" now (and make sure that
  no index.html exists), the server will consider the english and german
  versions as candidates. If you set your language to "fr", you will get
  a [406 Not Acceptable] with both index.html.en and index.html.de listed
  as candidates. (Adding a symlink index.html.html -> index.html.en will
  "do the right thing" and return the english document as a fallback).

* If you set DirectoryIndex to "index" instead, mod_negotiation will also
  find the taiwanese (plaintext) and french (html) candidates. Reload
  should give you the french version now, assuming "fr" is still set in your
  Preferences.

Remember that current browsers have their own cache. After a configuration
change (of the language for instance), they will compare their cached copy
against the server, based on the time stamp. So, depending on the time
stamps of the various copies, chances are that reload wioll NOT get you
the right copy. With Netscape, use shift-Reload to force a new transfer
(with IE, I don't know. Does Ctl-Reload work?).

  Martin
-- 
<Ma...@Fujitsu-Siemens.com>    |       Fujitsu Siemens
       <ma...@apache.org>              |   81730  Munich,  Germany

Re: cvs commit: httpd-2.0/docs/manual index.html.html index.html.ja.jis index.html

Posted by Jeff Trawick <tr...@bellsouth.net>.
Joshua Slive <sl...@finance.commerce.ubc.ca> writes:

> On 19 Apr 2001, Jeff Trawick wrote:
> 
> > yoshiki@apache.org writes:
> >
> > > yoshiki     01/04/18 19:54:28
> > >
> > >   Added:       docs/manual index.html.html index.html.ja.jis
> > >   Removed:     docs/manual index.html
> > >   Log:
> > >   New Japanese translation.
> >
> > Can somebody explain to the ignorant what needs to be done so that
> > index.html.html will be returned when I ask for /manual/ ?  I guess a
> > tweak to DirectoryIndex would work, but I doubt that was the
> > intention.
> >
> 
> Options +Multiviews
> will probably do the trick.  (In reality, you want to set your browser
> correctly so that index.html.en will be returned.  index.html.html is
> just there for misconfigured browsers.)

multiviews doesn't help, at least like this

<Directory /home/trawick/apacheinst/manual>
    Options Indexes MultiViews
</Directory>

Personally, I'd like to know how to make this work, but I'm wondering
why a non-trivial exercise is required so that somebody who installs
Apache can read the manual.  Doesn't it seem wrong that the pages
don't just work without changing the browser?

About the browser cfg...  I have netscape set up to prefer En.  What
else is there to do?

Thanks,
-- 
Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: cvs commit: httpd-2.0/docs/manual index.html.html index.html.ja.jis index.html

Posted by Martin Kraemer <Ma...@Fujitsu-Siemens.com>.
On Fri, Apr 20, 2001 at 12:11:22AM -0500, William A. Rowe, Jr. wrote:
> > index.html.html is
> > just there for misconfigured browsers.)
> 
> Er, no... it's for the admin so they don't have to watch emits that the language
> wasn't matched in their logs?  I still find this entire approach (having been
> buried in directory_walk, mod_alias and mod_negotiation cruft for the better part
> of a week) entirely bogus.

Not even that. It's for multi-Language servers where the client does
a request for a non-existing Language (replace Language by any other
Vary-ing dimension). With MultiViews and AddLanguage en
(and fr and zh and de) and copies of the DirectoryIndex file
existing only in .en and .zh versions,
a client submitting a request with "Accept-Language: fr,de" 
will get neither the .en nor the .zh version, but will get a
[406 Not Acceptable] or [300 Multiple Choices] error instead.

Adding a .html.html version (usually a symlink to the .html.en version)
will provide a fallback which will be selected if none of the
available and the requested languages coincide.

So: YES, it is a hack. A directive "FallBackLanguage en" would be
much better. But currently, this "established hack" makes client
users much happier.

And: No, it's not for "misconfigured" browsers (unless you consider
ita misconfiguration when users configure their native language in the
browsers, but forget to manually add a "en;q=0.01" as a fallback).
And it's not (only) there to clean up the log (though you will find an
extra 406 response -and maybe no 200 response at all if the client
gives up after seeing the error- in the access_log if you forget it).

   Martin
-- 
<Ma...@Fujitsu-Siemens.com>    |       Fujitsu Siemens
       <ma...@apache.org>              |   81730  Munich,  Germany

Re: cvs commit: httpd-2.0/docs/manual index.html.html index.html.ja.jis index.html

Posted by "William A. Rowe, Jr." <ad...@rowe-clan.net>.
From: "Joshua Slive" <sl...@finance.commerce.ubc.ca>
Sent: Thursday, April 19, 2001 10:58 PM


> On 19 Apr 2001, Jeff Trawick wrote:
> 
> > yoshiki@apache.org writes:
> >
> > > yoshiki     01/04/18 19:54:28
> > >
> > >   Added:       docs/manual index.html.html index.html.ja.jis
> > >   Removed:     docs/manual index.html
> > >   Log:
> > >   New Japanese translation.
> >
> > Can somebody explain to the ignorant what needs to be done so that
> > index.html.html will be returned when I ask for /manual/ ?  I guess a
> > tweak to DirectoryIndex would work, but I doubt that was the
> > intention.
> >
> 
> Options +Multiviews
> will probably do the trick.  (In reality, you want to set your browser
> correctly so that index.html.en will be returned.  index.html.html is
> just there for misconfigured browsers.)

Er, no... it's for the admin so they don't have to watch emits that the language
wasn't matched in their logs?  I still find this entire approach (having been
buried in directory_walk, mod_alias and mod_negotiation cruft for the better part
of a week) entirely bogus.

Bill


Re: cvs commit: httpd-2.0/docs/manual index.html.html index.html.ja.jis index.html

Posted by Joshua Slive <sl...@finance.commerce.ubc.ca>.
On 19 Apr 2001, Jeff Trawick wrote:

> yoshiki@apache.org writes:
>
> > yoshiki     01/04/18 19:54:28
> >
> >   Added:       docs/manual index.html.html index.html.ja.jis
> >   Removed:     docs/manual index.html
> >   Log:
> >   New Japanese translation.
>
> Can somebody explain to the ignorant what needs to be done so that
> index.html.html will be returned when I ask for /manual/ ?  I guess a
> tweak to DirectoryIndex would work, but I doubt that was the
> intention.
>

Options +Multiviews
will probably do the trick.  (In reality, you want to set your browser
correctly so that index.html.en will be returned.  index.html.html is
just there for misconfigured browsers.)

Joshua.