Hi - For 3.4x, look in nsd/return.c and nsd/fastpath.c; fastpath is calling Ns_ConnSetLastModifiedHeader in return.c to set Last-Modified. 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. Changing the put to an update would not be a good idea IMO, because then the result would depend on whether the TCL was executed before or after fastpath. Ns_ConnCondSetHeaders seems like the better approach. The same thing could be done for Content-Type (mentioned in the online bug report).
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 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. Good luck, Jim > > Hello good people, > > A friend has helped me comment on an AOLserver bug, but I was hoping to > also seek assistance here. For reference, this is the bug: > > http://sourceforge.net/tracker/index.php?func=detail&aid=879076&group_id=3152&atid=103152 > > To answer Dossy's question, I have tried: > > ns_set update [ns_conn outputheaders] key value > > This however still results in a duplicate header (in my case > Content-Type). I have confirmed this bug in both AOLserver 3.3.1 and > 3.4.2. Restating what I said in the bug report: Is there any way to > workaround this from within the Tcl/ADP page? If not, does anyone know > which function call this may relate to within the C API? I'd be happy > to submit a patch if no one else has the time to fix it. > > Also, does anyone know if this has been fixed in AOLserver 4? If so, > would the fix be easy to back port to 3.3.1 or 3.3.4? > > Thank you very much, > Andrew > > > -- > 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. > -- 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.
