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

Function h2_proxy_link_reverse_map

modules/http2/h2_proxy_util.c:1048–1081  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1046 */
1047
1048const char *h2_proxy_link_reverse_map(request_rec *r,
1049 proxy_dir_conf *conf,
1050 const char *real_backend_uri,
1051 const char *proxy_server_uri,
1052 const char *s)
1053{
1054 link_ctx ctx;
1055
1056 if (r->proxyreq != PROXYREQ_REVERSE) {
1057 return s;
1058 }
1059 memset(&ctx, 0, sizeof(ctx));
1060 ctx.r = r;
1061 ctx.pool = r->pool;
1062 ctx.conf = conf;
1063 ctx.real_backend_uri = real_backend_uri;
1064 ctx.rbu_len = (int)strlen(ctx.real_backend_uri);
1065 ctx.p_server_uri = proxy_server_uri;
1066 ctx.psu_len = (int)strlen(ctx.p_server_uri);
1067 ctx.s = s;
1068 ctx.slen = (int)strlen(s);
1069 while (read_link(&ctx)) {
1070 while (skip_param(&ctx)) {
1071 /* nop */
1072 }
1073 map_link(&ctx);
1074 if (!read_sep(&ctx)) {
1075 break;
1076 }
1077 }
1078 ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
1079 "link_reverse_map %s --> %s", s, ctx.s);
1080 return ctx.s;
1081}
1082
1083/*******************************************************************************
1084 * FIFO queue

Callers 1

process_proxy_headerFunction · 0.85

Calls 4

map_linkFunction · 0.85
read_linkFunction · 0.70
skip_paramFunction · 0.70
read_sepFunction · 0.70

Tested by

no test coverage detected