How to update Set-Cookie details (wodWebServer / wodWebServer.NET)
We are using wodWebServerCom(version 1.7.0.364) in VB5.0.
We need help, to update the Cookie with HTTPOnly and Secure details.
In Response Header by default, we are getting Set-Cookie details with default values as below:
Set-Cookie- <Cookie-Name =SessionID>; <Path>: <expires=Date>:
Expecting:
Set-Cookie- <Cookie-Name =SessionID>; <Path>:<expires=Date>:HttpOnly; Secure=True;
How to update Set-Cookie details
Hi.
Why don't you try with Response.Headers.Add("Set-Cookie.....") where you can put raw cookie in response?
Regards,
Jasmine
How to update Set-Cookie details
Hi.
Why don't you try with Response.Headers.Add("Set-Cookie.....") where you can put raw cookie in response?
Regards,
Jasmine
Hi,
Thank you for your quick response.
Using the Response.Headers.Add ("Set-Cookie:...") I am able to add the cookie. But at final I am seeing 2 Set-Cookie under the Response Header, another Set-Cookie is adding by itself, I am not able to update this default cookie with HTTPOnly and Secure details.
I want to update all the cookies with HTTPOnly and Secure details.
Thanks,
Balaji
How to update Set-Cookie details
Balaji,
what would be 'default cookie'? Are you interfering with session cookie WODSESSIONID?
Jasmine
How to update Set-Cookie details
Balaji,
what would be 'default cookie'? Are you interfering with session cookie WODSESSIONID?
Jasmine
Hi,
Yes, default Cookie name is WODSESSIONID.
Default Cookie Format:
Set-Cookie: WODSESSIONID=<>; path=/; expires=<>
I am expecting to edit the above default cookie details.
Thanks,
Balaji.
How to update Set-Cookie details
I think best approach would be to add ResponseHeaders event, that would fire after we have created headers, but before they are sent out, so you can change them as you wish.
Would that work for you? We would need a day or two to implement this.
Regards,
Jasmine
How to update Set-Cookie details
I think best approach would be to add ResponseHeaders event, that would fire after we have created headers, but before they are sent out, so you can change them as you wish.
Would that work for you? We would need a day or two to implement this.
Regards,
Jasmine
Hi
Thank you for your inputs.
That sounds fine for me, please share the sample code.
Thank you,
Balaji.
How to update Set-Cookie details
Hi.
Please request update and try it out. Version property should return 1.7.2. You should add code like this to achieve what you need:
Private Sub Web1_ResponseHeaders(ByVal User As WODWEBSERVERCOMLib.IWebUser)
User.Response.Headers("Set-Cookie").Value = User.Response.Headers("Set-Cookie").Value + "; HttpOnly"
End Sub
Of course, add little sanity checking inside, just in case.
Let me know if this works ok for you!
Jasmine
How to update Set-Cookie details
Hi.
Please request update and try it out. Version property should return 1.7.2. You should add code like this to achieve what you need:
Private Sub Web1_ResponseHeaders(ByVal User As WODWEBSERVERCOMLib.IWebUser) User.Response.Headers("Set-Cookie").Value = User.Response.Headers("Set-Cookie").Value + "; HttpOnly" End Sub
Of course, add little sanity checking inside, just in case.
Let me know if this works ok for you!
Jasmine
Hi Jasmine,
Thank you for your support.
wodWebServerCom Version is 1.7.0.364.
I am using IwodWebNotify events. I have not found IwodWebNotify_ResponseHeaders event.
There is only IwodWebNotify_ResponseDone, IwodWebNotify_RequestDone and IwodWebNotify_RequestHeaders.
Thank you,
Balaji
How to update Set-Cookie details
Hi.
We have implemented this event for you. You must update to the latest version from our website. Please request update and try it out.
Jasmine