Skip to content

Commit

Permalink
check for parsed HTTP params in body before using XML/JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
clayhinson committed May 27, 2011
1 parent 78ed244 commit 23ecbdb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/frapi/library/Frapi/Controller/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public function processError(Frapi_Exception $e)
public static function processInternalError(Frapi_Exception $e)
{
try {
$controller = new Frapi_Controller_API();
$controller = new Frapi_Controller_Api();
} catch (Exception $e) {
// This is a hack to intercept anything that may
// have happened before the internal error collection
Expand Down
2 changes: 1 addition & 1 deletion src/frapi/library/Frapi/Controller/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ public function getParams()
$xmlJsonMatch = preg_grep('/\<|\{/i', array_keys($puts));
$inputFormat = $this->getFormat();
}
if (!empty($inputFormat) || !empty($xmlJsonMatch)) {
if (empty($puts) && !empty($inputFormat) || !empty($xmlJsonMatch)) {
/* attempt to parse the input */
$requestBody = Frapi_Input_RequestBodyParser::parse(
$inputFormat,
Expand Down

0 comments on commit 23ecbdb

Please sign in to comment.