aboutsummaryrefslogtreecommitdiff
path: root/request_test.go
diff options
context:
space:
mode:
authorAdnan Maolood <[email protected]>2021-03-20 12:27:20 -0400
committerAdnan Maolood <[email protected]>2021-03-20 12:27:20 -0400
commit5141eaafaa991a5ab4221fa466e86a167d8910c7 (patch)
tree4b8939eed193b54d3c53369616385b77274621a9 /request_test.go
parentresponse: Treat empty meta as invalid (diff)
downloadgo-gemini-5141eaafaa991a5ab4221fa466e86a167d8910c7.tar.xz
go-gemini-5141eaafaa991a5ab4221fa466e86a167d8910c7.zip
Tweak request and response parsing
Diffstat (limited to 'request_test.go')
-rw-r--r--request_test.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/request_test.go b/request_test.go
index 90ca57a..3471930 100644
--- a/request_test.go
+++ b/request_test.go
@@ -2,7 +2,6 @@ package gemini
import (
"bufio"
- "io"
"net/url"
"strings"
"testing"
@@ -36,25 +35,25 @@ func TestReadRequest(t *testing.T) {
},
{
Raw: "\r\n",
- URL: &url.URL{},
+ Err: ErrInvalidRequest,
},
{
Raw: "gemini://example.com\n",
- Err: io.EOF,
+ Err: ErrInvalidRequest,
},
{
Raw: "gemini://example.com",
- Err: io.EOF,
+ Err: ErrInvalidRequest,
},
{
// 1030 bytes
Raw: maxURL + "xxxxxx",
- Err: io.EOF,
+ Err: ErrInvalidRequest,
},
{
// 1027 bytes
Raw: maxURL + "x" + "\r\n",
- Err: io.EOF,
+ Err: ErrInvalidRequest,
},
{
// 1024 bytes