{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/proxygen/issues/89","repository_url":"https://api.github.com/repos/facebook/proxygen","labels_url":"https://api.github.com/repos/facebook/proxygen/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/facebook/proxygen/issues/89/comments","events_url":"https://api.github.com/repos/facebook/proxygen/issues/89/events","html_url":"https://github.com/facebook/proxygen/issues/89","id":149677235,"number":89,"title":"ZlibStreamCompressor is not supporting -1 compression level","user":{"login":"floatdrop","id":365089,"avatar_url":"https://avatars.githubusercontent.com/u/365089?v=3","gravatar_id":"","url":"https://api.github.com/users/floatdrop","html_url":"https://github.com/floatdrop","followers_url":"https://api.github.com/users/floatdrop/followers","following_url":"https://api.github.com/users/floatdrop/following{/other_user}","gists_url":"https://api.github.com/users/floatdrop/gists{/gist_id}","starred_url":"https://api.github.com/users/floatdrop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floatdrop/subscriptions","organizations_url":"https://api.github.com/users/floatdrop/orgs","repos_url":"https://api.github.com/users/floatdrop/repos","events_url":"https://api.github.com/users/floatdrop/events{/privacy}","received_events_url":"https://api.github.com/users/floatdrop/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-20T06:57:47Z","updated_at":"2016-04-21T04:45:31Z","closed_at":null,"body":"When building DEBUG version of proxygen echo example and opening page with browser I get an exception:\r\n\r\n```\r\nF0420 11:45:21.513430 11128 ZlibStreamCompressor.cpp:54] Check failed: level_ >= 0 && level_ <= 9 Invalid Zlib compression level. level=-1\r\n```\r\n\r\nIt comes from [this line](https://github.com/facebook/proxygen/blob/739166b5fedee51d6f4d4cf0c7e54280d083b84a/proxygen/lib/utils/ZlibStreamCompressor.cpp#L54), because default value in [HTTPServerOptions.h](https://github.com/facebook/proxygen/blob/739166b5fedee51d6f4d4cf0c7e54280d083b84a/proxygen/httpserver/HTTPServerOptions.h#L102-L106) is `-1`.\r\n\r\nThis is easy to fix just by setting option to right value, but description says, that `-1` is valid value:\r\n\r\n> Zlib compression level, valid values are -1(Default) to 9(Slower).\r\n\r\nShould this check be fixed or default value set to `0`?"},"comment":{"url":"https://api.github.com/repos/facebook/proxygen/issues/comments/212742161","html_url":"https://github.com/facebook/proxygen/issues/89#issuecomment-212742161","issue_url":"https://api.github.com/repos/facebook/proxygen/issues/89","id":212742161,"user":{"login":"floatdrop","id":365089,"avatar_url":"https://avatars.githubusercontent.com/u/365089?v=3","gravatar_id":"","url":"https://api.github.com/users/floatdrop","html_url":"https://github.com/floatdrop","followers_url":"https://api.github.com/users/floatdrop/followers","following_url":"https://api.github.com/users/floatdrop/following{/other_user}","gists_url":"https://api.github.com/users/floatdrop/gists{/gist_id}","starred_url":"https://api.github.com/users/floatdrop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floatdrop/subscriptions","organizations_url":"https://api.github.com/users/floatdrop/orgs","repos_url":"https://api.github.com/users/floatdrop/repos","events_url":"https://api.github.com/users/floatdrop/events{/privacy}","received_events_url":"https://api.github.com/users/floatdrop/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T04:45:31Z","updated_at":"2016-04-21T04:45:31Z","body":"@lnicco yes, [`DCHECK`](https://github.com/facebook/proxygen/blob/739166b5fedee51d6f4d4cf0c7e54280d083b84a/proxygen/lib/utils/ZlibStreamCompressor.cpp#L54) is only working, when [`NDEBUG`](https://github.com/google/glog/blob/4d391fe692ae6b9e0105f473945c415a3ce5a401/src/glog/logging.h.in#L979) is not defined, which is true for Debug build mode, but not for Release.\r\n\r\nExact command to build:\r\n\r\n```\r\n/usr/bin/g++ -std=c++1y -o CMakeFiles/echo_example.dir/main.cpp.o -c main.cpp\r\n```\r\n\r\nIf you add `-DNDEBUG` flag, `DCHECK` will be disabled."}}