Forum OpenACS Q&A: Response to passing session forward to ns_httpget

Posted by Michael A. Cleverly on
What is the value of $my_url. Specifically, is it a relative or an absolute URL?

util_httpget is coded in Tcl. ns_geturl is written in C. IIRC, the C implementation of ns_geturl calls one of two different C functions depending on whether the URL is relative (/*) or absolute (http://*).

I'd be willing to bet that the relative url mechanism short-circuts some portion of the normal connection process and that the ns_set of headers is completely ignored. (Which seems like a rather silly policy to have coded into the C code, or, being charitable, a silly thing to go undocumented.)