-
Notifications
You must be signed in to change notification settings - Fork 79
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
Add content compression support to StyxServer object #595
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see some of these tests might be equivalent to the ones in CompressionSpec. Do you think we need both?
Probably worth leaving in a couple of basic tests to ensure that the new configuration has the desired effect here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me. Would you like to introfduce some of the improvements you will have for sure made to the tests into CompressionSpec?
@@ -79,6 +80,7 @@ private data class StyxHttpServerTlsSettings( | |||
private data class StyxHttpServerConfiguration( | |||
val port: Int, | |||
val handler: String, | |||
val compressResponses: Boolean, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this defaults to false
?
.body("Hello, test!", UTF_8) | ||
.build() | ||
|
||
private val compressedResponse = HttpResponse.response(OK) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Static import response
.
At the moment, yes. Because there are two separate ways to start servers. But we will, sooner or later (hope sooner), to eliminate the old way. |
See issue #593