Welcome! Log In Create A New Profile

Advanced

[PATCH] Allows hyphens in variable names so can access hyphenated query vars

Mark Ellis via nginx-devel
August 02, 2017 07:32AM
# HG changeset patch
# User Mark Ellis <m@rkellis.com>
# Date 1501670303 -3600
# Wed Aug 02 11:38:23 2017 +0100
# Node ID 08008b0d1f4ffbd017d9f50142bdd46d7c4a41d2
# Parent 1eb753aa8e5e9ee5059ebb544194c8919b674873
Allows hyphens in variable names so can access hyphenated query vars

This patch allows hyphens in variable names so that you can access query string
parameters with hyphens

Before if you had a query string param such as `?foo-bar=123` you could not
access it with the variable `$foo-bar` as variables could not contain hyphens.

diff -r 1eb753aa8e5e -r 08008b0d1f4f src/http/ngx_http_script.c
--- a/src/http/ngx_http_script.c Tue Aug 01 19:12:10 2017 +0300
+++ b/src/http/ngx_http_script.c Wed Aug 02 11:38:23 2017 +0100
@@ -403,6 +403,7 @@
if ((ch >= 'A' && ch <= 'Z')
|| (ch >= 'a' && ch <= 'z')
|| (ch >= '0' && ch <= '9')
+ || ch == '-'
|| ch == '_')
{
continue;
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Allows hyphens in variable names so can access hyphenated query vars

Mark Ellis via nginx-devel 499 August 02, 2017 07:32AM

Re: [PATCH] Allows hyphens in variable names so can access hyphenated query vars

Maxim Dounin 207 August 07, 2017 09:22AM

Re: [PATCH] Allows hyphens in variable names so can access hyphenated query vars

Mark Ellis via nginx-devel 251 August 07, 2017 11:18AM

Re: [PATCH] Allows hyphens in variable names so can access hyphenated query vars

Maxim Dounin 204 August 07, 2017 11:48AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 157
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready