Bug Report #3947
Headers corrupt when Header_Value is array
| Status: | Closed | Start date: | 04/27/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 100% |
|
| Category: | Core | |||
| Target version: | v3.1.4 | |||
| Resolution: | fixed | Points: |
Description
The following usage parses header values, which may become and array of HTTP_Header_Value.
$this->response->headers(array(
'Cache-Control' => 'no-cache,no-store,max-age=0,must-revalidate',
'Pragma' => 'no-cache',
));
However, Response::send_headers() doesn't check for array values and just outputs string 'Array' in such cases.
If I set headers individually, they "work as expected", but I guess that's because they don't get parsed:
$this->response->headers('Cache-Control', 'no-cache,no-store,max-age=0,must-revalidate');
$this->response->headers('Pragma', 'no-cache');
That actually might be another bug.
Associated revisions
Fixes #3947, Headers now render correctly when value is an Array
History
Updated by Jeremy Bush about 2 years ago
- Target version changed from v3.1.3 to v3.1.4
Updated by Sam de Freyssinet almost 2 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset commit:94484c0298f02804de5f256cc597b8169038aeeb.
Updated by Jeremy Bush almost 2 years ago
- Resolution set to fixed