[RequestMissingCR] A request without a <CR> should timeout
Request URL
'gemini://localhost/\n'
Response header
'20 text/gemini; lang=en\r\n'
No response should be received
x '20'
Timeout, no return message, closing the connection or 59
[URLAboveMaxSize] Send a 1025 byte URL, above the maximum allowed size
Request URL
'gemini://localhost/0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\r\n'
Response header
'51 Not found\r\n'
Connection should either drop, or return 59 (BAD REQUEST)
x Received status of '51'
59
[URLInvalidUTF8Byte] Send a URL containing a non-UTF8 byte sequence
Request URL
'gemini://localhost/\udcdc\r\n'
Connection should either drop, or return 59 (BAD REQUEST)
✓ Connection closed without response
59
[URLWrongPort] A URL with an incorrect port number should be rejected
Request URL
'gemini://localhost:443/\r\n'
Response header
'20 text/gemini; lang=en\r\n'
Status should return a failure code (53 PROXY REQUEST REFUSED)
x Received status of '20'
Low priority 53
[URLSchemeHTTPS] Send a URL with an HTTPS scheme
Request URL
'https://localhost/\r\n'
Response header
'59 Unknown scheme: https\r\n'
Status should return a failure code (53 PROXY REQUEST REFUSED)
x Received status of '59'
53
[URLWrongHost] A URL with a foreign hostname should be rejected
Request URL
'gemini://wikipedia.org/\r\n'
Response header
'20 text/gemini; lang=en\r\n'
Status should return a failure code (53 PROXY REQUEST REFUSED)
x Received status of '20'
Low priority, depending on the setting it should be accepted
[URLSchemeHTTP] Send a URL with an HTTP scheme
Request URL
'http://localhost/\r\n'
Response header
'59 Unknown scheme: http\r\n'
Status should return a failure code (53 PROXY REQUEST REFUSED)
x Received status of '59'
[URLInvalid] Random text should not be accepted by the server
Request URL
'Hello Gemini!\r\n'
x The read operation timed out
Timeout, no return message, closing the connection or 59
59
59
Low priority 53
53
Low priority, depending on the setting it should be accepted
Closing the connection or 59
A few edges cases detected by https://github.com/michael-lazar/gemini-diagnostics