How to update Set-Cookie details (wodWebServer / wodWebServer.NET)

by Balaji Remala, (549 days ago)

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;

locked

How to update Set-Cookie details

by Jasmine, (549 days ago) @ Balaji Remala

Hi.

Why don't you try with Response.Headers.Add("Set-Cookie.....") where you can put raw cookie in response?

Regards,
Jasmine

locked

How to update Set-Cookie details

by Balaji Remala, (549 days ago) @ Jasmine

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

locked

How to update Set-Cookie details

by Jasmine, (549 days ago) @ Balaji Remala

Balaji,

what would be 'default cookie'? Are you interfering with session cookie WODSESSIONID?

Jasmine

locked

How to update Set-Cookie details

by Balaji Remala, (548 days ago) @ Jasmine

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.

locked

How to update Set-Cookie details

by Jasmine, (548 days ago) @ Balaji Remala

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

locked

How to update Set-Cookie details

by Balaji Remala, (548 days ago) @ Jasmine

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.

locked

How to update Set-Cookie details

by Jasmine, (548 days ago) @ Balaji Remala

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:
[code]
Private Sub Web1_ResponseHeaders(ByVal User As WODWEBSERVERCOMLib.IWebUser)
User.Response.Headers("Set-Cookie").Value = User.Response.Headers("Set-Cookie").Value + "; HttpOnly"
End Sub
[/code]

Of course, add little sanity checking inside, just in case.

Let me know if this works ok for you!

Jasmine

locked

How to update Set-Cookie details

by Balaji Remala, (544 days ago) @ Jasmine

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:
[code]
Private Sub Web1_ResponseHeaders(ByVal User As WODWEBSERVERCOMLib.IWebUser)
User.Response.Headers("Set-Cookie").Value = User.Response.Headers("Set-Cookie").Value + "; HttpOnly"
End Sub
[/code]

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

locked

How to update Set-Cookie details

by Jasmine, (544 days ago) @ Balaji Remala

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

locked