Change Accept header a bit

Per post-merge commit on I77af4b58 by Subbu

Bug: T128233
Change-Id: I30c4c1ad5b68e5b8a006d7a6c7bcbaac7e2eb164
This commit is contained in:
Alex Monk 2016-03-02 15:37:00 +00:00
parent 078886b5a4
commit 4ed6fd4010
2 changed files with 3 additions and 3 deletions

View file

@ -96,7 +96,7 @@ class ApiVisualEditor extends ApiBase {
$request['body'] = $params; $request['body'] = $params;
} }
// Should be synchronised with modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js // Should be synchronised with modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js
$reqheaders['Accept'] = 'text/html;profile=mediawiki.org/specs/html/1.2.0'; $reqheaders['Accept'] = 'text/html; charset=utf-8; profile="mediawiki.org/specs/html/1.2.0"';
$request['headers'] = $reqheaders; $request['headers'] = $reqheaders;
$response = $this->serviceClient->run( $request ); $response = $this->serviceClient->run( $request );
if ( $response['code'] === 200 && $response['error'] === "" ) { if ( $response['code'] === 200 && $response['error'] === "" ) {

View file

@ -151,7 +151,7 @@
stash: 'true' stash: 'true'
}, },
// Should be synchronised with ApiVisualEditor.php // Should be synchronised with ApiVisualEditor.php
headers: { Accept: 'text/html;profile=mediawiki.org/specs/html/1.2.0' }, headers: { Accept: 'text/html; charset=utf-8; profile="mediawiki.org/specs/html/1.2.0"' },
dataType: 'text' dataType: 'text'
} ); } );
} else { } else {
@ -165,7 +165,7 @@
( oldid === undefined ? '' : '/' + oldid ), ( oldid === undefined ? '' : '/' + oldid ),
type: 'GET', type: 'GET',
// Should be synchronised with ApiVisualEditor.php // Should be synchronised with ApiVisualEditor.php
headers: { Accept: 'text/html;profile=mediawiki.org/specs/html/1.2.0' }, headers: { Accept: 'text/html; charset=utf-8; profile="mediawiki.org/specs/html/1.2.0"' },
dataType: 'text' dataType: 'text'
} ); } );
} }