Flash 记录器在 Firefox 中不包含 cookie

发布于 2024-10-02 14:04:21 字数 1383 浏览 4 评论 0原文

问候。

我遇到一个问题,Flash 播放器在通过 Firefox 运行时不包含 HTTP cookie。通过 Internet Explorer 运行时会包含这些内容。

我想知道是否有人知道如何强制 Flash 在与 Flash 服务器通信时包含 Cookie?

背景信息

我们有一个连接到 red5 服务器的闪存记录器。这些连接通过提供池地址的负载平衡器打开。池中有多个服务器。

记录器使用RTMPT协议发送数据。这将通过 HTTP 发送 RMTP(这允许穿越防火墙)。为了确保数据到达正确的服务器,我们使用基于 cookie 的负载平衡。如果存在某个 cookie,负载均衡器会将连接定向到正确的服务器。

当用户通过网络浏览器登录网站时,就会设置此 cookie。然后,Flash 播放器在与服务器通信时将这些 cookie 包含在 RTMTP HTTP 请求中。这可确保打开到正确服务器的 RMTPT 连接。

使用 fiddler,我抓取了一些流量(来自 IE)来展示我的意思:
<代码> POST http://主机名/idle/31283773/0 HTTP/1.1
内容类型:application/x-fcs
用户代理:Shockwave Flash
主持人:主持人
内容长度:1
连接:保持活动
编译指示:无缓存
Cookie: JSESSIONID=sessionid; target-server=target-server-value

不幸的是,当使用 Firefox 时,cookie 不包含在服务器的流量中:
POST http://主机名/idle/31283773/0 HTTP/1.1
内容类型:application/x-fcs
用户代理:Shockwave Flash
主持人:主持人
内容长度:2030
连接:保持活动
Pragma: no-cache

播放器是用动作脚本编写的,并通过 javascript/HTML 初始化。我们使用 NetConnection / NetStream 与服务器通信。

我可以访问加载 flash 记录器的 HTML / javascript 中的目标服务器 ID,但我无法弄清楚如何在发送 RTMPT 数据时包含 cookie,甚至这样的事情是可能的。

我想知道

谁能告诉我:
1 - 是否可以指示 Flash 记录器在与 Flash 服务器通信时包含某些 Cookie?通过 IE 运行时它们会自动包含在内。
2 - 如果是这样 - 谁能告诉我怎么做?

我花了几个小时在谷歌上搜索解决方案,但到目前为止没有运气 - 希望这里有人可能有一个想法:-)

感谢您抽出时间,如果您需要更多信息,请告诉我。

Greetings.

I have a problem where a flash player, when run through firefox, is not including the HTTP cookies. These are included when run through internet explorer.

I want to know if anyone knows how to force flash to include cookies when communicating with a flash server?

Background Information

We have a flash recorder which connects to a red5 server. These connections are opened through a load balancer which offers a pool address. There are multiple servers in the pool.

The recorder sends data using the RTMPT protocol. This sends the RMTP over HTTP (this allows firewall traversal). To ensure data arrives at the correct server we used cookie based load balancing. If a certain cookie is present the load balancer directs the connection to the correct server.

This cookie is set when the user logs into the site through thier web browser. The flash player then includes these cookies in the RTMTP HTTP requests when communicating with the server. This ensures the RMTPT connection is opened to the correct server.

Using fiddler, I grabbed some of the traffic (from IE) to show what I mean:

POST http://hostname/idle/31283773/0 HTTP/1.1
Content-Type: application/x-fcs
User-Agent: Shockwave Flash
Host: host
Content-Length: 1
Connection: Keep-Alive
Pragma: no-cache
Cookie: JSESSIONID=sessionid; target-server=target-server-value

Unfortunately, when using firefox, the cookies are not included in the traffic to the server:

POST http://hostname/idle/31283773/0 HTTP/1.1
Content-Type: application/x-fcs
User-Agent: Shockwave Flash
Host: host
Content-Length: 2030
Connection: Keep-Alive
Pragma: no-cache

The player is written in action script and initialized through javascript/HTML. We use NetConnection / NetStream to speak to the server.

I have access to the target server ID in the HTML / javascript which loads the flash recorder but for the life of me I cannot figure out how to include the cookies when sending the RTMPT data, or even is such a thing is possible.

What I'd like to know

Can anyone tell me:
1 - Is it possible to instruct the flash recorder to include certain cookies when speaking with the flash server? They're automatically included when running through IE.
2 - If so - can anyone tell me how?

I've spent a few hours googling for solutions with no luck so far - hopefully someone here may have an idea :-)

Thanks for your time, and if you need any more information please let me know.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

拥醉 2024-10-09 14:04:21

你有没有看过为什么 cookie 没有被发送?这不是因为您正在使用负载平衡并且域正在更改吗? Firefox 只允许相同的域访问相同的cookie。

只是一个想法,希望有帮助。

皮特

Have you looked at why the cookies arent being sent? Is this not becuase you are using load balancing and the domain is changing? Firefox only allows the same domain to access the same cookies.

Just an idea, hope it helps.

Pete

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文