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

Function unwrap_header

modules/metadata/mod_headers.c:182–195  ·  view source on GitHub ↗

unwrap_header returns HDR with any newlines converted into * whitespace if necessary. */

Source from the content-addressed store, hash-verified

180/* unwrap_header returns HDR with any newlines converted into
181 * whitespace if necessary. */
182static const char *unwrap_header(apr_pool_t *p, const char *hdr)
183{
184 if (ap_strchr_c(hdr, APR_ASCII_LF) || ap_strchr_c(hdr, APR_ASCII_CR)) {
185 char *ptr;
186
187 hdr = ptr = apr_pstrdup(p, hdr);
188
189 do {
190 if (*ptr == APR_ASCII_LF || *ptr == APR_ASCII_CR)
191 *ptr = APR_ASCII_BLANK;
192 } while (*ptr++);
193 }
194 return hdr;
195}
196
197static const char *header_request_env_var(request_rec *r, char *a)
198{

Callers 2

header_request_env_varFunction · 0.85
header_request_ssl_varFunction · 0.85

Calls 1

ap_strchr_cFunction · 0.85

Tested by

no test coverage detected