Embedded C/C++

Moderators: Lundin
Number of threads: 209
Number of posts: 392

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Problem: ISAPI Extension Add custom header Posted by theoneneo on 5 Jan 2011 at 2:41 AM
Hello,

I am developing an ISAPI extension WildCard and a filter, now i want to pass information from the extension to the filter for each request, and the only way that i have found was to
pass the data throw the response header, but when i added a custom header (Example: MYHEADER), and try to approach from the browser in the second request the browser freeze and say that there was a problem with the response.
*The ISAPI extension not changing anything in the request, only log info and add one header to the response (1 time its adding a SET-Cookie and the rest its adding a custom header).

I have set cookie header that works fine, and i know that i can't run the function HSE_REQ_SEND_RESPONSE_HEADER twice on the same request, so i add the custom header only when i don't use the set cookie.

code snippet
string dicstr = "X-My-Header-UserID: 12\r\n";
DWORD dwSize = strlen((char*)dicstr.c_str());

ecb->ServerSupportFunction(ecb, HSE_REQ_SEND_RESPONSE_HEADER, NULL, &dwSize, (unsigned long *)(char*)dicstr.c_str());



Any idea why its happen when i added a custom header?


Thanks in advance,
Neo.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.