duplicated cookies (General questions)
hello there..
I have a web post login to my website and then I get 5 cookies but two of them have the same cookie name but with different data..
something like this
Userlogin = 6532659
Logindata = 9865323
Session = psolwksd
Tracking = 65986532
Session = 98653231
something like that is what I see in the cookies but the second session is the one that has the right data..
how can I add those cookies but the first session?
im using this but its adding everything
Dim oldcookie As HttpCookie
For Each oldcookie In Http1.Response.Cookies
Http1.Request.Cookies.Add oldcookie.Name, oldcookie.Value
Next
Re: duplicated cookies
Klinzter,
Somehow we miss your post. Sorry about that.
Why don't you put some If...Then...Else Statement inside For Each...Next Statement that sends cookies and send only cookie you want?
Drazen
Re: duplicated cookies
no problem.. how exactly would the code look like
Re: duplicated cookies
Klintzer,
Why not simply remove the specific cookie after?
Once you copy the cookies, simply iterate thru the collection and remove the first occurance of the Session cookie. Something like this:
[code] For Each cookie In wodHttp1.Request.Cookies
If cookie.Name = Session Then
wodHttp1.Request.Cookies.Remove cookie
Exit For
End If
Next[/code]
Can you try something like that?
Regards,
Damba
Re: duplicated cookies
now that I check the code I still see duplicated cookies..
not only for session but other 4 duplicated cookies appear in the cookies.. how can I make something so it removes duplicated?
Re: duplicated cookies
Klinzter,
Is there any chance we can connect there and duplicate your problem?
Drazen
Re: duplicated cookies
there are about 5 duplicated cookies
Re: duplicated cookies
Klinzter,
Can you please check is duplicate cookies received from server using IEWatch or HttpFox?
Also did you receive some problem when you send duplicate cookie?
Drazen
Re: duplicated cookies
with the firefox browser I dont see any duplicated cookies..
when I request a page with the software and there are duplicated cookies there it shows as if it wasnt logged in!
Re: duplicated cookies
Klintzer,
Did you try my suggestion how to remove the certain cookies?
Also, why don't you simply Clear the cookies collection before doing new post?
Regards,
Damba