Closed craftybones closed 5 months ago
https://github.com/janet-lang/spork/blob/19787cc900bbbcc57189e3817599e6245745b331/spork/http.janet#L344
Shouldn't it be (assert msg (string... instead of (assert x (string... ? Since x is a number, this will always be true.
(assert msg (string...
(assert x (string...
As expected, this following code fails at the wrong level
(def server (http/server (http/middleware 2000)))
Followed by
curl http://localhost:8000/
Returns
* Trying [::1]:8000... * connect to ::1 port 8000 failed: Connection refused * Trying 127.0.0.1:8000... * Connected to localhost (127.0.0.1) port 8000 > GET / HTTP/1.1 > Host: localhost:8000 > User-Agent: curl/8.4.0 > Accept: */* > * Empty reply from server * Closing connection curl: (52) Empty reply from server
The suggested change seems better than the existing code.
Thanks @craftybones
https://github.com/janet-lang/spork/blob/19787cc900bbbcc57189e3817599e6245745b331/spork/http.janet#L344
Shouldn't it be
(assert msg (string...
instead of(assert x (string...
? Since x is a number, this will always be true.As expected, this following code fails at the wrong level
Followed by
Returns