I read the doc (http://msdn2.microsoft.com/en-us/library/ms525099(VS.85).aspx), but there's something I'm not clear on.
When i call SetHeader(), does the lpszValue get copied as a pointer? or does the content of lpszValue get copied to a buffer that is maintained by IIS?
In my filter, I allocate a buffer during the request, call SetHeader() using that allocated string pointer, and then before the request ends, I call free(). Is this a bug?
Would it be better if I did AllocMem() and then allowed the memory to be automatically freed?
A related question - is it ever wise to use malloc/free within the context of a filter, or should I just always use AllocMem() and get the free "for free" ?
thanks!