documented that keys in ngx.header.HEADER will be matched case-insentively.
This commit is contained in:
Родитель
7af330114b
Коммит
435a0a3a5b
|
@ -282,12 +282,14 @@ before sending out the response headers.
|
|||
ngx.status = ngx.HTTP_CREATED
|
||||
status = ngx.status
|
||||
|
||||
ngx.header[HEADER_NAME]
|
||||
ngx.header[HEADER]
|
||||
-----------------------
|
||||
|
||||
Set/add/clear response headers. Underscores (_) in the header names will be replaced by dashes (-).
|
||||
Set/add/clear response headers. Underscores (_) in the header names will be replaced by dashes (-) and the header names will be matched case-insentively.
|
||||
|
||||
# equivalent to ngx.header["Content-Type"] = 'text/plain'
|
||||
ngx.header.content_type = 'text/plain';
|
||||
|
||||
ngx.header["X-My-Header"] = 'blah blah';
|
||||
|
||||
Multi-value headers can be set this way:
|
||||
|
|
|
@ -88,6 +88,7 @@ I dunno why this test is not passing. TODO'ing...
|
|||
#set $memc_value hello;
|
||||
|
||||
memc_pass 127.0.0.1:$TEST_NGINX_MEMCACHED_PORT;
|
||||
#echo $memc_value;
|
||||
}
|
||||
location = /echo {
|
||||
echo_location '/memc?c=get&k=foo';
|
||||
|
@ -96,7 +97,7 @@ I dunno why this test is not passing. TODO'ing...
|
|||
}
|
||||
location = /main {
|
||||
content_by_lua '
|
||||
res = ngx.location.capture("/memc?c=get&k=foo")
|
||||
res = ngx.location.capture("/memc?c=get&k=foo&v=")
|
||||
ngx.say("1: ", res.body)
|
||||
|
||||
res = ngx.location.capture("/memc?c=set&k=foo&v=bar");
|
||||
|
@ -109,5 +110,5 @@ I dunno why this test is not passing. TODO'ing...
|
|||
--- request
|
||||
GET /main
|
||||
--- response_body_like: 3: bar$
|
||||
--- SKIP
|
||||
--- ONLY
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче