agentzh/headers-more-nginx-module — Issue #5: more_set_headers Cache-Control extra semicolon
Author: maage
Created: 2011-11-08 10:25:04+00:00
State: open

Simple test case:

```
=== TEST 9: dangling semicolon
--- http_config
log_format test
'"$request" CC:"$sent_http_cache_control" CT:"$sent_http_content_type"'
;
--- config
access_log logs/test_log test;

location /read {
add_header Cache-Control 'no-store';
add_header Cache-Control 'no-cache';
more_clear_headers 'Cache-Control';
echo Hi;
}
--- request
GET /read
--- response_headers
!Cache-Control:
--- response_body
Hi
```

Output:
```
# Failed test 'TEST 9: dangling semicolon - header Cache-Control ok'
# at /usr/local/share/perl5/Test/Nginx/Socket.pm line 605.
# got: ', no-store, no-cache'
# expected: 'no-store'

# Failed test 'TEST 9: dangling semicolon - header Cache-Control ok'
# at /usr/local/share/perl5/Test/Nginx/Socket.pm line 605.
# got: ', no-store, no-cache'
# expected: 'no-store'
```

At log:

```
"GET /read HTTP/1.1" CC:"; no-store; no-cache" CT:"text/plain"
```

Visible also from lua-module:

https://github.com/chaoslawful/lua-nginx-module/issues/65

It is not enough to set hash=0 and value.en=0.