On 2004.05.19, Dave Kuhlman <[EMAIL PROTECTED]> wrote: > 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.)?
Generally, I think this is a safe rule to follow. There may be exceptions, but for simplicity, I'd just pretend they didn't exist. > 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. You really want your module to act like a "registered proc" -- Ns_WriteConn() is what you want, but you want your code to handle all of the request processing instead of AOLserver's normal HTTP request handler. If you're doing your own request processing, and you're writing your stuff in C -- why are you using AOLserver? -- Dossy -- Dossy Shiobara mail: [EMAIL PROTECTED] Panoptic Computer Network web: http://www.panoptic.com/ "He realized the fastest way to change is to laugh at your own folly -- then you can let go and quickly move on." (p. 70) -- 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.
