tonic icon indicating copy to clipboard operation
tonic copied to clipboard

Bug: Tonic Response class sets two content-type headers

Open logistiker opened this issue 9 years ago • 4 comments

Tonic Response defaults to content-type = 'text/html' but $response->contentType = $mimetype; in Tonic Resource declares a new Content-Type header as well instead of overriding the response content-type, you end up with two content-type headers (different case).

logistiker avatar Aug 28 '15 04:08 logistiker

The fix is just to change the Tonic Response class:

$headers = array('Content-Type' => 'text/html');

logistiker avatar Aug 28 '15 04:08 logistiker

Great, thanks for finding this. Can you create a pull request?

peej avatar Aug 28 '15 08:08 peej

Yes I'll create one

logistiker avatar Aug 28 '15 14:08 logistiker

https://github.com/peej/tonic/pull/196

logistiker avatar Aug 28 '15 18:08 logistiker