R
Robert
Hi, i am pretty new to c and i am trying to make a webserver.
Alright, here's my problem. I want to decompile the header if a browser
sends a header requesting a file.
I was thinking of using strtok to make single strings of each command, in
the header but i always get segmentation faults when trying to run the
program. Can anyone send me an example or something? Here's the piece of
code i use to call the function which does the header analyzing...:
} else {
// incoming data
geturl(buf);
sendpage(i, "/var/www/html/test.html");
disconnect(i, &master);
}
char geturl(char *header)
{
}
I've removed my strtok code yesterday to try something else because it
didn't work but i hope someone can help me with this.
Thanks in advance,
Robert
Alright, here's my problem. I want to decompile the header if a browser
sends a header requesting a file.
I was thinking of using strtok to make single strings of each command, in
the header but i always get segmentation faults when trying to run the
program. Can anyone send me an example or something? Here's the piece of
code i use to call the function which does the header analyzing...:
} else {
// incoming data
geturl(buf);
sendpage(i, "/var/www/html/test.html");
disconnect(i, &master);
}
char geturl(char *header)
{
}
I've removed my strtok code yesterday to try something else because it
didn't work but i hope someone can help me with this.
Thanks in advance,
Robert