Skip to content

Commit 12c2ef6

Browse files
author
rob1n
committed
Content-Type, not Content-type, as headers are case sensitive. Props foolswisdom and Nazgul. fixes WordPress#3545
git-svn-id: https://develop.svn.wordpress.org/trunk@5640 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 8998b56 commit 12c2ef6

15 files changed

Lines changed: 18 additions & 18 deletions

wp-admin/admin-header.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
2+
@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
33
if (!isset($_GET["page"])) require_once('admin.php');
44
if ( $editing ) {
55
wp_enqueue_script( array('dbx-admin-key?pagenow=' . attribute_escape($pagenow),'admin-custom-fields') );

wp-admin/export.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function export_wp() {
5151

5252
header('Content-Description: File Transfer');
5353
header("Content-Disposition: attachment; filename=$filename");
54-
header('Content-type: text/xml; charset=' . get_option('blog_charset'), true);
54+
header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
5555

5656
$where = '';
5757
if ( isset( $_GET['author'] ) && $_GET['author'] != 'all' ) {

wp-admin/index-extra.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
require_once('admin.php');
33
require_once (ABSPATH . WPINC . '/rss.php');
44

5-
@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
5+
@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
66

77
switch ( $_GET['jax'] ) {
88

wp-admin/upgrade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
$step = (int) $_GET['step'];
1212
else
1313
$step = 0;
14-
@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
14+
@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
1515
?>
1616
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1717
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>

wp-admin/upload.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
require_once('admin.php');
33

4-
@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
4+
@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
55

66
if (!current_user_can('upload_files'))
77
wp_die(__('You do not have permission to upload files.'));

wp-comments-post.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
if ($_SERVER["REQUEST_METHOD"] != "POST") {
33
header('Allow: POST');
44
header("HTTP/1.1 405 Method Not Allowed");
5-
header("Content-type: text/plain");
5+
header("Content-Type: text/plain");
66
exit;
77
}
88
require( dirname(__FILE__) . '/wp-config.php' );

wp-includes/classes.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ function send_headers() {
176176
status_header( 404 );
177177
if ( !is_user_logged_in() )
178178
nocache_headers();
179-
@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
179+
@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
180180
} else if ( empty($this->query_vars['feed']) ) {
181-
@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
181+
@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
182182
} else {
183183
// We're showing a feed, so WP is indeed the only thing that last changed
184184
if ( $this->query_vars['withcomments']
@@ -729,7 +729,7 @@ function add( $args = '' ) {
729729
}
730730

731731
function send() {
732-
header('Content-type: text/xml');
732+
header('Content-Type: text/xml');
733733
echo "<?xml version='1.0' standalone='yes'?><wp_ajax>";
734734
foreach ( $this->responses as $response )
735735
echo $response;

wp-includes/feed-atom.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
header('Content-type: application/atom+xml; charset=' . get_option('blog_charset'), true);
2+
header('Content-Type: application/atom+xml; charset=' . get_option('blog_charset'), true);
33
$more = 1;
44

55
?>

wp-includes/feed-rdf.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
header('Content-type: application/rdf+xml; charset=' . get_option('blog_charset'), true);
2+
header('Content-Type: application/rdf+xml; charset=' . get_option('blog_charset'), true);
33
$more = 1;
44

55
?>

wp-includes/feed-rss.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
header('Content-type: text/xml; charset=' . get_option('blog_charset'), true);
2+
header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
33
$more = 1;
44

55
?>

0 commit comments

Comments
 (0)