Skip to content

Commit

Permalink
added tests for zero content length for CONNECT and testing for no bo…
Browse files Browse the repository at this point in the history
…dy returned (upstream does this illegally, but J8a kills it).

CONNECT, HEAD and OPTIONS have no content length.

PATCH does
  • Loading branch information
simonmittag committed Mar 24, 2023
1 parent ce108a8 commit 042bb75
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions integration/content/contentlength_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ import (
"testing"
)

func TestCONNECTContentLengthResponses(t *testing.T) {
MethodHasZeroContentLengthAndNoBody(t, "CONNECT", "http://localhost:8080/mse6/connect", "Identity")
}

func TestGETContentLengthResponses(t *testing.T) {
MethodHasContentLengthAndBody(t, "GET", "http://localhost:8080/about", "Identity")
MethodHasContentLengthAndBody(t, "GET", "http://localhost:8080/about", "identity")
Expand Down
5 changes: 5 additions & 0 deletions integration/method/method_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ func TestHttpMethods(t *testing.T) {
url string
responseCode int
}{
{
method: "CONNECT",
url: "/mse6/connect",
responseCode: 200,
},
{
method: "GET",
url: "/mse6/get",
Expand Down

0 comments on commit 042bb75

Please sign in to comment.