Fix for #535 ExtraHeaders doesn't work in browser#536
Merged
darrachequesne merged 3 commits intosocketio:masterfrom Feb 1, 2017
lu4:FixForIssue535
Merged
Fix for #535 ExtraHeaders doesn't work in browser#536darrachequesne merged 3 commits intosocketio:masterfrom lu4:FixForIssue535
darrachequesne merged 3 commits intosocketio:masterfrom
lu4:FixForIssue535
Conversation
Member
|
Great catch, thanks! I've just reverted the change to the output file engine.io.js, as it is automatically generated. |
2 tasks
Contributor
Author
|
Thanks, yeah I was unsure if that was necessary move, so created a separate commit, Regards, |
Member
|
@lu4 out of curiosity, in your example here: let engine = engineio({
transportOptions: {
polling: {
extraHeaders: {
'X-TEST': 'ZZZ'
}
}
}
});Won't the |
Contributor
Author
|
It wasn't my case, everything were working smoothly, no option request was generated... I didn't mean to use any predefined headers, just a first thing that came of my head... |
sgress454
added a commit
to sgress454/socket.io-client
that referenced
this pull request
Feb 16, 2017
Includes the following (from engine.io-client changelog): * [chore] Bump ws to version 1.1.2 (vulnerability fix) ([socketio#539](socketio/engine.io-client#539)) * [fix] Fix extraHeaders option in browser ([socketio#536](socketio/engine.io-client#536))
5 tasks
darrachequesne
pushed a commit
to socketio/socket.io-client
that referenced
this pull request
Feb 16, 2017
Includes the following (from engine.io-client changelog): * [chore] Bump ws to version 1.1.2 (vulnerability fix) ([#539](socketio/engine.io-client#539)) * [fix] Fix extraHeaders option in browser ([#536](socketio/engine.io-client#536))
enderson-pan
pushed a commit
to holytiny/feathersjs-wxmp-socket.io-client
that referenced
this pull request
Nov 1, 2019
Includes the following (from engine.io-client changelog): * [chore] Bump ws to version 1.1.2 (vulnerability fix) ([#539](socketio/engine.io-client#539)) * [fix] Fix extraHeaders option in browser ([#536](socketio/engine.io-client#536))
sunrise30
added a commit
to sunrise30/socket.io-client
that referenced
this pull request
Jan 8, 2022
Includes the following (from engine.io-client changelog): * [chore] Bump ws to version 1.1.2 (vulnerability fix) ([#539](socketio/engine.io-client#539)) * [fix] Fix extraHeaders option in browser ([#536](socketio/engine.io-client#536))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The kind of change this PR does introduce
Current behaviour
xhr.setDisableHeaderCheck is not introduced in some browsers so engine.io fails to set extraHeaders which makes feature #519 to fail.
New behaviour
xhr.setDisableHeaderCheck is checked to exist before call, in case if any secure headers are modified, browser throws error to prevent fraud.
Other information (e.g. related issues)
Please provide feedback in case if any PR rules are violated