Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Commit

Permalink
Omitting charset information from the Content-Type header.
Browse files Browse the repository at this point in the history
  • Loading branch information
hugowetterberg committed Feb 15, 2010
1 parent e4b0464 commit 770c8fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jsonrpc_server.module
Expand Up @@ -19,7 +19,10 @@ function jsonrpc_server_server() {
$method = $_SERVER['REQUEST_METHOD'];
switch ($method) {
case 'POST':
switch($_SERVER['CONTENT_TYPE']) {
// Omit charset parameter
list($content_type) = explode(';', $_SERVER['CONTENT_TYPE'], 2);

switch($content_type) {
// Handling of a standard JSON-RPC call
case 'application/json':
// We'll use the inputstream module if it's installed because
Expand Down

0 comments on commit 770c8fe

Please sign in to comment.