Skip to content
This repository
Browse code

added change log for v0.4.0 and also documented the way to confirm th…

…at pcre jit is actually enabled.
  • Loading branch information...
commit b166210bcfb0620c43f12ce4c2cc468362b481db 1 parent bc9142c
Yichun Zhang authored January 17, 2012
181  README
@@ -2641,6 +2641,14 @@ Nginx API for Lua
2641 2641
     This method requires the PCRE library enabled in Nginx. (Known Issue
2642 2642
     With Special PCRE Sequences).
2643 2643
 
  2644
+    To confirm that PCRE JIT is indeed enabled, it's required to enable the
  2645
+    debugging logs in your Nginx build (by passing the "--with-debug" option
  2646
+    to your Nginx or ngx_openresty's "./configure" script) and enable the
  2647
+    "debug" error log level in your "error_log" directive, and then you can
  2648
+    see the following message if PCRE JIT actually works:
  2649
+
  2650
+        pcre JIT compiling result: 1
  2651
+
2644 2652
     This feature was introduced in the "v0.2.1rc11" release.
2645 2653
 
2646 2654
   ngx.re.gmatch
@@ -3474,7 +3482,180 @@ TODO
3474 3482
     *   add "stat" mode similar to "mod_lua".
3475 3483
 
3476 3484
 Changes
  3485
+  v0.4.0
  3486
+    11 January, 2012
  3487
+
  3488
+    *   bugfix: fixed a bug when the both the main request and the
  3489
+        subrequest are POST requests with a body: we should not forward the
  3490
+        main request's "Content-Length" headers to the user subrequests.
  3491
+        thanks 朱峰.
  3492
+
  3493
+    *   feature: implemented the API for reading response headers from
  3494
+        within Lua: "value = ngx.header.HEADER", see ngx.header.HEADER.
  3495
+
  3496
+    *   bugfix: fixed a bug when setting a multi-value response header to a
  3497
+        single value (via writing to ngx.header.HEADER): the single value
  3498
+        will be repeated on each old value.
  3499
+
  3500
+    *   bugfix: fixed an issue in ngx.redirect, ngx.exit, and ngx.exec:
  3501
+        these function calls would be intercepted by Lua "pcall"/"xpcall"
  3502
+        because they used Lua exceptions; now they use Lua yield just as
  3503
+        ngx.location.capture. thanks @hugozhu for reporting this.
  3504
+
  3505
+    *   feature: now we also return the "Last-Modified" header (if any) for
  3506
+        the subrequest response object. thanks @cyberty and sexybabes.
  3507
+
  3508
+    *   feature: now ngx.exec supports Lua table as the second args argument
  3509
+        value. thanks sexybabes.
  3510
+
  3511
+    *   feature: implemented the ngx.headers_sent API to check if response
  3512
+        headers are sent (by ngx_lua). thanks @hugozhu.
  3513
+
  3514
+    *   feature: exposes the CRC-32 API of the Nginx core to the Lua land,
  3515
+        in the form of the ngx.crc32_short and ngx.crc32_long methods.
  3516
+        thanks @Lance.
  3517
+
  3518
+    *   feature: now for HTTP 1.0 requests, we disable the automatic full
  3519
+        buffering mode if the user sets the "Content-Length" response header
  3520
+        before sending out the headers. this allows streaming output for
  3521
+        HTTP 1.0 requests if the content length can be calculated
  3522
+        beforehand. thanks 李子义.
  3523
+
  3524
+    *   bugfix: now we properly support setting the "Cache-Control" response
  3525
+        header via the ngx.header.HEADER interface.
  3526
+
  3527
+    *   bugfix: no longer set header hash to 1. use the "ngx_hash_key_lc"
  3528
+        instead.
  3529
+
  3530
+    *   bugfix: calling ngx.exec to jump to a named location did not clear
  3531
+        the context object of LuaNginxModule properly and might cause evil
  3532
+        problems. thanks Nginx User.
  3533
+
  3534
+    *   bugfix: now we explicitly clear all the modules' contexts before
  3535
+        dump to named location with ngx.exec.
  3536
+
  3537
+    *   feature: implemented ngx.req.set_uri and ngx.req.set_uri_args to
  3538
+        emulate [[HttpRewriteModule]]'s rewrite directive. thanks Vladimir
  3539
+        Protasov (utros) and Nginx User.
  3540
+
  3541
+    *   bugfix: now we skip rewrite phase Lua handlers altogether if
  3542
+        [[HttpRewriteModule]]'s rewrite directive issue a location re-lookup
  3543
+        by changing URIs (but not including "rewrite ... break"). thanks
  3544
+        Nginx User.
  3545
+
  3546
+    *   feature: added constant "ngx.HTTP_METHOD_NOT_IMPLEMENTED (501)".
  3547
+        thanks Nginx User.
  3548
+
  3549
+    *   feature: added new Lua functions ngx.req.read_body,
  3550
+        ngx.req.discard_body, ngx.req.get_body_data, and
  3551
+        ngx.req.get_body_file. thanks Tzury Bar Yochay for funding the
  3552
+        development work.
  3553
+
  3554
+    *   bugfix: fixed hanging issues when using ngx.exec within
  3555
+        rewrite_by_lua and access_by_lua. thanks Nginx User for reporting
  3556
+        it.
  3557
+
  3558
+    *   feature: added new Lua API ngx.req.set_body_file. thanks Tzury Bar
  3559
+        Yochay for funding the development work.
  3560
+
  3561
+    *   feature: added new Lua API ngx.req.set_body_data. thanks Tzury Bar
  3562
+        Yochay for funding the development work.
  3563
+
  3564
+    *   bugfix: lua_need_request_body should not skip requests with methods
  3565
+        other than "POST" and "PUT". thanks Nginx User.
  3566
+
  3567
+    *   bugfix: no longer free request body buffers that are not allocated
  3568
+        by ourselves.
  3569
+
  3570
+    *   bugfix: now we allow setting ngx.var.VARIABLE to nil.
  3571
+
  3572
+    *   feature: added new directive lua_shared_dict.
  3573
+
  3574
+    *   feature: added Lua API for the shm-based dictionary, see
  3575
+        ngx.shared.DICT.
  3576
+
  3577
+    *   bugfix: fixed spots of -Werror=unused-but-set-variable warning
  3578
+        issued by gcc 4.6.0.
  3579
+
  3580
+    *   bugfix: ndk.set_var.DIRECTIVE had a memory issue and might pass
  3581
+        empty argument values to the directive being called. thanks
  3582
+        dannynoonan.
  3583
+
  3584
+    *   feature: added the "ctx" option to ngx.location.capture: you can now
  3585
+        specify a custom Lua table to pass to the subrequest as its ngx.ctx.
  3586
+        thanks @hugozhu.
  3587
+
  3588
+    *   feature: added the ngx.encode_args method to encode a Lua code to a
  3589
+        URI query string. thanks 郭颖 (0597虾).
  3590
+
  3591
+    *   feature: ngx.location.capture and ngx.exec now supports the same Lua
  3592
+        args table format as in ngx.encode_args. thanks 郭颖 (0597虾).
  3593
+
  3594
+    *   bugfix: "Cache-Control" header modification might introduce empty
  3595
+        value headers when using with the standard HttpHeadersModule.
  3596
+
  3597
+    *   feature: added ngx.hmac_sha1. thanks drdrxp.
  3598
+
  3599
+    *   docs: documented the long-existent ngx.md5 and ngx.md5_bin APIs.
  3600
+
  3601
+    *   docs: massive documentation improvements. thanks Nginx User.
  3602
+
  3603
+    *   feature: added new regex options "j" and "d" to ngx.re.match,
  3604
+        ngx.re.gmatch, ngx.re.sub, and ngx.re.gsub so as to enable the PCRE
  3605
+        JIT mode and DFA mode, respectively. thanks @姜大炮 for providing the
  3606
+        patch.
  3607
+
  3608
+    *   feature: added options "copy_all_vars" and "vars" to
  3609
+        ngx.location.capture and ngx.location.capture_multi. thanks Marcus
  3610
+        Clyne for the patch.
  3611
+
  3612
+    *   feature: added new Lua API ngx.now to return the current time
  3613
+        (including the milliseconds part as the decimal part). thanks 林青.
  3614
+
  3615
+    *   feature: added new Lua API ngx.update_time to forcibly updating
  3616
+        Nginx's time cache.
  3617
+
  3618
+    *   feature: added "wait" boolean argument to ngx.flush to support
  3619
+        synchronous flushing: "ngx.flush(true)" will not return until all
  3620
+        the data has been flushed into the system send buffer or the send
  3621
+        timeout has expired.
  3622
+
  3623
+    *   bugfix: now we check timed out downstream connections in our write
  3624
+        event handler.
  3625
+
  3626
+    *   feature: added constant "ngx.HTTP_GATEWAY_TIMEOUT (504)" per Fry-kun
  3627
+        in github issue #73
  3628
+        (<https://github.com/chaoslawful/lua-nginx-module/issues/73>).
  3629
+
  3630
+    *   bugfix: ngx.var.VARIABLE did not evaluate to "nil" when the Nginx
  3631
+        variable's "valid" flag is 0.
  3632
+
  3633
+    *   bugfix: there were various places where we did not check the pointer
  3634
+        returned by the memory allocator.
  3635
+
  3636
+    *   bugfix: ngx.req.set_header and ngx.req.clear_header did not handle
  3637
+        the "Accept-Encoding" request headers properly. thanks 天街夜色.
  3638
+
  3639
+    *   bugfix: ngx.req.set_header might cause invalid memory reads because
  3640
+        Nginx request header values must be "NULL" terminated. thanks Maxim
  3641
+        Dounin.
  3642
+
  3643
+    *   bugfix: removing builtin headers via ngx.req.clear_header and its
  3644
+        equivalent in huge request headers with 20+ entries could result in
  3645
+        data loss. thanks Chris Dumoulin.
  3646
+
  3647
+    *   bugfix: ngx.req.get_uri_args and ngx.req.get_post_args now only
  3648
+        parse up to 100 arguments by default. but one can specify the
  3649
+        optional argument to these two methods to specify a custom maximum
  3650
+        number of args. thanks Tzury Bar Yochay for reporting this.
  3651
+
  3652
+    *   bugfix: ngx.req.get_headers now only parse up to 100 request headers
  3653
+        by default. but one can specify the optional argument to this method
  3654
+        to specify a custom maximum number of headers.
  3655
+
3477 3656
   v0.3.0
  3657
+    September 02, 2011
  3658
+
3478 3659
     New features
3479 3660
 
3480 3661
     *   added the header_filter_by_lua and header_filter_by_lua_file
63  README.markdown
Source Rendered
@@ -2563,6 +2563,12 @@ Note that, the `options` argument is not optional when the `ctx` argument is spe
2563 2563
 
2564 2564
 This method requires the PCRE library enabled in Nginx.  ([Known Issue With Special PCRE Sequences](http://wiki.nginx.org/HttpLuaModule#Special_PCRE_Sequences)).
2565 2565
 
  2566
+To confirm that PCRE JIT is indeed enabled, it's required to enable the debugging logs in your Nginx build (by passing the `--with-debug` option to your Nginx or ngx_openresty's `./configure` script) and enable the "debug" error log level in your `error_log` directive, and then you can see the following message if PCRE JIT actually works:
  2567
+
  2568
+
  2569
+    pcre JIT compiling result: 1
  2570
+
  2571
+
2566 2572
 This feature was introduced in the `v0.2.1rc11` release.
2567 2573
 
2568 2574
 ngx.re.gmatch
@@ -3230,8 +3236,65 @@ Longer Term
3230 3236
 Changes
3231 3237
 =======
3232 3238
 
  3239
+v0.4.0
  3240
+------
  3241
+
  3242
+11 January, 2012
  3243
+
  3244
+* bugfix: fixed a bug when the both the main request and the subrequest are POST requests with a body: we should not forward the main request's `Content-Length` headers to the user subrequests. thanks 朱峰.
  3245
+* feature: implemented the API for reading response headers from within Lua: `value = ngx.header.HEADER`, see [ngx.header.HEADER](http://wiki.nginx.org/HttpLuaModule#ngx.header.HEADER).
  3246
+* bugfix: fixed a bug when setting a multi-value response header to a single value (via writing to [ngx.header.HEADER](http://wiki.nginx.org/HttpLuaModule#ngx.header.HEADER)): the single value will be repeated on each old value.
  3247
+* bugfix: fixed an issue in [ngx.redirect](http://wiki.nginx.org/HttpLuaModule#ngx.redirect), [ngx.exit](http://wiki.nginx.org/HttpLuaModule#ngx.exit), and [ngx.exec](http://wiki.nginx.org/HttpLuaModule#ngx.exec): these function calls would be intercepted by Lua `pcall`/`xpcall` because they used Lua exceptions; now they use Lua yield just as [ngx.location.capture](http://wiki.nginx.org/HttpLuaModule#ngx.location.capture). thanks @hugozhu for reporting this.
  3248
+* feature: now we also return the `Last-Modified` header (if any) for the subrequest response object. thanks @cyberty and sexybabes.
  3249
+* feature: now [ngx.exec](http://wiki.nginx.org/HttpLuaModule#ngx.exec) supports Lua table as the second args argument value. thanks sexybabes.
  3250
+* feature: implemented the [ngx.headers_sent](http://wiki.nginx.org/HttpLuaModule#ngx.headers_sent) API to check if response headers are sent (by ngx_lua). thanks @hugozhu.
  3251
+* feature: exposes the CRC-32 API of the Nginx core to the Lua land, in the form of the [ngx.crc32_short](http://wiki.nginx.org/HttpLuaModule#ngx.crc32_short) and [ngx.crc32_long](http://wiki.nginx.org/HttpLuaModule#ngx.crc32_long) methods. thanks @Lance.
  3252
+* feature: now for HTTP 1.0 requests, we disable the automatic full buffering mode if the user sets the `Content-Length` response header before sending out the headers. this allows streaming output for HTTP 1.0 requests if the content length can be calculated beforehand. thanks 李子义.
  3253
+* bugfix: now we properly support setting the `Cache-Control` response header via the [ngx.header.HEADER](http://wiki.nginx.org/HttpLuaModule#ngx.header.HEADER) interface.
  3254
+* bugfix: no longer set header hash to `1`. use the `ngx_hash_key_lc` instead.
  3255
+* bugfix: calling [ngx.exec](http://wiki.nginx.org/HttpLuaModule#ngx.exec) to jump to a named location did not clear the context object of LuaNginxModule properly and might cause evil problems. thanks Nginx User.
  3256
+* bugfix: now we explicitly clear all the modules' contexts before dump to named location with [ngx.exec](http://wiki.nginx.org/HttpLuaModule#ngx.exec).
  3257
+* feature: implemented [ngx.req.set_uri](http://wiki.nginx.org/HttpLuaModule#ngx.req.set_uri) and [ngx.req.set_uri_args](http://wiki.nginx.org/HttpLuaModule#ngx.req.set_uri_args) to emulate [HttpRewriteModule](http://wiki.nginx.org/HttpRewriteModule)'s [rewrite](http://wiki.nginx.org/HttpRewriteModule#rewrite) directive. thanks Vladimir Protasov (utros) and Nginx User.
  3258
+* bugfix: now we skip rewrite phase Lua handlers altogether if [HttpRewriteModule](http://wiki.nginx.org/HttpRewriteModule)'s [rewrite](http://wiki.nginx.org/HttpRewriteModule#rewrite) directive issue a location re-lookup by changing URIs (but not including `rewrite ... break`). thanks Nginx User.
  3259
+* feature: added constant `ngx.HTTP_METHOD_NOT_IMPLEMENTED (501)`. thanks Nginx User.
  3260
+* feature: added new Lua functions [ngx.req.read_body](http://wiki.nginx.org/HttpLuaModule#ngx.req.read_body), [ngx.req.discard_body](http://wiki.nginx.org/HttpLuaModule#ngx.req.discard_body), [ngx.req.get_body_data](http://wiki.nginx.org/HttpLuaModule#ngx.req.get_body_data), and [ngx.req.get_body_file](http://wiki.nginx.org/HttpLuaModule#ngx.req.get_body_file). thanks Tzury Bar Yochay for funding the development work.
  3261
+* bugfix: fixed hanging issues when using [ngx.exec](http://wiki.nginx.org/HttpLuaModule#ngx.exec) within [rewrite_by_lua](http://wiki.nginx.org/HttpLuaModule#rewrite_by_lua) and [access_by_lua](http://wiki.nginx.org/HttpLuaModule#access_by_lua). thanks Nginx User for reporting it.
  3262
+* feature: added new Lua API [ngx.req.set_body_file](http://wiki.nginx.org/HttpLuaModule#ngx.req.set_body_file). thanks Tzury Bar Yochay for funding the development work.
  3263
+* feature: added new Lua API [ngx.req.set_body_data](http://wiki.nginx.org/HttpLuaModule#ngx.req.set_body_data). thanks Tzury Bar Yochay for funding the development work.
  3264
+* bugfix: [lua_need_request_body](http://wiki.nginx.org/HttpLuaModule#lua_need_request_body) should not skip requests with methods other than `POST` and `PUT`. thanks Nginx User.
  3265
+* bugfix: no longer free request body buffers that are not allocated by ourselves.
  3266
+* bugfix: now we allow setting [ngx.var.VARIABLE](http://wiki.nginx.org/HttpLuaModule#ngx.var.VARIABLE) to nil.
  3267
+* feature: added new directive [lua_shared_dict](http://wiki.nginx.org/HttpLuaModule#lua_shared_dict).
  3268
+* feature: added Lua API for the shm-based dictionary, see [ngx.shared.DICT](http://wiki.nginx.org/HttpLuaModule#ngx.shared.DICT).
  3269
+* bugfix: fixed spots of -Werror=unused-but-set-variable warning issued by gcc 4.6.0.
  3270
+* bugfix: [ndk.set_var.DIRECTIVE](http://wiki.nginx.org/HttpLuaModule#ndk.set_var.DIRECTIVE) had a memory issue and might pass empty argument values to the directive being called. thanks dannynoonan.
  3271
+* feature: added the `ctx` option to [ngx.location.capture](http://wiki.nginx.org/HttpLuaModule#ngx.location.capture): you can now specify a custom Lua table to pass to the subrequest as its [ngx.ctx](http://wiki.nginx.org/HttpLuaModule#ngx.ctx). thanks @hugozhu.
  3272
+* feature: added the [ngx.encode_args](http://wiki.nginx.org/HttpLuaModule#ngx.encode_args) method to encode a Lua code to a URI query string. thanks 郭颖 (0597虾).
  3273
+* feature: [ngx.location.capture](http://wiki.nginx.org/HttpLuaModule#ngx.location.capture) and [ngx.exec](http://wiki.nginx.org/HttpLuaModule#ngx.exec) now supports the same Lua args table format as in ngx.encode_args. thanks 郭颖 (0597虾).
  3274
+* bugfix: `Cache-Control` header modification might introduce empty value headers when using with the standard HttpHeadersModule.
  3275
+* feature: added [ngx.hmac_sha1](http://wiki.nginx.org/HttpLuaModule#ngx.hmac_sha1). thanks drdrxp.
  3276
+* docs: documented the long-existent [ngx.md5](http://wiki.nginx.org/HttpLuaModule#ngx.md5) and [ngx.md5_bin](http://wiki.nginx.org/HttpLuaModule#ngx.md5_bin) APIs.
  3277
+* docs: massive documentation improvements. thanks Nginx User.
  3278
+* feature: added new regex options `j` and `d` to [ngx.re.match](http://wiki.nginx.org/HttpLuaModule#ngx.re.match), [ngx.re.gmatch](http://wiki.nginx.org/HttpLuaModule#ngx.re.gmatch), [ngx.re.sub](http://wiki.nginx.org/HttpLuaModule#ngx.re.sub), and [ngx.re.gsub](http://wiki.nginx.org/HttpLuaModule#ngx.re.gsub) so as to enable the PCRE JIT mode and DFA mode, respectively. thanks @姜大炮 for providing the patch.
  3279
+* feature: added options `copy_all_vars` and `vars` to [ngx.location.capture](http://wiki.nginx.org/HttpLuaModule#ngx.location.capture) and [ngx.location.capture_multi](http://wiki.nginx.org/HttpLuaModule#ngx.location.capture_multi). thanks Marcus Clyne for the patch.
  3280
+* feature: added new Lua API [ngx.now](http://wiki.nginx.org/HttpLuaModule#ngx.now) to return the current time (including the milliseconds part as the decimal part). thanks 林青.
  3281
+* feature: added new Lua API [ngx.update_time](http://wiki.nginx.org/HttpLuaModule#ngx.update_time) to forcibly updating Nginx's time cache.
  3282
+* feature: added `wait` boolean argument to [ngx.flush](http://wiki.nginx.org/HttpLuaModule#ngx.flush) to support synchronous flushing: `ngx.flush(true)` will not return until all the data has been flushed into the system send buffer or the send timeout has expired.
  3283
+* bugfix: now we check timed out downstream connections in our write event handler.
  3284
+* feature: added constant `ngx.HTTP_GATEWAY_TIMEOUT (504)` per Fry-kun in [github issue #73](https://github.com/chaoslawful/lua-nginx-module/issues/73).
  3285
+* bugfix: [ngx.var.VARIABLE](http://wiki.nginx.org/HttpLuaModule#ngx.var.VARIABLE) did not evaluate to `nil` when the Nginx variable's `valid` flag is `0`.
  3286
+* bugfix: there were various places where we did not check the pointer returned by the memory allocator.
  3287
+* bugfix: [ngx.req.set_header](http://wiki.nginx.org/HttpLuaModule#ngx.req.set_header) and [ngx.req.clear_header](http://wiki.nginx.org/HttpLuaModule#ngx.req.clear_header) did not handle the `Accept-Encoding` request headers properly. thanks 天街夜色.
  3288
+* bugfix: [ngx.req.set_header](http://wiki.nginx.org/HttpLuaModule#ngx.req.set_header) might cause invalid memory reads because Nginx request header values must be `NULL` terminated. thanks Maxim Dounin.
  3289
+* bugfix: removing builtin headers via [ngx.req.clear_header](http://wiki.nginx.org/HttpLuaModule#ngx.req.clear_header) and its equivalent in huge request headers with 20+ entries could result in data loss. thanks Chris Dumoulin.
  3290
+* bugfix: [ngx.req.get_uri_args](http://wiki.nginx.org/HttpLuaModule#ngx.req.get_uri_args) and [ngx.req.get_post_args](http://wiki.nginx.org/HttpLuaModule#ngx.req.get_post_args) now only parse up to `100` arguments by default. but one can specify the optional argument to these two methods to specify a custom maximum number of args. thanks Tzury Bar Yochay for reporting this.
  3291
+* bugfix: [ngx.req.get_headers](http://wiki.nginx.org/HttpLuaModule#ngx.req.get_headers) now only parse up to `100` request headers by default. but one can specify the optional argument to this method to specify a custom maximum number of headers.
  3292
+
3233 3293
 v0.3.0
3234 3294
 ------
  3295
+
  3296
+September 02, 2011
  3297
+
3235 3298
 **New features**
3236 3299
 
3237 3300
 * added the [header_filter_by_lua](http://wiki.nginx.org/HttpLuaModule#header_filter_by_lua) and [header_filter_by_lua_file](http://wiki.nginx.org/HttpLuaModule#header_filter_by_lua_file) directives. thanks Liseen Wan (万珣新).
62  doc/HttpLuaModule.wiki
Source Rendered
@@ -2483,6 +2483,12 @@ Note that, the <code>options</code> argument is not optional when the <code>ctx<
2483 2483
 
2484 2484
 This method requires the PCRE library enabled in Nginx.  ([[#Special PCRE Sequences|Known Issue With Special PCRE Sequences]]).
2485 2485
 
  2486
+To confirm that PCRE JIT is indeed enabled, it's required to enable the debugging logs in your Nginx build (by passing the <code>--with-debug</code> option to your Nginx or ngx_openresty's <code>./configure</code> script) and enable the "debug" error log level in your <code>error_log</code> directive, and then you can see the following message if PCRE JIT actually works:
  2487
+
  2488
+<geshi lang="text">
  2489
+    pcre JIT compiling result: 1
  2490
+</geshi>
  2491
+
2486 2492
 This feature was introduced in the <code>v0.2.1rc11</code> release.
2487 2493
 
2488 2494
 == ngx.re.gmatch ==
@@ -3123,7 +3129,63 @@ Please report bugs or submit patches by:
3123 3129
 
3124 3130
 = Changes =
3125 3131
 
  3132
+== v0.4.0 ==
  3133
+
  3134
+11 January, 2012
  3135
+
  3136
+* bugfix: fixed a bug when the both the main request and the subrequest are POST requests with a body: we should not forward the main request's <code>Content-Length</code> headers to the user subrequests. thanks 朱峰.
  3137
+* feature: implemented the API for reading response headers from within Lua: <code>value = ngx.header.HEADER</code>, see [[#ngx.header.HEADER|ngx.header.HEADER]].
  3138
+* bugfix: fixed a bug when setting a multi-value response header to a single value (via writing to [[#ngx.header.HEADER|ngx.header.HEADER]]): the single value will be repeated on each old value.
  3139
+* bugfix: fixed an issue in [[#ngx.redirect|ngx.redirect]], [[#ngx.exit|ngx.exit]], and [[#ngx.exec|ngx.exec]]: these function calls would be intercepted by Lua <code>pcall</code>/<code>xpcall</code> because they used Lua exceptions; now they use Lua yield just as [[#ngx.location.capture|ngx.location.capture]]. thanks @hugozhu for reporting this.
  3140
+* feature: now we also return the <code>Last-Modified</code> header (if any) for the subrequest response object. thanks @cyberty and sexybabes.
  3141
+* feature: now [[#ngx.exec|ngx.exec]] supports Lua table as the second args argument value. thanks sexybabes.
  3142
+* feature: implemented the [[#ngx.headers_sent|ngx.headers_sent]] API to check if response headers are sent (by ngx_lua). thanks @hugozhu.
  3143
+* feature: exposes the CRC-32 API of the Nginx core to the Lua land, in the form of the [[#ngx.crc32_short|ngx.crc32_short]] and [[#ngx.crc32_long|ngx.crc32_long]] methods. thanks @Lance.
  3144
+* feature: now for HTTP 1.0 requests, we disable the automatic full buffering mode if the user sets the <code>Content-Length</code> response header before sending out the headers. this allows streaming output for HTTP 1.0 requests if the content length can be calculated beforehand. thanks 李子义.
  3145
+* bugfix: now we properly support setting the <code>Cache-Control</code> response header via the [[#ngx.header.HEADER|ngx.header.HEADER]] interface.
  3146
+* bugfix: no longer set header hash to <code>1</code>. use the <code>ngx_hash_key_lc</code> instead.
  3147
+* bugfix: calling [[#ngx.exec|ngx.exec]] to jump to a named location did not clear the context object of LuaNginxModule properly and might cause evil problems. thanks Nginx User.
  3148
+* bugfix: now we explicitly clear all the modules' contexts before dump to named location with [[#ngx.exec|ngx.exec]].
  3149
+* feature: implemented [[#ngx.req.set_uri|ngx.req.set_uri]] and [[#ngx.req.set_uri_args|ngx.req.set_uri_args]] to emulate [[HttpRewriteModule]]'s [[HttpRewriteModule#rewrite|rewrite]] directive. thanks Vladimir Protasov (utros) and Nginx User.
  3150
+* bugfix: now we skip rewrite phase Lua handlers altogether if [[HttpRewriteModule]]'s [[HttpRewriteModule#rewrite|rewrite]] directive issue a location re-lookup by changing URIs (but not including <code>rewrite ... break</code>). thanks Nginx User.
  3151
+* feature: added constant <code>ngx.HTTP_METHOD_NOT_IMPLEMENTED (501)</code>. thanks Nginx User.
  3152
+* feature: added new Lua functions [[#ngx.req.read_body|ngx.req.read_body]], [[#ngx.req.discard_body|ngx.req.discard_body]], [[#ngx.req.get_body_data|ngx.req.get_body_data]], and [[#ngx.req.get_body_file|ngx.req.get_body_file]]. thanks Tzury Bar Yochay for funding the development work.
  3153
+* bugfix: fixed hanging issues when using [[#ngx.exec|ngx.exec]] within [[#rewrite_by_lua|rewrite_by_lua]] and [[#access_by_lua|access_by_lua]]. thanks Nginx User for reporting it.
  3154
+* feature: added new Lua API [[#ngx.req.set_body_file|ngx.req.set_body_file]]. thanks Tzury Bar Yochay for funding the development work.
  3155
+* feature: added new Lua API [[#ngx.req.set_body_data|ngx.req.set_body_data]]. thanks Tzury Bar Yochay for funding the development work.
  3156
+* bugfix: [[#lua_need_request_body|lua_need_request_body]] should not skip requests with methods other than <code>POST</code> and <code>PUT</code>. thanks Nginx User.
  3157
+* bugfix: no longer free request body buffers that are not allocated by ourselves.
  3158
+* bugfix: now we allow setting [[#ngx.var.VARIABLE|ngx.var.VARIABLE]] to nil.
  3159
+* feature: added new directive [[#lua_shared_dict|lua_shared_dict]].
  3160
+* feature: added Lua API for the shm-based dictionary, see [[#ngx.shared.DICT|ngx.shared.DICT]].
  3161
+* bugfix: fixed spots of -Werror=unused-but-set-variable warning issued by gcc 4.6.0.
  3162
+* bugfix: [[#ndk.set_var.DIRECTIVE|ndk.set_var.DIRECTIVE]] had a memory issue and might pass empty argument values to the directive being called. thanks dannynoonan.
  3163
+* feature: added the <code>ctx</code> option to [[#ngx.location.capture|ngx.location.capture]]: you can now specify a custom Lua table to pass to the subrequest as its [[#ngx.ctx|ngx.ctx]]. thanks @hugozhu.
  3164
+* feature: added the [[#ngx.encode_args|ngx.encode_args]] method to encode a Lua code to a URI query string. thanks 郭颖 (0597虾).
  3165
+* feature: [[#ngx.location.capture|ngx.location.capture]] and [[#ngx.exec|ngx.exec]] now supports the same Lua args table format as in ngx.encode_args. thanks 郭颖 (0597虾).
  3166
+* bugfix: <code>Cache-Control</code> header modification might introduce empty value headers when using with the standard HttpHeadersModule.
  3167
+* feature: added [[#ngx.hmac_sha1|ngx.hmac_sha1]]. thanks drdrxp.
  3168
+* docs: documented the long-existent [[#ngx.md5|ngx.md5]] and [[#ngx.md5_bin|ngx.md5_bin]] APIs.
  3169
+* docs: massive documentation improvements. thanks Nginx User.
  3170
+* feature: added new regex options <code>j</code> and <code>d</code> to [[#ngx.re.match|ngx.re.match]], [[#ngx.re.gmatch|ngx.re.gmatch]], [[#ngx.re.sub|ngx.re.sub]], and [[#ngx.re.gsub|ngx.re.gsub]] so as to enable the PCRE JIT mode and DFA mode, respectively. thanks @姜大炮 for providing the patch.
  3171
+* feature: added options <code>copy_all_vars</code> and <code>vars</code> to [[#ngx.location.capture|ngx.location.capture]] and [[#ngx.location.capture_multi|ngx.location.capture_multi]]. thanks Marcus Clyne for the patch.
  3172
+* feature: added new Lua API [[#ngx.now|ngx.now]] to return the current time (including the milliseconds part as the decimal part). thanks 林青.
  3173
+* feature: added new Lua API [[#ngx.update_time|ngx.update_time]] to forcibly updating Nginx's time cache.
  3174
+* feature: added <code>wait</code> boolean argument to [[#ngx.flush|ngx.flush]] to support synchronous flushing: <code>ngx.flush(true)</code> will not return until all the data has been flushed into the system send buffer or the send timeout has expired.
  3175
+* bugfix: now we check timed out downstream connections in our write event handler.
  3176
+* feature: added constant <code>ngx.HTTP_GATEWAY_TIMEOUT (504)</code> per Fry-kun in [https://github.com/chaoslawful/lua-nginx-module/issues/73 github issue #73].
  3177
+* bugfix: [[#ngx.var.VARIABLE|ngx.var.VARIABLE]] did not evaluate to <code>nil</code> when the Nginx variable's <code>valid</code> flag is <code>0</code>.
  3178
+* bugfix: there were various places where we did not check the pointer returned by the memory allocator.
  3179
+* bugfix: [[#ngx.req.set_header|ngx.req.set_header]] and [[#ngx.req.clear_header|ngx.req.clear_header]] did not handle the <code>Accept-Encoding</code> request headers properly. thanks 天街夜色.
  3180
+* bugfix: [[#ngx.req.set_header|ngx.req.set_header]] might cause invalid memory reads because Nginx request header values must be <code>NULL</code> terminated. thanks Maxim Dounin.
  3181
+* bugfix: removing builtin headers via [[#ngx.req.clear_header|ngx.req.clear_header]] and its equivalent in huge request headers with 20+ entries could result in data loss. thanks Chris Dumoulin.
  3182
+* bugfix: [[#ngx.req.get_uri_args|ngx.req.get_uri_args]] and [[#ngx.req.get_post_args|ngx.req.get_post_args]] now only parse up to <code>100</code> arguments by default. but one can specify the optional argument to these two methods to specify a custom maximum number of args. thanks Tzury Bar Yochay for reporting this.
  3183
+* bugfix: [[#ngx.req.get_headers|ngx.req.get_headers]] now only parse up to <code>100</code> request headers by default. but one can specify the optional argument to this method to specify a custom maximum number of headers.
  3184
+
3126 3185
 == v0.3.0 ==
  3186
+
  3187
+September 02, 2011
  3188
+
3127 3189
 '''New features'''
3128 3190
 
3129 3191
 * added the [[#header_filter_by_lua|header_filter_by_lua]] and [[#header_filter_by_lua_file|header_filter_by_lua_file]] directives. thanks Liseen Wan (万珣新).

0 notes on commit b166210

Please sign in to comment.
Something went wrong with that request. Please try again.