Skip to content

Commit

Permalink
Removes query string from request uri when searching for format of re…
Browse files Browse the repository at this point in the history
…sults
  • Loading branch information
Michał Mleczko committed Jan 29, 2016
1 parent 4833575 commit 6b999fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/Jacwright/RestServer/RestServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ public function getFormat()
}

// Check for trailing dot-format syntax like /controller/action.format -> action.json
if(preg_match('/\.(\w+)$/i', $_SERVER['REQUEST_URI'], $matches)) {
if(preg_match('/\.(\w+)$/i', strtok($_SERVER["REQUEST_URI"],'?'), $matches)) {
$override = $matches[1];
}

Expand Down

0 comments on commit 6b999fe

Please sign in to comment.