[Libwebsockets] something broke since my last git pull (some hours ago)

Edwin van den Oetelaar oetelaar.automatisering at gmail.com
Sun Feb 17 23:51:34 CET 2013


Hello Andy,

I am not sure what happens, but found another problem.
If you return -1 from the LWS_CALLBACK_HTTP
something bad happens, not a 404 not found response.
A close is called on an invalid handle.
Look at this trace (the leaf.jpg) was not installed.


poll([{fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7,
events=POLLIN}], 3, 50) = 1 ([{fd=6, revents=POLLIN}])
gettimeofday({1361139514, 258651}, NULL) = 0
recv(6, "GET /leaf.jpg HTTP/1.1\r\nHost: lo"..., 4096, 0) = 403
open("./libwebsockets-test-server/leaf.jpg", O_RDONLY) = -1 ENOENT (No
such file or directory)
close(1845496333)                       = -1 EBADF (Bad file descriptor)
shutdown(6, 2 /* send and receive */)   = 0
close(6)                                = 0
gettimeofday({1361139514, 261950}, NULL) = 0

Can you see where this is coming from ?
my guess is about line 200 in /lib/server.c

Good night (23:51 local time)
Edwin van den Oetelaar



More information about the Libwebsockets mailing list