W3C home > Mailing lists > Public > www-jigsaw@w3.org > September to October 1996

How to unset Request header field?

From: Anselm Baird-Smith <abaird@w3.org>
Date: Fri, 6 Sep 1996 09:27:28 +0500
Message-Id: <9609061327.AA14266@www18.w3.org>
To: alex@access.com.au (Alexandre Rafalovitch)
Cc: www-jigsaw@w3.org
Alexandre Rafalovitch writes:
 > Easy question:
 > 
 > I want to unset the If-Modified-Since header in incoming request with a
 > filter. This is so I could test some small theory of mine related to server
 > performance.

Unfortunatelly the old (or current ;-) request api doesn't handle all
headers unsetting. If I remember well, I think in that case, if you
set it to -1 it will be unset. Otherwise, feel free to hack the
request API to match your needs, the new one will provide the
appropriate unsetters (in the upcoming release, setting the value to
-1 is the way to do that).

 > Looking through Request api and through its parent MIMEHeaders, I could not
 > find anything like unsetField or undefineField. I would like to have that
 > even for the sake of completeness. It may not seem needed, but who knows
 > what one can come up with?
 >
 > I would accept an answer that upcoming release will have unsetField, but I
 > would be even more glad to any suggestions how to make it work now.

Again, feel free to hack the old request API. The next release will
allow you to:

setHeaderValue(<header-access-token>, null);

to unset any header value.

Anselm.
Received on Friday, 6 September 1996 09:27:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:25 GMT