You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Dean Gaudet <dg...@arctic.org> on 2000/01/04 05:19:48 UTC

Re: Multi-lingual Web Site, Content Negotiation and Cookies (fwd)

should be put in the bugdb, but i'm too lazy at the moment.

Dean

---------- Forwarded message ----------
From: Bjoern Hoehrmann <bj...@hoehrmann.de>
To: dgaudet@apache.org
Subject: Re: Multi-lingual Web Site, Content Negotiation and Cookies
Date: Tue, 04 Jan 2000 05:02:49 +0100
Organization: Illumenia Web Publishing, posting private
Reply-To: Bjoern Hoehrmann <de...@gmx.net>

* Rainer Scherg wrote in comp.infosystems.www.servers.unix:
>--- snip from bugs.apache.org -----------
>
>List:     apache-bugdb
>Subject:  Re: mod_negotiation/3760: MultiViews brings "Not Acceptable"
>From:     dgaudet@apache.org
>Date:     1999-04-21 3:45:46
>
>Synopsis: MultiViews brings "Not Acceptable"
>
>State-Changed-From-To: open-closed
>State-Changed-By: dgaudet
>State-Changed-When: Tue Apr 20 20:45:45 PDT 1999
>State-Changed-Why:
>That's how the HTTP protocol works.  See RFC2068 for a description
>of Accept-Language.  Essentially, the user specifying
>"Accept-Language: af" says they only read af.  If they
>had said "Accept-Language: af, *" then it would mean they
>read and prefer af, but will take anything in a pinch.
>
>We can't provide an option to override this -- that would
>violate the protocol.
>
>Dean
>
>-------- snap -----------------------

NACK, RFC2616 says in section 14.1

|    If an Accept header field is present,
|    and if the server cannot send a response which is acceptable
|    according to the combined Accept field value, then the server SHOULD

^^^^^^
|    send a 406 (not acceptable) response.

RFC2119 says:

| 3. SHOULD   This word, or the adjective "RECOMMENDED", mean that there
|    may exist valid reasons in particular circumstances to ignore a
     ^^^^^^^^^^^^^^^^^^^^^^^                             ^^^^^^^^^
|    particular item, but the full implications must be understood and
|    carefully weighed before choosing a different course.

Here a little example of a BUG (if sending content that is not
acceptable to the user is really violating the HTTP):

| % telnet localhost 80
| HEAD / HTTP/1.1
| Host: localhost:80
| Accept-Language: fr
  ^^^^^^^^^^^^^^^^^^^

| HTTP/1.1 200 OK
| Date: Tue, 04 Jan 2000 03:01:42 GMT
| Server: Apache/1.3.6 (Win32)
| Last-Modified: Wed, 01 Dec 1999 20:39:12 GMT
| ETag: "0-10a0-38458770"
| Accept-Ranges: bytes
| Content-Length: 4256
| Content-Type: text/html; charset=iso-8859-1
| Content-Language: de
  ^^^^^^^^^^^^^^^^^^^^

(done via 'AddLanguage de .html' in /.htaccess)

I've told Apache i only read french, but it's sending me german content,
following Dean his is a BUG and must be fixed.

PS: I know, when i request /index (when Options +MultiViews was set)
Apache answers with a 406 status, but if its violating the HTTP, its
violating the protocol _always_, not only if the content negotiation
function is acitve.

My interpretation of RFC2616 is, that this example response is valid, as
well as it would be valid, to send a document in a 'fallback' language,
if there are no documents of the accepted languages maintained.

CC to dgaudet@apache.org
-- 
Björn Höhrmann - mailto:bjoern@hoehrmann.de - http://www.bjoernsworld.de