// Extract /XYZ from a request line : // GET /XYZ HTTP/XX void get_page(char *line, char *request, char *verb) { int verb_and_space_len = strlen(verb) + 1; // add the space between the verb and the request for (i = 0; line[i + verb_and_space_len] && (line[i + verb_and_space_len] != ' ') && (i < REQUEST_BUFFER_SIZE); i++) request[i] = line[i + verb_and_space_len]; request[i] = 0; }