Tweak request and response parsing

This commit is contained in:
Adnan Maolood
2021-03-20 12:27:20 -04:00
parent e5c0afa013
commit 5141eaafaa
5 changed files with 48 additions and 44 deletions

View File

@@ -65,15 +65,15 @@ func TestReadWriteResponse(t *testing.T) {
},
{
Raw: "",
Err: io.EOF,
Err: ErrInvalidResponse,
},
{
Raw: "10 Search query",
Err: io.EOF,
Err: ErrInvalidResponse,
},
{
Raw: "20 text/gemini\nHello, world!",
Err: io.EOF,
Err: ErrInvalidResponse,
},
{
Raw: "20 text/gemini\rHello, world!",
@@ -81,7 +81,7 @@ func TestReadWriteResponse(t *testing.T) {
},
{
Raw: "20 text/gemini\r",
Err: io.EOF,
Err: ErrInvalidResponse,
},
{
Raw: "abcdefghijklmnopqrstuvwxyz",