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

Fragment identifiers are not allowed in WebSocket URLs #31

Open
ruzkant opened this issue Jan 11, 2020 · 0 comments · May be fixed by #32
Open

Fragment identifiers are not allowed in WebSocket URLs #31

ruzkant opened this issue Jan 11, 2020 · 0 comments · May be fixed by #32

Comments

@ruzkant
Copy link

ruzkant commented Jan 11, 2020

The ServerBuilder has this default line:

	private URL urlBuilder = new URL(DomGlobal.window.location.getHref());

So that clients only need to set the path by default:

builder.setPath("my-app");

But urls with fragments like this fail:
http://localhost:8080/my-app/#myfragment

So imagine someone uses something like Nalu with the hash fragments and refreshes the browser.

You will get an error like this:

(SyntaxError) : Failed to construct 'WebSocket': The URL contains a fragment identifier ('myfragment?checksum=6804f2dc783c239cc63a2fc3138dcc28cd1f06d824a8bb1f07f7bc50028dcf10e7e069d2184de800'). Fragment identifiers are not allowed in WebSocket URLs.

Default value should ideally exclude fragments.

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

Successfully merging a pull request may close this issue.

1 participant