See if string has a "quoted part", and if so set *quoted_part to * the first character of the quoted part, then hammer a \0 onto the * trailing quote, and set *string to point at the first character * past the second quote. * * Otherwise set *quoted_part to NULL, and leave *string alone. */
| 288 | * Otherwise set *quoted_part to NULL, and leave *string alone. |
| 289 | */ |
| 290 | static void read_quoted(char **string, char **quoted_part) |
| 291 | { |
| 292 | char *strp = *string; |
| 293 | |
| 294 | /* assume there's no quoted part */ |
| 295 | *quoted_part = NULL; |
| 296 | |
| 297 | while (apr_isspace(*strp)) { |
| 298 | strp++; /* go along string until non-whitespace */ |
| 299 | } |
| 300 | |
| 301 | if (*strp == '"') { /* if that character is a double quote */ |
| 302 | strp++; /* step over it */ |
| 303 | *quoted_part = strp; /* note where the quoted part begins */ |
| 304 | |
| 305 | while (*strp && *strp != '"') { |
| 306 | ++strp; /* skip the quoted portion */ |
| 307 | } |
| 308 | |
| 309 | *strp = '\0'; /* end the string with a NUL */ |
| 310 | |
| 311 | strp++; /* step over the last double quote */ |
| 312 | *string = strp; |
| 313 | } |
| 314 | } |
| 315 | |
| 316 | /* |
| 317 | * returns the mapped URL or NULL. |
no outgoing calls
no test coverage detected