<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in httputils_xaccel.test.php</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2025</copyright>
    <generator>Java</generator><item>
        <title>b8c2692f77aeaab8243ccaf179ab9a08f6267a65 - fix(httputils): build a proper internal URL for nginx X-Accel-Redirect</title>
        <link>http://127.0.0.1:8080/history/dokuwiki/_test/tests/inc/httputils_xaccel.test.php#b8c2692f77aeaab8243ccaf179ab9a08f6267a65</link>
        <description>fix(httputils): build a proper internal URL for nginx X-Accel-RedirectUnlike Apache&apos;s mod_xsendfile and lighttpd&apos;s X-LIGHTTPD-send-file,which both accept an absolute file system path and stream the filedirectly, nginx treats X-Accel-Redirect as a URL: it performs aninternal subrequest against the value and resolves it through`internal` location blocks in its own configuration. The redirecttarget therefore must be a request path nginx can map back to a file,not the file system path itself.The previous implementation blindly stripped DOKU_INC&apos;s length fromthe file path, which produced a broken URL whenever a data directoryhad been relocated outside the DokuWiki tree.Route the file through three cases instead: files inside DOKU_INC keeptheir path relative to the wiki root; files in a relocated mediadir,mediaolddir, cachedir or savedir are mapped back to their default URLbelow data/; everything else falls through an opt-in /_x_accel_redirect/prefix.Path segments are URL-encoded so filenames with spaces or otherspecial characters resolve (fixes another potential bug in the previousimplementation).Nginx configuration:For the default layout no extra configuration is needed - files keeptheir path relative to the wiki root and the regular wiki locationalready serves them. For relocated data directories admins must add an`internal` location below the wiki&apos;s URL space pointing at the actualfile system path, e.g.:    location /data/media/ { internal; alias /srv/dokuwiki-media/; }For the /_x_accel_redirect/ fallback (used when a plugin serves filesfrom outside the wiki and its data directories), admins opt in byadding:    location /_x_accel_redirect/ { internal; alias /; }When the wiki is installed under a sub path, prefix both locationsaccordingly (e.g. /wiki/data/media/ and /wiki/_x_accel_redirect/).fixes: #2895

            List of files:
            /dokuwiki/_test/tests/inc/httputils_xaccel.test.php</description>
        <pubDate>Fri, 29 May 2026 20:00:21 +0000</pubDate>
        <dc:creator>Andreas Gohr &lt;andi@splitbrain.org&gt;</dc:creator>
    </item>
</channel>
</rss>
