I have this little problem when trying to tokenize a string from a http request directed at my "home made" Http server.
Basicly I am using these lines of code to tokneize.
token = strtok(bufptr, "\n");
while(token != NULL){
printf("%s \n", token);
token = strtok(NULL, "\n");
}
The problem is that for every token, the first character is removed from the tokenized string. How can I solve this?
I have tried copying the string, I have tried using strstr, but I have not yet succeded. I bet there is something pretty easy I am doing wrong.
Best regards.