Quantcast
Viewing all articles
Browse latest Browse all 4845

New Post: Error response in linux listener

Hello all,

thanks for this great piece of software.
We are using the http_listener (master branch) in linux to implement a REST api and everything seems to work smooth, but we have a small problem with the error cases.
Althought the error is reported as it should be, the connection "stays" alive. Is this the desired behaviour? Is it client issue? The issue can be easilly reproduced with the blackjackserver:

BlackJackServer:
Listening for requests at: http://localhost:34568/blackjack/dealer
Press ENTER to exit.
GET http://localhost:34568/blackjack/dealer HTTP/1.1
Accept: */*
Host: localhost:34568
User-Agent: curl/7.29.0


GET http://localhost:34568/blackjack/dealer/4343 HTTP/1.1
Accept: */*
Host: localhost:34568
User-Agent: curl/7.29.0

GET http://localhost:34568/blackjack/dealer/32323 HTTP/1.1
Accept: */*
Host: localhost:34568
User-Agent: curl/7.29.0
Using curl as client:
#curl -i -k http://localhost:34568/blackjack/dealer
HTTP/1.1 200 OK
Content-Length: 130
Content-Type: application/json

[{"Id":1,"Capacity":8,"Players":[{"Name":"DEALER","Balance":1000,"Hand":{"state":0,"result":0,"bet":0,"insurance":0,"cards":]}}]}]


# curl -i -k http://localhost:34568/blackjack/dealer/4343
HTTP/1.1 404 Not Found

(stays pending, have to interrupt to exit) 
^C  

# curl  -f -i -k http://localhost:34568/blackjack/dealer/32323
curl: (22) The requested URL returned error: 404 Not Found
thanks in advance,

-Apostolos

Viewing all articles
Browse latest Browse all 4845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>