@@ -376,8 +376,10 @@ ngx_http_lua_new_thread(ngx_http_request_t *r, lua_State *L, int *ref)
376
376
if (!lua_isnil (L , -1 ) && !lua_isnil (L , -2 )) {
377
377
n ++ ;
378
378
}
379
+
379
380
lua_pop (L , 1 );
380
381
}
382
+
381
383
lua_pop (L , 1 );
382
384
383
385
ngx_log_debug3 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
@@ -2199,6 +2201,7 @@ ngx_http_lua_escape_uri(u_char *dst, u_char *src, size_t size, ngx_uint_t type)
2199
2201
return (uintptr_t ) dst ;
2200
2202
}
2201
2203
2204
+
2202
2205
static int
2203
2206
ngx_http_lua_util_hex2int (char xdigit )
2204
2207
{
@@ -2214,14 +2217,15 @@ ngx_http_lua_util_hex2int(char xdigit)
2214
2217
return -1 ;
2215
2218
}
2216
2219
2220
+
2217
2221
/* XXX we also decode '+' to ' ' */
2218
2222
void
2219
2223
ngx_http_lua_unescape_uri (u_char * * dst , u_char * * src , size_t size ,
2220
2224
ngx_uint_t type )
2221
2225
{
2222
- u_char * d = * dst , * s = * src , * de = (* dst + size );
2223
- int isuri = type & NGX_UNESCAPE_URI ;
2224
- int isredirect = type & NGX_UNESCAPE_REDIRECT ;
2226
+ u_char * d = * dst , * s = * src , * de = (* dst + size );
2227
+ int isuri = type & NGX_UNESCAPE_URI ;
2228
+ int isredirect = type & NGX_UNESCAPE_REDIRECT ;
2225
2229
2226
2230
while (size -- ) {
2227
2231
u_char curr = * s ++ ;
@@ -2245,10 +2249,12 @@ ngx_http_lua_unescape_uri(u_char **dst, u_char **src, size_t size,
2245
2249
if ((isuri || isredirect ) && ch == '?' ) {
2246
2250
* d ++ = ch ;
2247
2251
break ;
2252
+
2248
2253
} else if (isredirect && (ch <= '%' || ch >= 0x7f )) {
2249
2254
* d ++ = '%' ;
2250
2255
continue ;
2251
2256
}
2257
+
2252
2258
* d ++ = ch ;
2253
2259
s += 2 ;
2254
2260
size -= 2 ;
0 commit comments