You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by je...@apache.org on 2002/09/01 20:31:32 UTC
cvs commit: httpd-2.0/modules/http http_protocol.c
jerenkrantz 2002/09/01 11:31:31
Modified: . CHANGES
modules/http http_protocol.c
Log:
Fix FileETag None directive.
- Fix segfault on strlen computation on the empty string in vlv case
- If the etag is "", don't set the ETag header to be "" - leave the
header NULL instead.
Andrew's patch would change ap_meets_condition to accept "", but Justin
thinks it would be better just to sidestep it all together and not set
ETag when it would be "".
PR: 12207
Submitted by: Andrew Ho <an...@tellme.com>
Revision Changes Path
1.910 +3 -0 httpd-2.0/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/httpd-2.0/CHANGES,v
retrieving revision 1.909
retrieving revision 1.910
diff -u -u -r1.909 -r1.910
--- CHANGES 1 Sep 2002 07:35:53 -0000 1.909
+++ CHANGES 1 Sep 2002 18:31:29 -0000 1.910
@@ -1,5 +1,8 @@
Changes with Apache 2.0.41
+ *) Fix FileETags none operation. PR 12207.
+ [Justin Erenkrantz, Andrew Ho <an...@tellme.com>]
+
*) Restored the experimental leader/followers MPM to working
condition and converted its thread synchronization from
mutexes to atomic CAS. [Brian Pane]
1.455 +10 -1 httpd-2.0/modules/http/http_protocol.c
Index: http_protocol.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/http/http_protocol.c,v
retrieving revision 1.454
retrieving revision 1.455
diff -u -u -r1.454 -r1.455
--- http_protocol.c 13 Aug 2002 14:27:39 -0000 1.454
+++ http_protocol.c 1 Sep 2002 18:31:30 -0000 1.455
@@ -2659,6 +2659,11 @@
if (!r->vlist_validator) {
etag = ap_make_etag(r, 0);
+
+ /* If we get a blank etag back, don't set the header. */
+ if (!etag[0]) {
+ return;
+ }
}
else {
/* If we have a variant list validator (vlv) due to the
@@ -2682,8 +2687,12 @@
variant_etag = ap_make_etag(r, vlv_weak);
- /* merge variant_etag and vlv into a structured etag */
+ /* If we get a blank etag back, don't append vlv and stop now. */
+ if (!variant_etag[0]) {
+ return;
+ }
+ /* merge variant_etag and vlv into a structured etag */
variant_etag[strlen(variant_etag) - 1] = '\0';
if (vlv_weak) {
vlv += 3;