Bug 66443 - [2.4.55 regression] SSI include virtual=file + mod_rewrite outputs line noise
Summary: [2.4.55 regression] SSI include virtual=file + mod_rewrite outputs line noise
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_include (show other bugs)
Version: 2.4.55
Hardware: PC All
: P2 major (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-27 09:35 UTC by andrew murphy
Modified: 2023-01-27 09:55 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description andrew murphy 2023-01-27 09:35:59 UTC
Regression
Works in ubuntu: "apache2/jammy 2.4.52-1ubuntu4 amd64" (and earlier)
Fails in "apache2/jammy,now 2.4.55-1+ubuntu22.04.1+deb.sury.org+2 amd64 [installed]"

Have 2 virtual servers with flat html pages that use SSI with multi-level virtual="file.html"
includes
(e.g. page.html includes "top-of-page.html" which includes "brand_menu.html")

To differential between the 2 virtual servers, I use a .htaccess redirect for server #2

RewriteEngine On
RewriteRule    "ssi/top/brand_menu.html" "/ssi_maps/brand_menu.html"


This causes the output to be line noise.

Pages that don't use the SSI redirect are fine.
Commenting out the "RewriteRule" is fine (just outputs the first server's "brand_menu.html")

This is the line that's causing the problem

<!--#include virtual="top/brand_menu.html"-->

If mod_redirect gets involved in that line, the output is a page of line noise

Work around

<!--#if expr="%{HTTP_HOST} == 'maps.walkingclub.org.uk'" -->
    <!--#include virtual="/ssi_maps/brand_menu.html"-->
<!--#else -->
    <!--#include virtual="top/brand_menu.html"-->
<!--#endif -->

Bit scary at first. Upgrading Apache2 has never caused a problem before.

Thank you for the **amazing** work for the whole internet you are doing.
Comment 1 andrew murphy 2023-01-27 09:55:16 UTC
ubuntu curl --compressed (which doesn't use brotli compression, just gzip) DOES get the correct page, which is strange

a "test your url around the world" website shows line-noise each time

I'm wandering if its mod-includes + mod-rewrite + mod-brotli all together that's getting it wrong - it is some difference between curl fetching a page, and chrome fetching it.