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

Setting attachHeadersAsQueryString flag to False breaks long polling #2428

Open
devslam opened this issue Feb 23, 2021 · 4 comments
Open

Setting attachHeadersAsQueryString flag to False breaks long polling #2428

devslam opened this issue Feb 23, 2021 · 4 comments
Assignees

Comments

@devslam
Copy link

devslam commented Feb 23, 2021

Describe the bug
I'm creating a socket with long polling and it works when the attachHeadersAsQueryString flag is set True. However, it breaks when the attachHeadersAsQueryString flag is set True. It sends a request once and does not poll again.

I suspect it's because we're not sending in the ?X-Atmosphere-Transport=long-polling query parameter when the flag is set to False
Atmosphere Info

  • version: 2.4.30
  • atmosphere.js version: 2.3.8-javascript

Expected behavior
I'm expecting long polling to work when I set the attachHeadersAsQueryString flag to False. However it does not. I'm expecting it to poll consistently. It sends a request once and does not poll again.

It's my understanding that setting the flag to False would still send in query parameters that are required for long polling to work; it would not send in "debug/informational" headers as a query string

Note: Long polling works when the attachHeadersAsQueryString flag is set to True

Screenshots
If you look at the screenshots here. The X-Atmosphere-Transport=long-polling query parameter isn't being passed in when the attachHeadersAsQueryString flag is set to True

Flag set to True

image
Flag set to False
image

Systems (please complete the following information):

  • OS: macOS
  • Browser name and version: Chrome 88
  • Java version and distribution: Java 8
  • Server name and version: Tomcat 7.0.94

Additional context
The reason why I'm setting the attachHeadersAsQueryString flag to False is because I don't think it's necessary to send in the following headers as query strings
X-Atmosphere-tracking-id=*************
X-Atmosphere-Framework=2.3.8-javascript
X-atmo-protocol=true

@jfarcand
Copy link
Member

@devslam Are you able to reproduce with the latest version of Atmosphere? 2.4 is old...

@devslam
Copy link
Author

devslam commented Feb 27, 2021

@devslam Are you able to reproduce with the latest version of Atmosphere? 2.4 is old...

I'll try it. Though shouldn't I be trying to reproduce it with the latest version of the JS library?

@devslam
Copy link
Author

devslam commented Mar 5, 2021

I'm able to reproduce this with Atmosphere 2.6.4 and Atmosphere.js 3.0.6. It seems like the issue would be with the JS library b/c it's not sending the X-Atmosphere-Transport=long-polling query parameter when attachHeadersAsQueryString is set to false

@dsr41918
Copy link

dsr41918 commented Jun 20, 2024

@jfarcand I am also facing the same issue even when setting the fallbackTransport to streaming also. We request to provide inputs on this on priority

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

3 participants