You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Martin Kraemer <ma...@mch.sni.de> on 1999/01/01 20:27:48 UTC

Negotiation patch: is this result normal?

About the recent negotiation patch:
* I have a directory with a couple of language variants:
   index.shtml.de
   index.shtml.en
   ...
   index.shtml.ro
   index.shtml.shtml -> index.shtml.en

* I have configured:
  LanguagePriority de en fr
  AddLanguage de .de
  AddLanguage en .en
  ...
  AddLanguage ro .ro


With the new changes, the german document is returned when no language
is specified (that's correct, because of the LanguagePriority).

  > echo HEAD http://dcwww.mch.sni.de/ HTTP/1.0\n | netcat proxy 81
  HTTP/1.0 200 OK
  Date: Fri, 01 Jan 1999 19:10:46 GMT
  Server: Apache/1.3.4-dev (BS2000) PHP/3.0.5
  Content-Location: index.shtml.de
  Vary: negotiate, accept-language
  TCN: choice
  Cache-Control: max-age=21600
  Expires: Sat, 02 Jan 1999 01:10:46 GMT
  Content-Type: text/html
  Content-Language: de

With an unknown Accept-Language request header, and when DefaultLanguage
is *NOT* configured, the index.shtml.shtml is returned (also correct,
that was the intention of the .shtml.shtml suffix in the first place).

  > echo HEAD http://dcwww.mch.sni.de/ HTTP/1.0\nAccept-Language: xy\n | netcat proxy 81
  HTTP/1.0 200 OK
  Date: Fri, 01 Jan 1999 18:47:38 GMT
  Server: Apache/1.3.4-dev (BS2000) PHP/3.0.5
  Content-Location: index.shtml.shtml
  Vary: negotiate, accept-language
  TCN: choice
  Cache-Control: max-age=21600
  Expires: Sat, 02 Jan 1999 00:47:38 GMT
  Content-Type: text/html

So far everything's just perfect (*much* better than before, thanks!).
But when I now add a configuration directive...
  # "anonymous" default variants are linked to english
  <Files index.shtml.shtml>
   DefaultLanguage en
  </Files>
then the response to the same request suddenly changes: it appears to be
no longer negotiated, and the time stamp shows me the german variant was
selected. Why is that? Is it a bug? Or is it normal (because now the
"anonymous" variant is no longer anonymous but english, and is therefore
ruled out in the selection algorithm)?

> echo HEAD http://dcwww.mch.sni.de/ HTTP/1.0\nAccept-Language: xy\n | netcat proxy 81
HTTP/1.0 200 OK
Date: Fri, 01 Jan 1999 18:53:22 GMT
Server: Apache/1.3.4-dev (BS2000) PHP/3.0.5
Last-Modified: Wed, 23 Dec 1998 07:53:17 GMT
ETag: "7-1150-3680a16d;3647d86b"
Accept-Ranges: bytes
Content-Length: 4432
Content-Type: text/html

    Martin
-- 
<Ma...@Mch.SNI.De>      |        Siemens Information and
Phone: +49-89-636-46021          |        Communication  Products
FAX:   +49-89-636-47816          |        81730  Munich,  Germany