From: Stephen D. <sd...@gm...> - 2005-03-05 00:33:39
|
I added the function Ns_ConnSetResponseStatus() for the protocols stuff, but I didn't add the Tcl equivalent to ns_conn. I aggree with Vlad that ns_conn status ?newStatus? would be a good addition (which requires that we drop connid :-) Does ns_respond do what you need? ns_respond ?-status status? ?-type type? \ { ?-string string? | ?-file filename? | ?-fileid fileid? } \ ?-length length? ?-headers setid? What is [ns_conn discardcontent] used for? On Fri, 04 Mar 2005 14:59:22 -0500, Vlad Seryakov <vl...@cr...> wrote: > With headers you can pretty much use ns_set > set h [ns_conn outputheaders] > ns_set truncate $h > ns_set put $h Content-Type text/html > ... > > But there is not way to set status without using one of the ns_return... > command. > > It would be nice to use > ns_conn status for returning current status and > ns_conn status newstatus for setting new status directly > > Zoran Vasiljevic wrote: > > Hi! > > > > I'm going thru the module we wrote some times ago which augment > > core server commands, and I spotted two of them: > > > > ns_conn discardcontent > > ns_conn headers status ?type? ?length?" > > > > The first one discards the entire content of the request. > > The second one sets required output headers w/o sending > > any content to the remote peer. > > > > Question: is there anything in the server as-is which would > > allow me to do this now? > > > > Cheer's > > Zoran |