Changeset 12694 for branches


Ignore:
Timestamp:
Dec 5, 2011, 10:09:24 AM (12 years ago)
Author:
plg
Message:

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).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.3/ws.php

    r12651 r12694  
    508508add_event_handler('ws_invoke_allowed', 'ws_isInvokeAllowed', EVENT_HANDLER_PRIORITY_NEUTRAL, 3);
    509509
    510 $requestFormat = null;
     510$requestFormat = 'rest';
    511511$responseFormat = null;
    512512
     
    514514{
    515515  $responseFormat = $_GET['format'];
    516 }
    517 
    518 if ( isset($HTTP_RAW_POST_DATA) )
    519 {
    520   $HTTP_RAW_POST_DATA = trim($HTTP_RAW_POST_DATA);
    521   if ( strncmp($HTTP_RAW_POST_DATA, '<?xml', 5) == 0 )
    522   {
    523   }
    524   else
    525   {
    526     $requestFormat = "json";
    527   }
    528 }
    529 else
    530 {
    531   $requestFormat = "rest";
    532516}
    533517
Note: See TracChangeset for help on using the changeset viewer.