From: Christophe Jaillet Date: Fri, 3 Aug 2018 17:22:57 +0000 (+0000) Subject: Save a few cycles. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7073116d394be9568afc2c37bfff6e123d3c605f;p=apache Save a few cycles. There is no need to check the first bytes, they are known to be "bytes ". git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1837388 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/dav/main/mod_dav.c b/modules/dav/main/mod_dav.c index a2127b11be..1f26adb666 100644 --- a/modules/dav/main/mod_dav.c +++ b/modules/dav/main/mod_dav.c @@ -821,8 +821,8 @@ static int dav_parse_range(request_rec *r, range = apr_pstrdup(r->pool, range_c); if (ap_cstr_casecmpn(range, "bytes ", 6) != 0 - || (dash = ap_strchr(range, '-')) == NULL - || (slash = ap_strchr(range, '/')) == NULL) { + || (dash = ap_strchr(range + 6, '-')) == NULL + || (slash = ap_strchr(range + 6, '/')) == NULL) { /* malformed header */ return -1; }