Parse HTML GET command

//if HTTP request has ended
        if (c == '\n') {

Because you don't read the entire request, you're only reading the first line.

I'm pretty sure there are HTTP server libraries as well.