|
@@ 196-200 (lines=5) @@
|
| 193 |
|
$encoding = Config::inst()->get('SilverStripe\Control\ContentNegotiator', 'encoding'); |
| 194 |
|
|
| 195 |
|
$contentType = Config::inst()->get('SilverStripe\Control\ContentNegotiator', 'content_type'); |
| 196 |
|
if (empty($contentType)) { |
| 197 |
|
$response->addHeader("Content-Type", "application/xhtml+xml; charset=" . $encoding); |
| 198 |
|
} else { |
| 199 |
|
$response->addHeader("Content-Type", $contentType . "; charset=" . $encoding); |
| 200 |
|
} |
| 201 |
|
$response->addHeader("Vary" , "Accept"); |
| 202 |
|
|
| 203 |
|
// Fix base tag |
|
@@ 232-236 (lines=5) @@
|
| 229 |
|
public function html(HTTPResponse $response) { |
| 230 |
|
$encoding = Config::inst()->get('SilverStripe\Control\ContentNegotiator', 'encoding'); |
| 231 |
|
$contentType = Config::inst()->get('SilverStripe\Control\ContentNegotiator', 'content_type'); |
| 232 |
|
if (empty($contentType)) { |
| 233 |
|
$response->addHeader("Content-Type", "text/html; charset=" . $encoding); |
| 234 |
|
} else { |
| 235 |
|
$response->addHeader("Content-Type", $contentType . "; charset=" . $encoding); |
| 236 |
|
} |
| 237 |
|
$response->addHeader("Vary", "Accept"); |
| 238 |
|
|
| 239 |
|
$content = $response->getBody(); |