[ "OK\n\n" ] [ "http://localhost/" add-addr http-get nip ] unit-test
[ ] [ stop-test-httpd ] unit-test
+
+! Check that just closing the socket without sending anything works
+[ ] [
+ <dispatcher>
+ add-quit-action
+ test-httpd
+] unit-test
+
+[ ] [ "addr" get binary [ ] with-client ] unit-test
+
+[ ] [ stop-test-httpd ] unit-test
dup path>> "/" head? [ "Bad request: URL" throw ] unless ; inline
: read-request-line ( request -- request )
- read-?crlf [ dup empty? ] [ drop read-?crlf ] while
+ read-?crlf [ dup "" = ] [ drop read-?crlf ] while
parse-request-line first3
[ >>method ] [ >url check-absolute >>url ] [ >>version ] tri* ;