Hello,

> For 3.4x, look in nsd/return.c and nsd/fastpath.c; fastpath is calling
> Ns_ConnSetLastModifiedHeader in return.c to set Last-Modified.

Thank you very much for the head start.

> This routine calls Ns_ConnSetHeaders, which does an ns_set put, but it
> could easily call Ns_ConnCondSetHeaders, which would only do the put
> if the header doesn't exist.

I see nothing wrong with this solution, and feel that perhaps it should
have been this way in the first place. That begs the question however:
why is Ns_ConnSetHeaders used instead of Ns_ConnCondSetHeaders in these
instances? Was there a specific reason? Are we going to break some
existing functionality by changing? (The latter seems doubtful
thankfully.)

> Are you executing your TCL stuff in a filter/trace?  Or doing an
> ns_returnfile?  Those are the only ways I can see where you would be
> executing TCL to affect the headers but still ending up in the
> fastpath code.

I've not tried in a trace, but a simple ADP page doing "ns_set update"
demonstrates the duplicate header behavior. The behavior is also evident
using ns_return and ns_returnfile. And as Daniel has pointed out,
ns_respond as well.

> I've had a similar problem in the past: I needed to do an
> ns_returnfile, but didn't want the Last-Modified header to be sent out
> at all because I didn't want the result cached.  Never figured out
> how to do that.

One would assume "ns_set delkey [ns_conn outputheaders] Last-Modified"
would work, but of course doesn't for similar reasons as the duplicate
issue.

I'm going to make the change Jim suggested and see if that fixes the
issue without breaking anything else. Thanks again!


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of 
your email blank.

Reply via email to