[Wifidog] threads
Alexandre Carmel-Veilleux
saruman at northernhacking.org
Wed Apr 14 23:30:37 EDT 2004
On Wed, Apr 14, 2004 at 10:58:37PM -0400, Philippe April wrote:
>
> Decided to test before going to bed, I was too excited.
>
> I have some bad news though. Hope it's something minor, it didn't work...
>
> [debug 4] Received connection from 192.168.1.21
> [debug 0] No valid request received from 192.168.1.21
> [debug 4] Closing connection with 192.168.1.21
> [debug 4] Received connection from 192.168.1.21
> [debug 0] No valid request received from 192.168.1.21
> [debug 4] Closing connection with 192.168.1.21
>
>And on the browser, a nice 'ERROR : Method Not Implemented'...
This is a libhttpd-1.3 generated error, the only place where it
can be triggered:
------------------------------------------------------------------------
if (strcasecmp(cp,"GET") == 0)
server->request.method = HTTP_GET;
if (strcasecmp(cp,"POST") == 0)
server->request.method = HTTP_POST;
if (server->request.method == 0)
{
_httpd_net_write( server->clientSock,
HTTP_METHOD_ERROR,
strlen(HTTP_METHOD_ERROR));
_httpd_net_write( server->clientSock, cp,
strlen(cp));
_httpd_writeErrorLog(server,LEVEL_ERROR,
"Invalid method received");
return(-1);
}
------------------------------------------------------------------------
Looks like the libc chokes on strcasecmp(). We should make a test
case like this:
------------------------------------------------------------------------
#includes <stdio.h>
#includes <strings.h>
int
main(int argc, char **argv)
{
char *test = "GET / HTTP/1.0\r\n\r\n";
if (strcasecmp(test,"GET") == 0)
printf("Good\n");
else
printf("Bad\n");
}
------------------------------------------------------------------------
Then it can be run on both regular linux and openwrt.
Cheers,
Alex
-------------- next part --------------
_______________________________________________
Wifidog mailing list
Wifidog at isf.waglo.com
http://isf.waglo.com/mailman/listinfo/wifidog_isf.waglo.com
More information about the Wifidog
mailing list