From 6e6410e2488b6aa4cc503c96e8b1bbb2e1c71732 Mon Sep 17 00:00:00 2001 From: plegall Date: Mon, 5 Dec 2011 09:09:24 +0000 Subject: [PATCH] bug 2529 fixed: Piwigo API can only handle the "rest" requestFormat. If we try to search for another request format the only result is an "Unknown request format" error for the client. This error happens when always_populate_raw_post_data is On (which is not the default Apache setting). git-svn-id: http://piwigo.org/svn/branches/2.3@12694 68402e56-0260-453c-a942-63ccdbb3a9ee --- ws.php | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/ws.php b/ws.php index d963a592f..81af4bb04 100644 --- a/ws.php +++ b/ws.php @@ -507,7 +507,7 @@ add_event_handler('ws_add_methods', 'ws_addDefaultMethods'); add_event_handler('ws_invoke_allowed', 'ws_isInvokeAllowed', EVENT_HANDLER_PRIORITY_NEUTRAL, 3); -$requestFormat = null; +$requestFormat = 'rest'; $responseFormat = null; if ( isset($_GET['format']) ) @@ -515,22 +515,6 @@ if ( isset($_GET['format']) ) $responseFormat = $_GET['format']; } -if ( isset($HTTP_RAW_POST_DATA) ) -{ - $HTTP_RAW_POST_DATA = trim($HTTP_RAW_POST_DATA); - if ( strncmp($HTTP_RAW_POST_DATA, '