Skip to content

Commit

Permalink
(test) turn ZN-explanatory note into EN
Browse files Browse the repository at this point in the history
  • Loading branch information
ViolaPioggia authored and welkeyever committed Jul 26, 2023
1 parent b0dde85 commit 01a4179
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/protocol/http1/req/header_test.go
Expand Up @@ -492,28 +492,28 @@ func TestParse(t *testing.T) {
expected int
wantErr bool
}{
// 正常情况测试
// normal test
{
name: "normal",
input: []byte("GET /path/to/resource HTTP/1.1\r\nHost: example.com\r\n\r\n"),
expected: len([]byte("GET /path/to/resource HTTP/1.1\r\nHost: example.com\r\n\r\n")),
wantErr: false,
},
// parseFirstLine 出错
// parseFirstLine error
{
name: "parseFirstLine error",
input: []byte("INVALID_LINE\r\nHost: example.com\r\n\r\n"),
expected: 0,
wantErr: true,
},
// ext.ReadRawHeaders 出错
// ext.ReadRawHeaders error
{
name: "ext.ReadRawHeaders error",
input: []byte("GET /path/to/resource HTTP/1.1\r\nINVALID_HEADER\r\n\r\n"),
expected: 0,
wantErr: true,
},
// parseHeaders 出错
// parseHeaders error
{
name: "parseHeaders error",
input: []byte("GET /path/to/resource HTTP/1.1\r\nHost: example.com\r\nINVALID_HEADER\r\n"),
Expand Down

0 comments on commit 01a4179

Please sign in to comment.