issue with setting cookies - WeOnlyDo Discussion board

issue with setting cookies (General questions)

by Klinzter, Monday, October 07, 2013, 01:08 (3851 days ago)

I have a little issue with wodHttp with Autoredirect set to true.

I have this POST to site1.com/login.php with username and password
on success I get a header with

Set-Cookies: user=blah
Set-Cookies: logged=yes
Location: site2.com/connect.php

then I am redirected to site2.com/connect.php
the header contains this

Set-Cookies: user=no
Set-Cookies: logged=no
Location: site1.com/home.php

then I am redirected back to site1.com/home.php
and it says that im not logged in, so when I check cookies I have
user=no; logged=no

what can I do because site2 its messing up the cookies

Re: issue with setting cookies

by woddrazen, Monday, October 07, 2013, 10:22 (3851 days ago) @ Klinzter

Hi Klinzter,


Did you try to manually send cookies for second request?

Let us know how it goes.


Regards,
Drazen

Re: issue with setting cookies

by Klinzter, Monday, October 07, 2013, 10:25 (3851 days ago) @ woddrazen

it works in the browser because a browser tracks cookies correctly by domain and wodHttp tracks cookies incorrectly by merging all received cookies

Re: issue with setting cookies

by woddrazen, Monday, October 07, 2013, 10:42 (3851 days ago) @ Klinzter

Klinzter,


Did you try to remove cookies from collection using RemoveAll MEthod?

More help for RemoveAll Method you can find here:
http://www.weonlydo.com/HttpDLX/Help/wodHttpDLX-HttpCookies-RemoveAll.html

if problem persist is there any cahnce we can duplicate this on our side?


Drazen