jenkins-bot has submitted this change and it was merged.

Change subject: Follow-up I18162f04: Set contentType: 'multipart/form-data' on 
some requests again
......................................................................


Follow-up I18162f04: Set contentType: 'multipart/form-data' on some requests 
again

But not all

Change-Id: If9d88bb8d6c532992e8118e504f2fae45c0ca96a
---
M modules/ve-mw/init/ve.init.mw.Target.js
1 file changed, 11 insertions(+), 8 deletions(-)

Approvals:
  Esanders: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ve-mw/init/ve.init.mw.Target.js 
b/modules/ve-mw/init/ve.init.mw.Target.js
index c96cea9..0516b1a 100644
--- a/modules/ve-mw/init/ve.init.mw.Target.js
+++ b/modules/ve-mw/init/ve.init.mw.Target.js
@@ -1052,13 +1052,16 @@
 
        html = EasyDeflate.deflate( this.getHtml( doc ) );
 
-       xhr = new mw.Api().post( {
-               action: 'visualeditor',
-               paction: 'serializeforcache',
-               html: html,
-               page: this.pageName,
-               oldid: this.revid
-       } )
+       xhr = new mw.Api().post(
+               {
+                       action: 'visualeditor',
+                       paction: 'serializeforcache',
+                       html: html,
+                       page: this.pageName,
+                       oldid: this.revid
+               },
+               { contentType: 'multipart/form-data' }
+       )
                .done( function ( response ) {
                        var trackData = { duration: ve.now() - start };
                        if ( response.visualeditor && typeof 
response.visualeditor.cachekey === 'string' ) {
@@ -1140,7 +1143,7 @@
                        // If using the cache key fails, we'll come back here 
with cachekey still set
                        delete data.cachekey;
                }
-               return new mw.Api().post( data )
+               return new mw.Api().post( data, { contentType: 
'multipart/form-data' } )
                        .then(
                                function ( response, jqxhr ) {
                                        var eventData = {

-- 
To view, visit https://gerrit.wikimedia.org/r/193024
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If9d88bb8d6c532992e8118e504f2fae45c0ca96a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <kren...@gmail.com>
Gerrit-Reviewer: Esanders <esand...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to