about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation/HTMIME.c
diff options
context:
space:
mode:
Diffstat (limited to 'WWW/Library/Implementation/HTMIME.c')
-rw-r--r--WWW/Library/Implementation/HTMIME.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/WWW/Library/Implementation/HTMIME.c b/WWW/Library/Implementation/HTMIME.c
index c27e1f3b..a688e03a 100644
--- a/WWW/Library/Implementation/HTMIME.c
+++ b/WWW/Library/Implementation/HTMIME.c
@@ -1469,9 +1469,18 @@ PRIVATE void HTMIME_put_character ARGS2(
 		StrAllocCopy(me->anchor->date, me->value);
 		break;
 	    case miETAG:
-		HTMIME_TrimDoubleQuotes(me->value);
-		CTRACE(tfp, "HTMIME: PICKED UP ETag: '%s'\n",
+		/*  Do not trim double quotes:
+		 *  an entity tag consists of an opaque quoted string,
+		 *  possibly prefixed by a weakness indicator.
+		 */
+		CTRACE(tfp, "HTMIME: PICKED UP ETag: %s\n",
 			    me->value);
+		if (!(me->value && *me->value))
+		    break;
+		/*
+		**  Indicate in anchor. - FM
+		*/
+		StrAllocCopy(me->anchor->ETag, me->value);
 		break;
 	    case miEXPIRES:
 		HTMIME_TrimDoubleQuotes(me->value);
@@ -1774,6 +1783,7 @@ PUBLIC HTStream* HTMIMEConvert ARGS3(
     FREE(me->anchor->date);
     FREE(me->anchor->expires);
     FREE(me->anchor->last_modified);
+    FREE(me->anchor->ETag);
     FREE(me->anchor->server);
     me->target	=	NULL;
     me->state	=	miBEGINNING_OF_LINE;