Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow building with HTTP compression support without WebSockets #875

Closed

Conversation

kobykahane
Copy link

Currently, even if CPPREST_EXCLUDE_COMPRESSION is not set, HTTP compression support is disabled when WebSockets is disabled, even though it appears to only depend on zlib.

This PR allows building the library with HTTP compression without a dependency on OpenSSL and Boost.

@@ -75,6 +75,7 @@ if(CPPREST_EXCLUDE_COMPRESSION)
else()
cpprest_find_zlib()
target_link_libraries(cpprest PRIVATE cpprestsdk_zlib_internal)
target_compile_definitions(cpprest PRIVATE -DCPPREST_HTTP_COMPRESSION=1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The macro CPPRESET_HTTP_COMPRESSION is an internal macro to http_helpers.cpp, and we shouldn't be messing with it from the build scripts like this.

The comment there indicates that the macro 'CPPREST_EXCLUDE_WEBSOCKETS is a flag that now essentially means "no external dependencies"', and zlib would be such an external dependency.

Perhaps the right thing is to change the bits in http_helpers.cpp to avoid checking CPPREST_EXCLUDE_WEBSOCKETS.

@kobykahane
Copy link
Author

Obsoleted by PR #866.

@kobykahane kobykahane closed this Dec 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants