From: Christophe Jaillet Date: Fri, 3 Aug 2018 17:22:57 +0000 (+0000) Subject: Save a few cycles. X-Git-Tag: 2.5.0-alpha2-ci-test-only~2409 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7073116d394be9568afc2c37bfff6e123d3c605f;p=thirdparty%2Fapache%2Fhttpd.git 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 a2127b11bed..1f26adb6660 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; }