On Fri, 15 Nov 2013 13:38:28 GMT, Alexey Kulentsov wrote:

On Thu, 14 Nov 2013 23:06:59 +0100, Sönke Ludwig wrote:

This should be fixed on git HEAD and on the latest 0.7.18-beta.1. Try to
see if a "dub upgrade" makes it go away.

First I did this, vibe was upgraded but nothing changes. Then I make some experiments. Error was only with request from browser, I make utility to request server and here was no this error. Difference was in headers - utility didn't get Accept-Encoding: gzip, deflate so server didn't try to compress output stream. Then I download sources from git, check it and here was no any problems. So I start to exploring difference between source and dub-managed versions. At this moment here come one more upgrade for libevent, openssl and libev packets and this bug was fixed. Thanks to authors!

But now I have one more question. When I tried to disable output stream compressing I didn't found any way to control output stream format. I expected to see something like PHP's zlib.output_compression flag in HTTPServerSettings or HTTPServerOption, but nothing is here. Is here any way to manage this?

Currently there is no setting to disable it, but you can do if ("Content-Encoding" in res.headers) res.headers.remove("Content-Encoding"); on the response object to disable compression. If you are using a URLRouter, you can use it to disable compression for all requests:

void disableCompression(HTTPServerRequest req, HTTPServerResponse res) {
	if ("Content-Encoding" in res.headers) res.headers.remove("Content-Encoding");
}

auto router = new URLRouter;
router.any("*", &disableCompression);
// ... register all normal roues