Actions
Feature #2535
closedPlease support application/json-merge-patch together with PATCH
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.
Updated by darix about 11 years ago
why would lighttpd care about the content type?
do you have any specific error?
Updated by joergsch about 11 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>
Updated by joergsch about 11 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.
Updated by joergsch about 11 years ago
with an upgrade to 1.4.33-1 it is working now.
Actions
Also available in: Atom