Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Problem: ISAPI Extension Add custom header
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.
string dicstr = "X-My-Header-UserID: 12
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,
0 · ·