Page MenuHomePhabricator

D19944.id.diff
No OneTemporary

D19944.id.diff

diff --git a/src/applications/conduit/controller/PhabricatorConduitAPIController.php b/src/applications/conduit/controller/PhabricatorConduitAPIController.php
--- a/src/applications/conduit/controller/PhabricatorConduitAPIController.php
+++ b/src/applications/conduit/controller/PhabricatorConduitAPIController.php
@@ -605,6 +605,15 @@
AphrontRequest $request,
$method) {
+ $content_type = $request->getHTTPHeader('Content-Type');
+
+ if ($content_type == 'application/json') {
+ throw new Exception(
+ pht('Use form-encoded data to submit parameters to Conduit endpoints. '.
+ 'Sending a JSON-encoded body and setting \'Content-Type\': '.
+ '\'application/json\' is not currently supported.'));
+ }
+
// Look for parameters from the Conduit API Console, which are encoded
// as HTTP POST parameters in an array, e.g.:
//

File Metadata

Mime Type
text/plain
Expires
Wed, Jan 22, 12:38 PM (4 h, 36 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7033118
Default Alt Text
D19944.id.diff (893 B)

Event Timeline