Reputation: 1
I receive HTTP request at socket.
I want to split HTTP request at header and content.
So, I tried this source.
//p is char* type, response too
p = strtok(response, "\r\n\r\n");
while(NULL != p){
printf("%s\n", p);
p = strtok(NULL, "\r\n\r\n");
}
But strtok()
replaced "\r\n"
by NULL
too.
I want replace only "\r\n\r\n"
.
How should I?
Upvotes: 0
Views: 2623