Cookie不会在Opera中正常发送 [英] Cookies not being sent back and forth properly in Opera

查看:190
本文介绍了Cookie不会在Opera中正常发送的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我不知道这是一个问题,在Opera 12.01或没有,但问题只发生在Opera。我已在Android和iPhone上的FF14,Chrome 21,Safari 5(Windows)和Safari Mac和Webkit浏览器中测试。



我的应用程序在运行trigger.io的





t包含来自请求转发的代理的代码,因此,如果您需要获得一些洞察,请让我知道。在服务端,我运行PHP和Codeigniter。请让我知道,如果我需要在我的环境中添加任何更多的信息,谢谢。



更新:即使在我不使用自定义TLD的生产环境中也会出现此问题。其他使用Cookie工作正常的网站和Cookie已启用。

解决方案

双引号在cookie值中是正式非法的。如果您将它们作为%22 进行转义,则它会正常工作。


First off, I'm not sure whether this is a problem in Opera 12.01 or not, but the problem only occurs in Opera. I've tested in FF14, Chrome 21, Safari 5 (Windows) and Safari Mac and Webkit browsers on Android and iPhone.

My application runs on the trigger.io forge platform and uses a proxy to route requests from the web application to the service. The proxy simply forwards the requests and cookies along and this works as expected in most of the browsers.

After inspecting the request in dragonfly, I noticed that the server sends the proper headers in the response, but Opera seems to be ignoring setting the values. I'm wondering whether this is due to some misconfigured path value for the cookie. I've attached screenshots of 2 requests in Firefox and Opera.

As you can see in the screens, FF sees the cookie headers and sets them appropriately, but Opera does not.

Firefox Request

Opera request 1 Screen

Opera Request 2 Screen

I haven't included the code from the proxy that does the request forwarding, so please let me know if you need that to gain some insight. On the service end, I'm running PHP and Codeigniter. Please let me know if I need to add any more info here on my environment, thanks.

UPDATE : This issue occurs even in my production environment which does not use a custom TLD. Other sites that use cookies work fine and cookies are enabled.

解决方案

Double quotes are formally illegal in a cookie value. If you escape them as %22 it will work.

这篇关于Cookie不会在Opera中正常发送的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆