f00b4r / nusoap

:smirk: Fixed NuSOAP for PHP 5.6 - 8.2
https://f00b4r.github.io/nusoap/
318 stars 355 forks source link

Issue on Windows servers with Content-Length #16

Open Illsteward opened 6 years ago

Illsteward commented 6 years ago

Hi,

for some reasons, Windows servers have always had trouble with using Content-Length and zipping content within NuSoap. No matter the settings in Apache, the content comes messed. A quick workaround is to comment out lines 4345 to 4377, starting with comment "//begin code to compress payload - by John" and ending with $this->outgoing_headers[] = "Content-Length: " . strlen($payload); Confirmed on Windows server 2012 R2 with multiple NuSoap versions, yours included. Adding mode_deflate to Apache did not help, neither did setting PHP global compression to deflate or none. Can you please look into it?

Illsteward commented 6 years ago

Proposed solution - add OS detection to line 4345, so that the compression is off for Windows.

f3l1x commented 6 years ago

Could you please send a PR? I agree with your solution.

Illsteward commented 6 years ago

Created.