You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Log(13:48:16): Successfully started
Log(13:48:23): ERROR OCCURRED
Log(13:48:23): 127.0.0.1 - POST /odd/34 [] 400 0
Log(13:48:23): <handler log>
Log(13:48:23): 127.0.0.1 - POST /odd/34 [] 200 0
When sending an empty POST request to /odd/<id> it times out after 5 seconds, and the error_handler is called and the logger, BUT then also my handler is called, why does that happen? I didn't expect my handler to be called if something is wrong with the request.
Is this expected behavior?
Request:
$ time curl -v -X POST http://localhost:8500/odd/34
* Trying ::1...
* TCP_NODELAY set
* connect to ::1 port 8500 failed: Connection refused
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8500 (#0)
> POST /odd/34 HTTP/1.1
> Host: localhost:8500
> User-Agent: curl/7.58.0
> Accept: */*
>
< HTTP/1.1 400 Bad Request
< Content-Length: 0
<
* Connection #0 to host localhost left intact
real 0m5,024s
user 0m0,001s
sys 0m0,014s
The text was updated successfully, but these errors were encountered:
Hi,
I'm a bit confused why my handler is called when a error occurred when parsing the request.
The setup:
Output log:
When sending an empty
POST
request to/odd/<id>
it times out after 5 seconds, and theerror_handler
is called and thelogger
, BUT then also my handler is called, why does that happen? I didn't expect my handler to be called if something is wrong with the request.Is this expected behavior?
Request:
The text was updated successfully, but these errors were encountered: