Skip to content

Commit

Permalink
Update ConformanceSpec.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
Saturn225 authored Oct 1, 2024
1 parent 9b6da22 commit f60e651
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions zio-http/jvm/src/test/scala/zio/http/ConformanceSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ object ConformanceSpec extends ZIOSpecDefault {
* Stock, presented at the 19th ACM Asia Conference on Computer and
* Communications Security (ASIA CCS) 2024.
*
* Paper URL: https://doi.org/10.1145/3634737.3637678
* Paper URL: https://doi.org/10.1145/3634737.3637678
* GitHub Project: https://github.com/cispa/http-conformance
*
*/
Expand Down Expand Up @@ -919,21 +919,6 @@ object ConformanceSpec extends ZIOSpecDefault {
},
),
suite("HTTP")(
test("should return 400 Bad Request if header contains CR, LF, or NULL(reject_fields_contaning_cr_lf_nul)") {
val route = Method.GET / "test" -> Handler.ok
val app = Routes(route)

val requestWithCRLFHeader = Request.get("/test").addHeader("InvalidHeader", "Value\r\n")
val requestWithNullHeader = Request.get("/test").addHeader("InvalidHeader", "Value\u0000")

for {
responseCRLF <- app.runZIO(requestWithCRLFHeader)
responseNull <- app.runZIO(requestWithNullHeader)
} yield {
assertTrue(responseCRLF.status == Status.BadRequest) &&
assertTrue(responseNull.status == Status.BadRequest)
}
},
test("should send Upgrade header with 426 Upgrade Required response(send_upgrade_426)") {
val app = Routes(
Method.GET / "test" -> Handler.fromResponse(
Expand Down

0 comments on commit f60e651

Please sign in to comment.