diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2013-03-18 15:35:09 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-03-18 15:36:17 +0100 |
commit | 9d0b3de603b0ed965c1ec40433b9bf89918f67b8 (patch) | |
tree | 5f8436498ac8d93bdfaa0a6d286c4a0df3c7a861 /lua.c | |
parent | 85e8bf57e16517b07b2d175d1a17e701d8791ec1 (diff) |
lua: fix query string handling, the QUERY_STRING environment variable must not contain the leading question mark
Diffstat (limited to 'lua.c')
-rw-r--r-- | lua.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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) { |