在VB.NET中检索多个set-cookies

时间:2011-11-11 10:15:33

标签: vb.net cookies httpwebresponse

我有一个检索cookie的常用功能(登录):

postReq.CookieContainer = tempCookies

tempCookies.Add(postresponse.Cookies)

Return tempCookies

我从中获取Cookie的网站给了我三个Set-Cookie s:

Set-Cookie: PHPSESSID=abcdefghijklmnopqrstuvwxyz; path=/
Set-Cookie: login=abcdefghijklmnopqrstuvwxyz; expires=Sat, 10-Nov-2012 10:02:56
Set-Cookie: auth=abcdefghijklmnopqrstuvwxyz; expires=Mon, 10-Nov-2014 10:02:56 GMT; path=/; domain=.domain.here

虽然它成功检索了所有三个,但当我尝试传递cookie时,它只发送第一个:

Cookie: PHPSESSID=abcdefghijklmnopqrstuvwxyz;

我希望它是这样的:

Cookie: PHPSESSID=abcdefghijklmnopqrstuvwxyz;login=abcdefghijklmnopqrstuvwxyz;auth=abcdefghijklmnopqrstuvwxyz;

0 个答案:

没有答案