1. Am I correct that functions that return a string (char *) are
returning a pointer to a string that is both static (I should
not change it.) and does not need to be de-allocated (I should
not call free on it.)?
2. I'm writing a loadable module that calls some existing code to
produce the content that I want to return to the client. The
content produced by the existing code already has the HTTP headers
at its beginning. Is there a way to use the C API to send this
content to the client. I've tried Ns_ConnReturnHtml() and
Ns_WriteConn() (separately), but they both seem to create and send
their own headers, so that the headers in my content gets
splattered across the top of the page in the browser.
Just in case I'm not making myself clear, here is an example of the
content I'd like to return:
=================================================================
Status: 200 OK
Content-Length: 360
Content-Type: text/html; charset=iso-8859-1
Date: Thu, 20 May 2004 00:09:06 GMT
Expires: -1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Mynewapp - theotherui/SampleUI/task21</title>
</head>
<body>
<div align="center"><h1>Mynewapp - theotherui/SampleUI/task21</h1></div>
<p><a href="/">menu</a>
<hr/>
<p>theotherui.SampleUI.task21 not implemented yet.</p><hr/>
<p><a href="/">menu</a></p>
<hr />
</body>
</html>
=================================================================
Is there something that I need to do to specify "no headers"?
I guess I can parse the headers in this content, and use:
Ns_ConnSetHeaders() (multiple times)
Ns_ConnFlushHeaders()
Ns_ConnWrite()
Would this be correct?
That seems like un-doing and re-doing work that has already been
done. Is there a quicker way that just shoves this content back to
the client, headers and all?
It seems simple. But, I've been looking through the C API docs and
AOLserver's source code and can't find it.
Thanks for answers.
Dave
--
Dave Kuhlman
[EMAIL PROTECTED]
http://www.rexx.com/~dkuhlman
--
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.