Skip to content

Commit

Permalink
do not force gzip by default as it is kinda slow and not necessary on…
Browse files Browse the repository at this point in the history
… small test payload
  • Loading branch information
agourlay committed Dec 9, 2023
1 parent 0e73e37 commit 5c4dd1d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ case class Config(
traceRequests: Boolean = false,
warnOnDuplicateHeaders: Boolean = false,
failOnDuplicateHeaders: Boolean = false,
addAcceptGzipByDefault: Boolean = true,
addAcceptGzipByDefault: Boolean = false, // kinda slow
disableCertificateVerification: Boolean = false,
followRedirect: Boolean = false,
enableHttp2: Boolean = false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,34 +262,6 @@ class SuperHeroesScenario extends CornichonFeature {
Then assert status.isClientError
}

Scenario("demonstrate Gzip support") {

RepeatWith("application/json", "gzip", "deflate")("encoding") {

When I get("/superheroes/Batman").withParams("sessionId" -> "<session-id>").withHeaders(
"Accept-Encoding" -> "<encoding>"
)

Then assert status.is(200)

And assert body.is(
"""
{
"name": "Batman",
"realName": "Bruce Wayne",
"city": "Gotham city",
"hasSuperpowers": false,
"publisher":{
"name":"DC",
"foundationYear":1934,
"location":"Burbank, California"
}
}
"""
)
}
}

Scenario("demonstrate collection features") {

When I get("/superheroes").withParams("sessionId" -> "<session-id>")
Expand Down

0 comments on commit 5c4dd1d

Please sign in to comment.