| 350 | */ |
| 351 | |
| 352 | AP_DECLARE(int) ap_find_path_info(const char *uri, const char *path_info) |
| 353 | { |
| 354 | int lu = strlen(uri); |
| 355 | int lp = strlen(path_info); |
| 356 | |
| 357 | while (lu-- && lp-- && uri[lu] == path_info[lp]) { |
| 358 | if (path_info[lp] == '/') { |
| 359 | while (lu && uri[lu-1] == '/') lu--; |
| 360 | } |
| 361 | } |
| 362 | |
| 363 | if (lu == -1) { |
| 364 | lu = 0; |
| 365 | } |
| 366 | |
| 367 | while (uri[lu] != '\0' && uri[lu] != '/') { |
| 368 | lu++; |
| 369 | } |
| 370 | return lu; |
| 371 | } |
| 372 | |
| 373 | /* Obtain the Request-URI from the original request-line, returning |
| 374 | * a new string from the request pool containing the URI or "". |
no outgoing calls
no test coverage detected