Hi,

Am 02.05.2011 16:41, schrieb Artem Belevich:

        if(ptr&&  (ptr=strstr(ptr," HTTP/1.1"))) /* find end of res */

Contrary to the comment in the code you're not checking for "HTTP/1.1"
at the end but you're checking for it *anywhere* in the string. While
it will occur at the end of valid input string, nobody said it can't
occur in the middle, too. Original requirement was saying "surrounded
by GET and HTTP/1.1".

good catch :-)
The additional test for end-of-string should be an exercise for the OP.
Reading the code of <your favourite webserver here> should clarify things, too.

With kind regards,
Robert Schulze

_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[email protected]"

Reply via email to