Yichun Zhang (agentzh)
311539270b
tests: removed the useless "use lib" directives from the Perl test files. thanks Markus Linnala for the report in #464 .
2015-10-08 17:13:16 +08:00
Yichun Zhang (agentzh)
5399898ea3
bugfix: setting Content-Type response values including "; charset=xxx" via the ngx.header API might bypass the MIME type checks in other nginx modules like ngx_gzip. thanks Andreas Fischer for the report.
2015-08-11 13:19:21 +08:00
Yichun Zhang (agentzh)
601044eb32
bugfix: ngx.resp.get_headers(): some built-in headers were not accessible via lowercase. thanks Nick Muerdter for the patch in #529 .
2015-06-21 00:19:21 +08:00
Yichun Zhang (agentzh)
3dbb2b00ec
tests: fixed nondeterminism due to unordered Lua table iterations. thanks Markus Linnala for the patch in #465 .
2015-03-05 14:06:03 -08:00
Yichun Zhang (agentzh)
8f908775c1
bugfix: the value of the Location response header set by the ngx.header.HEADER API might get overwritten by nginx's header filter to the fully qualified form (with the scheme and host parts).
2015-02-05 15:42:41 -08:00
Yichun Zhang (agentzh)
e0cd3ccf1b
bugfix: ngx.resp.get_headers(): sometimes we might omit the builtin-headers Content-Type, Content-Length, Connection, and Transfer-Encoding. thanks Jon Keys for the report.
2014-08-12 12:59:30 -07:00
Yichun Zhang (agentzh)
b6e991ba9f
tests: improved the test cases for the ngx.header API a little bit.
2014-07-13 18:44:14 -07:00
Yichun Zhang (agentzh)
887f0f99d5
feature: added new API function ngx.resp.get_headers() for fetching all the response headers. thanks Tatsuhiko Kubo for the patch in #335 .
2014-02-26 15:14:09 -08:00
Yichun Zhang (agentzh)
0afaeec3d0
added (passing) tests for using lua numbers in response header names and values for the ngx.header.HEADER API.
2014-01-04 14:21:56 -08:00
Yichun Zhang (agentzh)
04a7a2cca8
use Test::Nginx::Socket::Lua from the test-nginx project in our test suite.
2013-12-05 14:46:51 -08:00
Yichun Zhang (agentzh)
8228e98448
bugfix: reading ngx.header.HEADER could result in Lua string corruptions. thanks Dane Knecht for the report.
2013-11-05 15:11:37 -08:00
Yichun Zhang (agentzh)
c304f35921
bugfix: when there were no existing Cache-Control response headers, "ngx.header.cache_control = nil" would (incorrectly) create a new Cache-Control header with an empty value. thanks jinglong for the patch.
2013-10-12 11:04:31 -07:00
Yichun Zhang (agentzh)
01bf02aa04
bugfix: the original lettercase of the header name was lost when creating the Cache-Control response header via the ngx.header.HEADER API.
2013-10-12 10:39:15 -07:00
Yichun Zhang (agentzh)
7dbd2a5118
bugfix: reading ngx.header.location did not work when auto-redirect was in action. this is a further fix for #260 .
2013-08-03 22:28:46 -07:00
Yichun Zhang (agentzh)
547d299463
bugfix: segfault might happen when reading or writing to a response header via the ngx.header.HEADER API in the case that the nginx core initiated a 301 redirect. this issue was caused by an optimization in the nginx core where ngx_http_core_find_config_phase, for example, does not fully initialize the "Location" response header after creating the header. thanks Vladimir Protasov for the report in #260 .
2013-08-02 19:16:05 -07:00
Yichun Zhang (agentzh)
e0626c3127
added tests to improve the code coverage in file ngx_http_lua_headers_out.c.
2013-08-01 19:00:11 -07:00
agentzh (Yichun Zhang)
b07a3d3c5f
fixed failing test cases to reflect the multi-value header change in nginx 1.4.1.
2013-06-10 16:33:05 -07:00
agentzh (Yichun Zhang)
f20bc66109
added custom test scaffold t::TestNginxLua which subclasses Test::Nginx::Socket. it supports the environment TEST_NGINX_INIT_BY_LUA which can be used to add more custom Lua code to the value of the init_by_lua directive in the nginx configuration.
2013-05-08 21:03:04 -07:00
agentzh (Yichun Zhang)
0d12003313
tests: eliminated hitting Google's web servers (but we still make use of its public DNS servers).
2013-01-22 17:52:06 -08:00
agentzh (Yichun Zhang)
1a52a5819d
feature: setting ngx.header.HEADER after sending out the response headers now only produced an error message in the nginx error logs and does not throw out a Lua exception. this should be handy for Lua development. thanks Matthieu Tourne for suggesting this.
2013-01-11 15:34:35 -08:00
agentzh (Yichun Zhang)
e059eac045
bugfix: using a key with underscores in ngx.header.KEY resulted in Lua string storage corruption. thanks rkearsley for reporting this as github issue #199 .
2013-01-02 12:00:11 -08:00
agentzh (Yichun Zhang)
9fe21af577
use google.com instead of taobao.com in the test suite.
2012-09-10 00:59:14 -07:00
agentzh (章亦春)
f81ceeb406
feature: added new directive lua_transform_underscores_in_response_headers. thanks Kindy Lin.
2012-06-14 19:17:16 +08:00
agentzh (章亦春)
e841106d16
added a (passing) test for setting ngx.header.content_encoding that should bypass the ngx_gzip output filter.
2012-05-17 11:44:16 +08:00
agentzh (章亦春)
fc7893d05f
now we recycle the downstream output buffers to save memory and dynamic allocation times for long-running requests.
2012-02-15 21:43:12 +08:00
agentzh (章亦春)
51a6bdfad0
minor coding style fixes.
2012-02-07 12:59:23 +08:00
Brian Akins
cef7991100
add last-modified test
2012-02-06 22:56:08 -05:00
agentzh (章亦春)
9161a993be
bugfix: more_set_input_headers did not handle the Accept-Encoding request headers properly. thanks 天街夜色.
2011-12-16 22:30:04 +08:00
agentzh (章亦春)
efd374014f
bugfix: Cache-Control header modification might introduce empty value headers when using with the standard ngx_headers module.
2011-11-09 21:48:27 +08:00
agentzh (章亦春)
ae29491ddb
added one more passing test.
2011-11-09 20:27:10 +08:00
agentzh (章亦春)
2fbea05b93
initial cut on the ngx.req.set_body_file() API.
2011-10-20 22:37:26 +08:00
agentzh (章亦春)
1122cbd49d
fixed a test cause because Test::Nginx fixed a bug in its Content-Length handling.
2011-10-19 17:07:47 +08:00
agentzh (章亦春)
e5b8c8f46e
bugfix: calling ngx.exec() to jump to a named location did not clear the context object of ngx_lua properly and might cause evil problems. thanks Nginx User.
2011-10-13 11:08:57 +08:00
agentzh (章亦春)
bb2539bb5f
now we properly support setting the Cache-Control response header via the ngx.header.HEADER interface.
2011-09-30 11:47:09 -07:00
agentzh (章亦春)
ac24af7f0e
documented the way to output error pages with custom dynamic bodies in Lua. thanks rik1083.
2011-09-15 09:05:40 +08:00
agentzh (章亦春)
bdf56a9da9
* fixed a bug when setting a multi-value response header to a single
...
value (via writing to ngx.header.HEADER): the single value will be
repeated on each old value.
* added support for multi-values of reading ngx.header.HEADER.
* added more tests for reading non-existent response headers.
2011-09-12 22:50:04 +08:00
agentzh (章亦春)
b0c96e306d
simplified the ngx.header.HEADER reading logic. but multi-value headers are still not supported yet.
2011-09-12 10:56:46 +08:00
agentzh (章亦春)
577de863d2
implemented reading response headers: VALUE = ngx.header.KEY.
2011-09-11 23:56:24 +08:00
agentzh (章亦春)
dca8a24b7f
made setting ngx.header.HEADER after sending out response headers throw out a Lua exception to help debugging issues like github issue #49 . thanks Bill Donahue (ikhoyo).
2011-08-16 11:27:03 +08:00
agentzh (章亦春)
1ab26d0153
repeat each test case twice in t/016-resp-header.t.
2011-05-27 13:29:48 +08:00
agentzh (章亦春)
e4e299409d
fixed github issue #39 : setting differnt headers with common prefix might interfere with each other. thanks moodydeath.
2011-05-27 13:28:00 +08:00
agentzh (章亦春)
2e5d420240
fixed a bug in output header set; we should always set the header->hash to 1. thanks moodydeath for reporting it.
2011-05-19 17:55:45 +08:00
agentzh (章亦春)
23cad91f06
now we turn the ngx.req.header table into an ngx.req.get_headers() function; we also added ngx.req.set_header(name, value) and ngx.req.clear_header(name). thanks moodydeath.
2011-05-10 03:00:58 +08:00