]> source.dussan.org Git - nextcloud-server.git/commit
Don't try to parse empty body if there is no body 4147/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Wed, 29 Mar 2017 13:09:45 +0000 (15:09 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Tue, 4 Apr 2017 06:22:33 +0000 (08:22 +0200)
commit2a9192334eb6de56b55d5d9c1faab51ca2de2f9e
treef863432996152ab86993e1d5523ab836db0df3ca
parent51bcb0bbe196a82f17ccd67022dcef3a4b7573c1
Don't try to parse empty body if there is no body

Fixes #3890

If we do a put request without a body the current code still tries to
read the body. This patch makes sure that we do not try to read the body
if the content length is 0.

See RFC 2616 Section 4.3

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
lib/private/AppFramework/Http/Request.php
tests/lib/AppFramework/Http/RequestTest.php