Return-Path: X-Original-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EBB18C5A0 for ; Fri, 8 Jun 2012 21:24:46 +0000 (UTC) Received: (qmail 74989 invoked by uid 500); 8 Jun 2012 21:24:46 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 74965 invoked by uid 500); 8 Jun 2012 21:24:46 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 74957 invoked by uid 99); 8 Jun 2012 21:24:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jun 2012 21:24:46 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jmarantz@google.com designates 209.85.217.173 as permitted sender) Received: from [209.85.217.173] (HELO mail-lb0-f173.google.com) (209.85.217.173) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jun 2012 21:24:41 +0000 Received: by lbok6 with SMTP id k6so2192849lbo.18 for ; Fri, 08 Jun 2012 14:24:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:x-system-of-record; bh=dUysPr5ALOZOcuRc3tgDLemibbCROHqFNERy33QQLMc=; b=Y8p3L1r7Ti4rqpFR9LP7teCIZev9X+LBpwBImPkuJxqfo7zfyYSlwBWyNA45uk1VFr TC6j0ITLFVRWzVDJgVTza+GZNOYdT8WAVsJMJ1jNng1MSnTfS8rYmvE9pTea7lwCk7hT k4sjBNkuURrOF13bIhLcez1z4vvSvZzfzrzo0uebvrVjnYjUokBw+qi1w7N/w8YX+OCm ShT/8aY9vw/KcDoWx8RKXMCH2BncQ5mJhL6sBDW1TSLr3RQONEIm2TtR1rNKKL+H1TaX b0Q5i+l35KgITKUTITTE5ix+ZteooSbegnsleCCIueGqKN+P+xHpALAERw2SDBa9FHtX BFJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:x-system-of-record:x-gm-message-state; bh=dUysPr5ALOZOcuRc3tgDLemibbCROHqFNERy33QQLMc=; b=H1TVspaJ+hm5I1ZZ7a9AgktsC3OpHkXFLJtsgbD2NBhQdcVHs3sUNqr5cABMLueEgj MyurhFve3X7XjSiodRT32gp1fTV/CkHWLAe5l7bQR/lYCis+w478oni+UOvrynv2z03S HODFeMMyLU60LT2IXsTBakH4+kcIn1O9udTP/Jx9xxlwnGLKSBG50Pvf41kYgSeonAOn Gg5yPewplpKS+7+WEMuwmgRIizsy+bLVbpys3Ak1GbxXY9BgpZSYiEEvJ12unuOA4Qfo /d/0k9Y04ejjxvg0CKjZEVhM0V1wq11ygX1HyAw7HXgIOqCTfG1usz3YB/aJPTQr90Ly QaDw== Received: by 10.152.131.68 with SMTP id ok4mr9648412lab.47.1339190660072; Fri, 08 Jun 2012 14:24:20 -0700 (PDT) Received: by 10.152.131.68 with SMTP id ok4mr9648406lab.47.1339190659909; Fri, 08 Jun 2012 14:24:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.103.132 with HTTP; Fri, 8 Jun 2012 14:23:59 -0700 (PDT) In-Reply-To: <4FD26BBF.2030701@joe-lewis.com> References: <4FD26BBF.2030701@joe-lewis.com> From: Joshua Marantz Date: Fri, 8 Jun 2012 17:23:59 -0400 Message-ID: Subject: Re: Determining mimetype of document To: modules-dev@httpd.apache.org Content-Type: multipart/alternative; boundary=f46d0435c1d292094904c1fc9f01 X-System-Of-Record: true X-Gm-Message-State: ALoCoQmJDY0ncRr76aH/iFG+vw0MrDLeRoVr1B6cY3QCAqFSQGhraQ78Tl+UEKbtwwA1r4FmgBk5h08ODPzZKdRXI4abTf1/5WiRYzMW/HjwM55vKI8mEx/cVFzQzi7D9yg1q79kOaiYLbr1e9GnIHjkibwgqMbCiQ== X-Virus-Checked: Checked by ClamAV on apache.org --f46d0435c1d292094904c1fc9f01 Content-Type: text/plain; charset=ISO-8859-1 In understand any module *can* set content-type late: I'm just wondering if that happens with any frequency. E.g.when I googled for how to set content-type in Apache, I got references to AddType and some hacks using mod_rewrite, both of which would run upstream of my filter. My main concern is mod_headers since it runs downstream. RE firefox sniffing content-type: does that imply that if there is an explicit mimetype it will ignore it and determine XHTML vs HTML via sniffing, I suppose, for DOCTYPE? Do you have a link to that bit of news? That certainly complicates things. -Josh On Fri, Jun 8, 2012 at 5:16 PM, Joe Lewis wrote: > On 06/08/2012 03:07 PM, Joshua Marantz wrote: > >> Hi, >> >> I'm trying to figure out whether my filter, which currently runs upstream >> of mod_headers, is likely to see the correct mimetype >> in request->content_type. >> >> In particular, we need to know whether browsers will interpret the content >> as XHTML or HTML, which is determined by the mimetype. Do people >> typically >> set the mimetype using mod_headers, or is that typically set using AddType >> or some other mechanism? >> > > It's usually set by the content generator. However, you have to keep in > mind that any module may modify that value (any output filter may, too) up > until the AP_FTYPE_CONTENT_SET (runs after the AP_FTYPE_RESOURCE output > filters). > > Additionally, please keep in mind that Firefox has begun the old I.E. hack > of sniffing the content and ignoring the Content-Type header if it can > figure it out, so you will have to be aware that content_type is not > indicative at any stage of what the browser is going to do. > > Joe > -- > http://www.silverhawk.net/ > --f46d0435c1d292094904c1fc9f01--