Skip to content

Commit

Permalink
Don't start form-post with &
Browse files Browse the repository at this point in the history
Some webservers don't deal with it well.
  • Loading branch information
cedrichan committed Aug 28, 2014
1 parent b679853 commit 854c231
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pusher_authorizer.js
Expand Up @@ -9,7 +9,7 @@

Pusher.Channel.Authorizer.prototype = {
composeQuery: function(socketId) {
var query = '&socket_id=' + encodeURIComponent(socketId) +
var query = 'socket_id=' + encodeURIComponent(socketId) +
'&channel_name=' + encodeURIComponent(this.channel.name);

for(var i in this.authOptions.params) {
Expand Down Expand Up @@ -90,6 +90,7 @@
script.src = this.options.authEndpoint +
'?callback=' +
encodeURIComponent(callback_name) +
'&' +
this.composeQuery(socketId);

var head = document.getElementsByTagName("head")[0] || document.documentElement;
Expand Down

0 comments on commit 854c231

Please sign in to comment.