I’m developing a JavaScript library supporting HTTP Streaming and WebSocket, jQuery Stream . I used XDomainRequest to perform HTTP Streaming when user’s browser is IE8+, but there is one problem.
The problem is that user’s session is not maintained and newly generated session is provided instead, because XDomainRequest excludes cookies when sending data to the server. Anyway, finally I found that it can be solved by rewriting URL.
So, I want to know how to rewrite URL to maintain user session in popular server-side technology such as .NET, PHP, Python and Ruby.
For example, in Java Servlet
/event-stream // by cookies
/event-stream;jsessionid=(The value of JSESSIONID contained in cookies) // by rewriting URL
Thanks in advance.
Java
http://download.oracle.com/javaee/5/tutorial/doc/bnagm.html
PHP
http://www.php.net/manual/en/session.idpassing.php
ASP.NET
http://msdn.microsoft.com/en-us/library/aa479315.aspx
Ruby on Rails and Django don’t allow you to pass the session id!
The IE Team said that there are no plans to change this behavior (sending cookies).