About Blog Projects Papers Contact

I said I'd never blog

DeforaOS, NetBSD, reverse-engineering and stuff
Funny code bit #1
Blog post by khorben
on Friday, March 27 2009, 21:58

Member of

Name
funny
gnet
source
 
While reading some code from GNet, I found this:

In file gnet-2.0.8/src/conn-http.c, function gnet_conn_http_conn_parse_response_headers() line 825:
825 static void
826 gnet_conn_http_conn_parse_response_headers (GConnHttp *conn)
827 {
[...]
867                 /* Note: amazon sends garbled 'Connection' string, but it 
868                  *  might also be some apache module problem */
869                 else if (g_ascii_strcasecmp(hdr->field, "Connection") == 0
870                       || g_ascii_strcasecmp(hdr->field, "Cneonction") == 0
871                       || g_ascii_strcasecmp(hdr->field, "nnCoection") == 0)
And then while checking if it's true:

$ nc www.amazon.de 80
GET / HTTP/1.1
Host: www.amazon.de
[...]
<!-- MEOW -->
*meow* *meow* *grr* *grr* Riiight...

Come back...

Creative Commons License RSS