* - do not use quotation marks
*/
h2_alt_svc *h2_alt_svc_parse(const char *s, apr_pool_t *pool) {
- const char *sep = strchr((char *)s, '=');
+ const char *sep = ap_strchr_c(s, '=');
if (sep) {
const char *alpn = apr_pstrndup(pool, s, sep - s);
const char *host = NULL;
int port = 0;
s = sep + 1;
- sep = strchr((char *)s, ':'); /* mandatory : */
+ sep = ap_strchr_c(s, ':'); /* mandatory : */
if (sep) {
if (sep != s) { /* optional host */
host = apr_pstrndup(pool, s, sep - s);
h2_config *conf = (h2_config *)apr_pcalloc(pool, sizeof(h2_config));
const char *s = x? x : "unknown";
- char *name = (char *)apr_pcalloc(pool, strlen(prefix) + strlen(s) + 20);
+ char *name = apr_pcalloc(pool, strlen(prefix) + strlen(s) + 20);
strcpy(name, prefix);
strcat(name, "[");
strcat(name, s);
h2_config *add = (h2_config *)addv;
h2_config *n = (h2_config *)apr_pcalloc(pool, sizeof(h2_config));
- char *name = (char *)apr_pcalloc(pool,
- 20 + strlen(add->name) + strlen(base->name));
+ char *name = apr_pcalloc(pool, 20 + strlen(add->name) + strlen(base->name));
strcpy(name, "merged[");
strcat(name, add->name);
strcat(name, ", ");
req->method = r->method;
req->authority = r->hostname;
req->path = r->uri;
- if (!strchr((char *)req->authority, ':') && r->parsed_uri.port_str) {
+ if (!ap_strchr_c(req->authority, ':') && r->parsed_uri.port_str) {
req->authority = apr_psprintf(req->pool, "%s:%s", req->authority,
r->parsed_uri.port_str);
}
header = apr_table_make(pool, hlines->nelts);
for (i = 0; i < hlines->nelts; ++i) {
char *hline = ((char **)hlines->elts)[i];
- char *sep = strchr(hline, ':');
+ char *sep = ap_strchr(hline, ':');
if (!sep) {
ap_log_perror(APLOG_MARK, APLOG_WARNING, APR_EINVAL, pool,
APLOGNO(02955) "h2_response(%d): invalid header[%d] '%s'",