From: Justin Erenkrantz Date: Tue, 22 Apr 2003 21:52:46 +0000 (+0000) Subject: Fix a typo in the weak entity check. The prefix is W/" not "W/. X-Git-Tag: pre_ajp_proxy~1802 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=789fab44abf14d7532f268c916aab174fd065f77;p=apache Fix a typo in the weak entity check. The prefix is W/" not "W/. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99524 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/dav/main/util.c b/modules/dav/main/util.c index 7b2c5a05e7..5620c4cf43 100644 --- a/modules/dav/main/util.c +++ b/modules/dav/main/util.c @@ -1079,23 +1079,21 @@ static dav_error * dav_validate_resource_state(apr_pool_t *p, /* Do a weak entity comparison function as defined in * RFC 2616 13.3.3. */ - if (state_list->etag[0] == '"' && - state_list->etag[1] == 'W' && - state_list->etag[2] == '/') { + if (state_list->etag[0] == 'W' && + state_list->etag[1] == '/' && + state_list->etag[2] == '"') { new_etag = apr_pstrdup(p, state_list->etag); new_etag += 2; - new_etag[0] = '"'; given_etag = new_etag; } else { given_etag = state_list->etag; } - if (etag[0] == '"' && - etag[1] == 'W' && - etag[2] == '/') { + if (etag[0] == 'W' && + etag[1] == '/' && + etag[2] == '"') { new_etag = apr_pstrdup(p, etag); new_etag += 2; - new_etag[0] = '"'; current_etag = new_etag; } else {