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

Function original_uri

server/util_script.c:376–399  ·  view source on GitHub ↗

Obtain the Request-URI from the original request-line, returning * a new string from the request pool containing the URI or "". */

Source from the content-addressed store, hash-verified

374 * a new string from the request pool containing the URI or "".
375 */
376static char *original_uri(request_rec *r)
377{
378 char *first, *last;
379
380 if (r->the_request == NULL) {
381 return (char *) apr_pcalloc(r->pool, 1);
382 }
383
384 first = r->the_request; /* use the request-line */
385
386 while (*first && !apr_isspace(*first)) {
387 ++first; /* skip over the method */
388 }
389 while (apr_isspace(*first)) {
390 ++first; /* and the space(s) */
391 }
392
393 last = first;
394 while (*last && !apr_isspace(*last)) {
395 ++last; /* end at next whitespace */
396 }
397
398 return apr_pstrmemdup(r->pool, first, last - first);
399}
400
401AP_DECLARE(void) ap_add_cgi_vars(request_rec *r)
402{

Callers 1

ap_add_cgi_varsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected