How to unset Request header field?

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 UTC