News for hackers. Stuff that matters.
Re:Show HN: My embeddable C/C++ webserver by zwp on Saturday May 07, 2011 @02:36PM (#2524270)
Cool.

> only the ones that have been modified by the application code

Sounds good (after a quick skim again I still can't see that but I'll take your word for it!).

I've had two attempts to build and test but unfortunately failed: currently can't build (src/unix/Client.cc:242: error: cannot convert ‘sockaddr_in’ to ‘const sockaddr’) and hello_world.c dumped core on me this time yesterday (Ubuntu 10.10).

"Work in progress" as you say... but it may just scratch an itch. I will come back again in a couple of months :) Thanks.

Re:Show HN: My embeddable C/C++ webserver by udp on Saturday May 07, 2011 @05:08PM (#2524557)
Someone actually just submitted a pull request to fix this on Github, which is now merged :-)

I just cloned the source and compiled it successfully on Debian, and it all seems to work alright (I can't get hello_world.cc to crash.) If it happens again, could you possibly get me a stack trace?

By the way, if you look at the cookie output code:

    for(Map::Item * Current = Client.Cookies.First; Current; Current = Current->Next)
        if(strcmp(Current->Value, Client.Input.Cookies.Get(Current->Key)))
            Socket << "\r\nSet-Cookie: " << Current->Key << "=" << Current->Value;
The strcmp() line checks the value of the cookie when received from the browser (Client.Input.Cookies) against the value of the cookie with any modifications (Client.Cookies).