Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 39174 invoked from network); 17 Jul 2009 20:30:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Jul 2009 20:30:57 -0000 Received: (qmail 3499 invoked by uid 500); 17 Jul 2009 20:31:59 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 3460 invoked by uid 500); 17 Jul 2009 20:31:59 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 3451 invoked by uid 99); 17 Jul 2009 20:31:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jul 2009 20:31:59 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of aw@ice-sa.com designates 212.85.38.228 as permitted sender) Received: from [212.85.38.228] (HELO tor.combios.es) (212.85.38.228) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jul 2009 20:31:48 +0000 Received: from localhost (localhost [127.0.0.1]) by tor.combios.es (Postfix) with ESMTP id 42E09226095 for ; Fri, 17 Jul 2009 22:31:27 +0200 (CEST) Received: from tor.combios.es ([127.0.0.1]) by localhost (tor.combios.es [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4YUJrKDcQd3Y for ; Fri, 17 Jul 2009 22:31:27 +0200 (CEST) Received: from [192.168.245.129] (p549EB2B4.dip0.t-ipconnect.de [84.158.178.180]) by tor.combios.es (Postfix) with ESMTPA id CD6E6226094 for ; Fri, 17 Jul 2009 22:31:26 +0200 (CEST) Message-ID: <4A60DF84.3080004@ice-sa.com> Date: Fri, 17 Jul 2009 22:31:00 +0200 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= Reply-To: aw@ice-sa.com User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: users@httpd.apache.org References: <20090717174120.GA23114@chaosreigns.com> In-Reply-To: <20090717174120.GA23114@chaosreigns.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] How do I follow the XHTML Content-Type recommendations? Darxus@ChaosReigns.com wrote: > If a client requests an XHTML file, it says to do normal > content-negotiation. No, if a client asks for the URL "/abc/file.html", it wants the resource corresponding to that URL. If the client's HTTP Accept header says they like > text/html more, send them that. /This/ is where content negociation starts, /if/ the server happens to have more that one representation of the requested resource available. The client indicates a /preference/ for one or the other representation of the resource, /in case/ the server has several. If it says they like application/xhtml+xml > more, ... (and if we have it) ... send them that. kind of, but it's either, or. > > Fine. I have even done that successfully with two different files. > > Except I can't figure out how to provide multiple Content-Types for a > single file. Logical, because you can't. One document/file has only one MIME type, not several. Unless you mean what is described here : http://httpd.apache.org/docs/2.2/content-negotiation.html (Read it, don't just guess how it works) The server /tries/ to find the alternative file which matches the client preferences best. Once it finds it, it will send /that/ file, with the MIME type of /that/ file in the Content-type header. And I don't think creating multiple copies of the document > (even with linkes) is an appropriate solution. > > AddType "application/xhtml+xml,text/html; qs=0.01" .html What makes you think that you can do that ? Not this : http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addtype The first argument to the AddType directive is /one/ MIME media type, not several, and no parameters. The following argument(s) is a list of possible extensions. > > Tells the client "Content-Type: cation/xhtml+xml,text/html; qs=0.01", > which is no good. No, and it's even invalid. See http://www.faqs.org/rfcs/rfc2616.html, 3.7 & 14.17 Content-type: text/html; charset=UTF-8 is a valid header, the above is not. > > An apache type-map always returns the Content-Type specified by AddType in > my main apache config file. Re-read http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addtype I believe you are a bit confused. Your typemap file has the same mistake. Because of that, your later tests do not make much sense. --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org