Opened 12 years ago

Closed 11 years ago

#240 closed defect (fixed)

cannot find files when ssi subrequest ended by a interrogation mark

Reported by: ipcpu com Owned by: somebody
Priority: minor Milestone:
Component: nginx-core Version: 1.2.x
Keywords: SSI Cc:
uname -a: Linux WEB_YQ_64.62 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.2.4
built by gcc 4.1.2 20080704 (Red Hat 4.1.2-44)
configure arguments: --prefix=/usr/local/nginx --with-pcre=/home/soft/pcre-8.21

Description

HI

a find a problem when using nginx SSI(Server Side Include ).

when I use "<!--#include virtual="inc/nav.inc?" -->" it reported

2012/11/02 10:51:47 [error] 6066#0: *27 open() "/data/www/events/helper/inc/nav.inc?" failed (2: No such file or directory), client: 10.6.48.15, server: www.test.com, request: "GET /events/helper/aq.shtml HTTP/1.1", subrequest: "/events/helper/inc/nav.inc?", host: "www.test.com", referrer: "http://www.test.com/events/helper/index.shtml"

in error log.

but it works in Apache SSI.

Change History (2)

comment:1 by Ruslan Ermilov <ru@…>, 11 years ago

In 74bfa803a5aade632e15cc05eb8d4c52c85abe9c/nginx:

Teach ngx_http_parse_unsafe_uri() how to unescape URIs.

This fixes handling of escaped URIs in X-Accel-Redirect (ticket #316),
SSI (ticket #240), and DAV.

comment:2 by Ruslan Ermilov, 11 years ago

Resolution: fixed
sensitive: 0
Status: newclosed

You should use URI escaping for a file name that includes the "?" character.
URI escaping will be handled correctly after the committed fix.

Note: See TracTickets for help on using tickets.