* - do not percent encode token values
* - do not use quotation marks
*/
-h2_alt_svc *h2_alt_svc_parse(const char *s, apr_pool_t *pool) {
+h2_alt_svc *h2_alt_svc_parse(const char *s, apr_pool_t *pool)
+{
const char *sep = ap_strchr_c(s, '=');
if (sep) {
- const char *alpn = apr_pstrndup(pool, s, sep - s);
+ const char *alpn = apr_pstrmemdup(pool, s, sep - s);
const char *host = NULL;
int port = 0;
s = sep + 1;
sep = ap_strchr_c(s, ':'); /* mandatory : */
if (sep) {
if (sep != s) { /* optional host */
- host = apr_pstrndup(pool, s, sep - s);
+ host = apr_pstrmemdup(pool, s, sep - s);
}
s = sep + 1;
if (*s) { /* must be a port number */
}
}
if (*alt_svc) {
- apr_table_set(r->headers_out, "Alt-Svc", alt_svc);
+ apr_table_setn(r->headers_out, "Alt-Svc", alt_svc);
}
}
}
return DECLINED;
}
-