Bug Report #3947

Headers corrupt when Header_Value is array

Added by Korney Czukowski over 3 years ago. Updated almost 3 years ago.

Status:ClosedStart date:04/27/2011
Priority:NormalDue 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

Revision 94484c02
Added by Sam de Freyssinet about 3 years ago

Fixes #3947, Headers now render correctly when value is an Array

History

#1 Updated by Jeremy Bush about 3 years ago

  • Target version changed from v3.1.3 to v3.1.4

#2 Updated by Sam de Freyssinet about 3 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Applied in changeset commit:94484c0298f02804de5f256cc597b8169038aeeb.

#3 Updated by Jeremy Bush almost 3 years ago

  • Resolution set to fixed

Also available in: Atom PDF