summaryrefslogtreecommitdiff
path: root/lua.c
diff options
context:
space:
mode:
Diffstat (limited to 'lua.c')
-rw-r--r--lua.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lua.c b/lua.c
index c6f27e9..55efaaa 100644
--- a/lua.c
+++ b/lua.c
@@ -218,7 +218,8 @@ static void lua_main(struct client *cl, struct path_info *pi, char *url)
path_len = strlen(url);
str = strchr(url, '?');
if (str) {
- pi->query = str;
+ if (*(str + 1))
+ pi->query = str + 1;
path_len = str - url;
}
if (path_len > prefix_len) {