LeonardoRM / owncloud-roundcube

OwnCloud app to integrate RoundCube Webmail
GNU Affero General Public License v3.0
6 stars 14 forks source link

no longer sets Content-Length header in BackLogin #12

Open Plaristote opened 3 years ago

Plaristote commented 3 years ago

My attempts at opening the Roundcube application ended up as request timeouts. After looking up the issue, I stumbled upon this:

https://stackoverflow.com/questions/24779634/php-curl-timeout-in-redirections

I think we can assume that, for whatever reasons, strlen($postData) wasn't returning the proper value for Content-Length, resulting in Roundcube never responding to a request that didn't consist of as many bytes as expected.

The solution to this is actually pretty simple: if unspecified, php-curl will set the Content-Length header on its own. It's probably best not to interfere, and that's exactly the intent of this PR.

LeonardoRM commented 3 years ago

Thanks for checking this. Could you do a test and print the value strlen($postData) and compare it to the content length generated by curl (in the request)? Don't pass the content length to CURLOPT_HTTPHEADER (as in the PR), just print the value.