MCPcopy Create free account
hub / github.com/apache/httpd / ap_find_path_info

Function ap_find_path_info

server/util_script.c:352–371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350 */
351
352AP_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 "".

Callers 3

handle_map_fileFunction · 0.85
ap_add_cgi_varsFunction · 0.85
ap_sub_req_lookup_direntFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected