Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long Polling transport closed immediatelly #14

Closed
marjan-sterjev opened this issue May 22, 2012 · 1 comment
Closed

Long Polling transport closed immediatelly #14

marjan-sterjev opened this issue May 22, 2012 · 1 comment

Comments

@marjan-sterjev
Copy link

Hi,
I’m experiencing a problem with the long-polling transport in NettoSphere 1.3.2 and Atmosphere 0.9.3. The application I’m testing against is the Jersey Chat that is suggested as demo for this framework. Web Sockets are ok. However whey trying with an older Firefox and (or) IE 9 the debug output is something like this:
GET /chat?=1337663553296 HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.28) Gecko/20120306 Firefox/3.6.28
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,
/;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,
;q=0.7
Keep-Alive: 115
Connection: keep-alive
X-Atmosphere-Framework: 0.9
X-Atmosphere-Transport: long-polling
X-Cache-Date: 0
Content-Type: text/plain
X-Atmosphere-tracking-id: 6770bbf9-39cf-a838-ae9e-3238f4b2e0ed
Referer: http://localhost:8080/index.html
07:12:35.366 [New I/O worker #5] DEBUG o.a.container.NettyCometSupport - Suspending response: AtmosphereResponse{cookies=[], headers={Access-Control-Allow-Origin=_, Transfer-Encoding=chunked, Expires=-1, Access-Control-Allow-Credentials=true, Connection=Keep-Alive, Server=Nettosphere-1.3.2, Pragma=no-cache, Cache-Control=no-store, no-cache, must-revalidate}, asyncIOWriter=org.atmosphere.nettosphere.ChannelAsyncIOWriter@5dd7bc5, status=200, statusMessage='OK', charSet='UTF-8', contentLength=-1, contentType='text/html', isCommited=false, locale=null, headerHandled=false, atmosphereRequest=AtmosphereRequest{ contextPath= servletPath= pathInfo=/event/A requestURI=/event/A requestURL=http://localhost:8080/chat destroyable=false}, writeStatusAndHeader=true, delegateToNativeResponse=false, destroyable=true, response=org.atmosphere.cpr.AtmosphereResponse$DummyHttpServletResponse@4883d37a}
07:12:35.382 [New I/O worker #5] DEBUG o.a.cpr.AsynchronousProcessor - Cancelling the connection for request AtmosphereRequest{ contextPath= servletPath= pathInfo=/chat requestURI=/chat requestURL=http://localhost:8080/chat destroyable=false}
When I debug I can see that the method handleHttp in the class NettyAtmosphereHandler (line 297) contains the following logic:
String transport = (String) r.getAttribute(FrameworkConfig.TRANSPORT_IN_USE);
if (transport != null && transport.equalsIgnoreCase(HeaderConfig.STREAMING_TRANSPORT)) {
keptOpen = true;
} else if (transport != null && transport.equalsIgnoreCase(HeaderConfig.LONG_POLLING_TRANSPORT)) {
resumeOnBroadcast = true;
}

The transport variable here is null and the connection is closed at the end.

BR

@jfarcand
Copy link
Member

jfarcand commented Jun 1, 2012

Fixed. Apology I've missed the issue. This is now fixed.

@jfarcand jfarcand closed this as completed Jun 1, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants