Project

General

Profile

Actions

Feature #2535

closed

Please support application/json-merge-patch together with PATCH

Added by joergsch over 10 years ago. Updated over 10 years ago.

Status:
Duplicate
Priority:
Normal
Category:
-
Target version:
-
ASK QUESTIONS IN Forums:

Description

owncloud makes use of the content type "application/json-merge-patch" together with the method PATCH.
This prevents using lighttpd as the web server for owncloud.


Related issues 1 (0 open1 closed)

Is duplicate of Bug #2346: Support for MKCALENDARFixed2011-09-21Actions
Actions #1

Updated by darix over 10 years ago

why would lighttpd care about the content type?

do you have any specific error?

Actions #2

Updated by joergsch over 10 years ago

When using apache2 as a webserver for owncloud, everything seems to work. All other packages have been kept on the server.

Example php file (json-test.php):

<?php
$data = $_POST["data"];
var_dump($data);
$data = json_decode($data);
var_dump($data);
?>

Tests with Apache:

POST

curl -k http://owncloud.fritz.box/json-test.php -X POST -d data=[{\"datumType\":\"message\"}]
string(25) "[{"datumType":"message"}]" 
array(1) {
  [0]=>
  object(stdClass)#1 (1) {
    ["datumType"]=>
    string(7) "message" 
  }
}

PATCH

curl -k http://owncloud.fritz.box/json-test.php -X PATCH -d data=[{\"datumType\":\"message\"}]
NULL
NULL

Tests with lighttpd:

POST

curl -k http://owncloud.fritz.box/json-test.php -X POST -d data=[{\"datumType\":\"message\"}]
string(25) "[{"datumType":"message"}]" 
array(1) {
  [0]=>
  object(stdClass)#1 (1) {
    ["datumType"]=>
    string(7) "message" 
  }
}

PATCH

curl -k http://owncloud.fritz.box/json-test.php -X PATCH -d data=[{\"datumType\":\"message\"}]
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
  <title>501 - Not Implemented</title>
 </head>
 <body>
  <h1>501 - Not Implemented</h1>
 </body>
</html>
Actions #3

Updated by darix over 10 years ago

what lighty version are you running?

Actions #4

Updated by joergsch over 10 years ago

darix wrote:

what lighty version are you running?

It is 1.4.31-4+deb7u2

I just figured out, that the error vanishes once I upgrade all packages from debian stable to debian testing/unstable.

Actions #5

Updated by stbuehler over 10 years ago

  • Status changed from New to Duplicate

Fixed in 1.4.33

Actions #6

Updated by joergsch over 10 years ago

with an upgrade to 1.4.33-1 it is working now.

Actions

Also available in: Atom