I am having a problem where I am trying to split an HTTP request by a carriage return for a web proxy. The request does not seem to split.
Here is an example request: GET /pub/WWW/TheProject.html HTTP/1.1\r\nHost: www.w3.org\r\n
My attempt is:
char* split_request;
split_request = strtok(request, "\r\n");
But it never gets split? I am not sure what I am missing. It seems to split when I am using wget or the browser to test the web proxy, but doesn't with telnet.
Are you doing this way?
Output: