Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EC6D1200C02 for ; Fri, 20 Jan 2017 22:08:17 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id EAF1C160B48; Fri, 20 Jan 2017 21:08:17 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 40779160B34 for ; Fri, 20 Jan 2017 22:08:17 +0100 (CET) Received: (qmail 45067 invoked by uid 500); 20 Jan 2017 21:08:16 -0000 Mailing-List: contact bugs-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: "Apache HTTPD Bugs Notification List" List-Id: Delivered-To: mailing list bugs@httpd.apache.org Received: (qmail 45058 invoked by uid 99); 20 Jan 2017 21:08:16 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jan 2017 21:08:16 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id DAF06C12C9 for ; Fri, 20 Jan 2017 21:08:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 3XtrlO9mfvij for ; Fri, 20 Jan 2017 21:08:13 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 646A75F30B for ; Fri, 20 Jan 2017 21:08:12 +0000 (UTC) Received: from asf-bz1-us-mid.priv.apache.org (nat1-us-mid.apache.org [23.253.172.122]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTPS id 443D1E0059 for ; Fri, 20 Jan 2017 21:08:11 +0000 (UTC) Received: by asf-bz1-us-mid.priv.apache.org (ASF Mail Server at asf-bz1-us-mid.priv.apache.org, from userid 33) id 0E4F460A8A; Fri, 20 Jan 2017 21:08:09 +0000 (UTC) From: bugzilla@apache.org To: bugs@httpd.apache.org Subject: [Bug 60619] New: Negotiate precompressed files Date: Fri, 20 Jan 2017 21:08:09 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Apache httpd-2 X-Bugzilla-Component: mod_negotiation X-Bugzilla-Version: 2.4.25 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: Martin.vGagern@gmx.net X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: bugs@httpd.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bz.apache.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 archived-at: Fri, 20 Jan 2017 21:08:18 -0000 https://bz.apache.org/bugzilla/show_bug.cgi?id=3D60619 Bug ID: 60619 Summary: Negotiate precompressed files Product: Apache httpd-2 Version: 2.4.25 Hardware: PC OS: Linux Status: NEW Severity: enhancement Priority: P2 Component: mod_negotiation Assignee: bugs@httpd.apache.org Reporter: Martin.vGagern@gmx.net Target Milestone: --- There should be a way to configure the server so that if files =E2=80=9Cfoo= =E2=80=9D and =E2=80=9Cfoo.gz=E2=80=9D exist, then =E2=80=9Cfoo.gz=E2=80=9D gets served i= f =E2=80=9CAccept-Encoding: gzip=E2=80=9D is specified in the request, and otherwise foo gets served. All of this with proper negotiation, =E2=80=9CVaries=E2=80=9D header, handling of =E2=80=9C;= q=3D0=E2=80=9D, and so on. http://httpd.apache.org/docs/2.4/mod/mod_deflate.html#precompressed is a workaround, but doing content negotiation using mod_rewrite is hardly a pro= per solution. The key point here is the fact that the MultiViews option only has an effec= t if the named file does not exist as such. https://github.com/apache/httpd/blob/fbc5e20ead005fd3a2bec05924f9e90dfd1954= 06/modules/mappers/mod_negotiation.c#L3081-L3082 One solution might be a way to enforce MultiViews even if the file exists. = Such a setting could be either for specific files, or for all files. Or perhaps depending on some environment variable. If you can't agree to this, then another (less comfortable) solution would = be implementing special handling of the identity encoding. That way, users cou= ld store files =E2=80=9Cfoo.id=E2=80=9D and =E2=80=9Cfoo.gz=E2=80=9D, could = =E2=80=9CAddEncoding identity .id=E2=80=9D, the absence of =E2=80=9Cfoo=E2=80=9D itself would trigger MultiViews, and the n= egotiation code would know to fall back to the =E2=80=9Cidentity=E2=80=9D version if it cou= ldn't find a better fit. Having to rename all files would be annoying, but it's still better th= an the mod_rewrite hack, I think. I realize that you might consider type-map files the best (i.e. most performant) solution. But I think generating the appropriate type maps is f= ar more work than renaming a bunch of files, so I hope for a simpler alternati= ve. There are a number of discussions of this issue on Stack Exchange: http://stackoverflow.com/q/75482/1468366 http://stackoverflow.com/q/9076752/1468366 http://stackoverflow.com/q/16883241/1468366 http://serverfault.com/q/131452/129921 So I would say this is a common enough problem. Many of the options suggest adding =E2=80=9CMultiViews=E2=80=9D and =E2=80=9CAddEncoding=E2=80=9D, desp= ite the fact that this doesn't work as intended (and judging from the age of the relevant line it never did wor= k). --=20 You are receiving this mail because: You are the assignee for the bug.= --------------------------------------------------------------------- To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org For additional commands, e-mail: bugs-help@httpd.apache.org