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

Function log_escape

modules/loggers/mod_log_forensic.c:122–139  ·  view source on GitHub ↗

e is the first _invalid_ location in q N.B. returns the terminating NUL. */

Source from the content-addressed store, hash-verified

120 N.B. returns the terminating NUL.
121 */
122static char *log_escape(char *q, const char *e, const char *p)
123{
124 for ( ; *p ; ++p) {
125 ap_assert(q < e);
126 if (TEST_CHAR(*p, T_ESCAPE_FORENSIC)) {
127 ap_assert(q+2 < e);
128 *q++ = '%';
129 ap_bin2hex(p, 1, q);
130 q += 2;
131 }
132 else
133 *q++ = *p;
134 }
135 ap_assert(q < e);
136 *q = '\0';
137
138 return q;
139}
140
141typedef struct hlog {
142 char *log;

Callers 2

log_headersFunction · 0.85
log_beforeFunction · 0.85

Calls 1

ap_bin2hexFunction · 0.85

Tested by

no test coverage detected