]>
Commit | Line | Data |
---|---|---|
0e467b1f AM |
1 | |
2 | Use a weak etag comparison: | |
3 | ||
4 | http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16451 | |
5 | ||
6 | (similar but simpler than the fix in CVS HEAD) | |
7 | ||
8 | --- httpd-2.0.45/modules/dav/main/util.c.davetag 2003-05-19 14:43:45.000000000 +0100 | |
9 | +++ httpd-2.0.45/modules/dav/main/util.c 2003-05-19 14:41:04.000000000 +0100 | |
10 | @@ -1072,7 +1072,17 @@ | |
11 | switch(state_list->type) { | |
12 | case dav_if_etag: | |
13 | { | |
14 | - int mismatch = strcmp(state_list->etag, etag); | |
15 | + int mismatch; | |
16 | + const char *given_etag = state_list->etag; | |
17 | + const char *current_etag = etag; | |
18 | + | |
19 | + if (given_etag[0] == 'W' && given_etag[1] == '/') | |
20 | + given_etag += 2; | |
21 | + | |
22 | + if (current_etag[0] == 'W' && current_etag[1] == '/') | |
23 | + current_etag += 2; | |
24 | + | |
25 | + mismatch = strcmp(given_etag, current_etag); | |
26 | ||
27 | if (state_list->condition == DAV_IF_COND_NORMAL && mismatch) { | |
28 | /* |