Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char* temp_path = strchr(line, '/');
- int index = 0;
- for (int length = strlen(temp_path); index < length; index++)
- {
- if (temp_path[index] == ' ' || temp_path[index] == '?')
- {
- break;
- }
- }
- strncpy(abs_path, temp_path, index);
- abs_path[index] = '\0';
- for (int i = 0, n = strlen(abs_path); i < n; i++)
- {
- if (abs_path[i] == '"')
- {
- error(400);
- return false;
- }
- }
- char* temp_query = strchr(line, '?');
- if (temp_query != NULL)
- {
- index = 0;
- for (int length = strlen(temp_query); index < length; index++)
- {
- if (temp_query[index] == ' ')
- {
- break;
- }
- }
- strncpy(query, temp_query, index);
- query[index] = '\0';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement