我正在測試我的網站,它可以正常使用Iron,Firefox和Opera,現在使用Internet Explorer 9和Chrome。它在每個瀏覽器中設置了兩個重要的cookie,除了IE9和Chrome。這些瀏覽器似乎忽略了set-cookie標頭。在我降低安全和隱私設置之前,在Internet Explorer中Facebook的cookie也缺失(除了來自skype.com的cookie,在IE內部沒有任何cookie)。Internet Explorer 9和Chrome無法處理設置Cookie標頭
Cookie設置爲域名modern-iq.appspot.com(該項目的alpha版本可在http://modern-iq.appspot.com訪問)。它不包含下劃線,它看起來符合標準。
獨立於實際路徑,我總是選擇「/」作爲我的cookies。 該域永遠是modern-iq.appspot.com(無跨域cookie)。沒有內置頁框。
更新:我做了以下測試:
在Ubuntu(64位)工作
- 鐵12.0.750.0(88853):餅乾工作
- 在Ubuntu的Firefox 6.0(64-位):餅乾工作
- 火狐3.6.13在Windows XP:餅乾在Windows 7上運行
- 火狐(未知版本):餅乾工作
不要在Windows 7上運行
- 的Internet Explorer 9:餅乾不工作
- 的Chrome 13.0.782.112 M於Windows XP中:餅乾不工作
UPDATE :
- requestlog-chrome.har(餅乾忽略) :失敗的鉻和鐵的工作的請求日誌
- requestlog-chrome.txt(忽略的Cookie)
- requestlog-iron.har(餅乾保持)
- requestlog-iron.txt(餅乾保持)
可疑餅乾是fb_user,並在請求鏈的末端fb_access_token。
set_cookie電話(蟒蛇):
set_cookie(self.response, FACEBOOK_USER_COOKIE_NAME, str(profile["id"]), domain='modern-iq.appspot.com',
expires=time.time() + COOKIE_EXPIRY_SPAN) #30 * 86400)
set_cookie(self.response, FACEBOOK_ACCESS_TOKEN_COOKIE_NAME, str(access_token), domain='modern-iq.appspot.com',
expires=time.time() + COOKIE_EXPIRY_SPAN) #30 * 86400)
set_cookie(蟒蛇):
def set_cookie(response, name, value, domain=None, path="/", expires=None):
"""Generates and signs a cookie for the give name/value"""
for domain in domain, : #'localhost':
logging.info('DOING COOKIE OF DOMAIN '+repr(domain)+'...')
timestamp = str(int(time.time()))
value = base64.b64encode(value)
signature = cookie_signature(value, timestamp)
cookie = Cookie.BaseCookie()
cookie[name] = "|".join([value, timestamp, signature])
cookie[name]["path"] = path
if domain: cookie[name]["domain"] = domain
if expires:
cookie[name]["expires"] = email.utils.formatdate(
expires, localtime=False, usegmt=True)
response.headers._headers.append(("Set-Cookie", cookie.output()[12:]))
我不認爲這個問題本身就是與Facebook相關的。這是一個Cookie問題。 – ideaboxer
我添加了IE隱私報告的屏幕截圖。它顯示所有的cookies都被接受。但是,如果是這樣的話,爲什麼不IE發送它們? – ideaboxer