Skip to content

Commit

Permalink
3.14.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Presman committed Mar 10, 2016
1 parent ab993e9 commit 314c14c
Show file tree
Hide file tree
Showing 25 changed files with 68 additions and 35 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

3-10-16 * 3.14.3
- add support of passing headers via proxy

3-1-16 * 3.14.0
- introduction of keychain class to support internal storage of key
- refactoring of origin calculations and handling
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ PubNub for JavaScript Docs have been moved to: http://www.pubnub.com/docs/javasc
## CDN Links

#### HTTP
* http://cdn.pubnub.com/pubnub-3.14.2.min.js
* http://cdn.pubnub.com/pubnub-3.14.2.js
* http://cdn.pubnub.com/pubnub-3.14.3.min.js
* http://cdn.pubnub.com/pubnub-3.14.3.js

#### HTTPS
* https://cdn.pubnub.com/pubnub-3.14.2.min.js
* https://cdn.pubnub.com/pubnub-3.14.2.js
* https://cdn.pubnub.com/pubnub-3.14.3.min.js
* https://cdn.pubnub.com/pubnub-3.14.3.js
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.14.2
3.14.3
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pubnub",
"version": "3.14.2",
"version": "3.14.3",
"main": "web/dist/pubnub.min.js",
"license": "https://github.com/pubnub/javascript/blob/master/LICENSE",
"ignore" : [ "**/*", "!web/dist/pubnub.js", "!web/dist/pubnub.min.js", "!web/pubnub.js", "!web/pubnub.min.js"],
Expand Down
4 changes: 2 additions & 2 deletions modern/dist/pubnub.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! 3.14.2 / modern */
/*! 3.14.3 / modern */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
Expand Down Expand Up @@ -406,7 +406,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = {
"name": "pubnub",
"preferGlobal": false,
"version": "3.14.2",
"version": "3.14.3",
"author": "PubNub <support@pubnub.com>",
"description": "Publish & Subscribe Real-time Messaging with PubNub",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion modern/dist/pubnub.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions modern/pubnub.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! 3.14.2 / modern */
/*! 3.14.3 / modern */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
Expand Down Expand Up @@ -406,7 +406,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = {
"name": "pubnub",
"preferGlobal": false,
"version": "3.14.2",
"version": "3.14.3",
"author": "PubNub <support@pubnub.com>",
"description": "Publish & Subscribe Real-time Messaging with PubNub",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion modern/pubnub.min.js

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion node.js/lib/xdr.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,22 @@ function xdr(PNSDK, proxy, keepaliveEnabled, keepAliveAgent, keepAliveAgentSSL,

var origin = setup.url[0].split('//')[1];

var headers = null;

if (proxy) {
headers = {
Host: origin
};

if (proxy.headers) {
_.extend(headers, proxy.headers);
}
}

options.hostname = proxy ? proxy.hostname : setup.url[0].split('//')[1];
options.port = proxy ? proxy.port : ssl ? 443 : 80;
options.path = proxy ? 'http://' + origin + url : url;
options.headers = proxy ? { Host: origin } : null;
options.headers = headers;
options.method = mode;
options.keepAlive = !!keepaliveEnabled;
options.body = payload;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pubnub",
"preferGlobal": false,
"version": "3.14.2",
"version": "3.14.3",
"author": "PubNub <support@pubnub.com>",
"description": "Publish & Subscribe Real-time Messaging with PubNub",
"contributors": [
Expand Down
4 changes: 2 additions & 2 deletions parse/dist/pubnub.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! 3.14.2 / parse */
/*! 3.14.3 / parse */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("crypto"), require("buffer"));
Expand Down Expand Up @@ -288,7 +288,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = {
"name": "pubnub",
"preferGlobal": false,
"version": "3.14.2",
"version": "3.14.3",
"author": "PubNub <support@pubnub.com>",
"description": "Publish & Subscribe Real-time Messaging with PubNub",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion parse/dist/pubnub.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions phonegap/dist/pubnub.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! 3.14.2 / phonegap */
/*! 3.14.3 / phonegap */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
Expand Down Expand Up @@ -406,7 +406,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = {
"name": "pubnub",
"preferGlobal": false,
"version": "3.14.2",
"version": "3.14.3",
"author": "PubNub <support@pubnub.com>",
"description": "Publish & Subscribe Real-time Messaging with PubNub",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion phonegap/dist/pubnub.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions sencha/dist/pubnub.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! 3.14.2 / sencha */
/*! 3.14.3 / sencha */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
Expand Down Expand Up @@ -406,7 +406,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = {
"name": "pubnub",
"preferGlobal": false,
"version": "3.14.2",
"version": "3.14.3",
"author": "PubNub <support@pubnub.com>",
"description": "Publish & Subscribe Real-time Messaging with PubNub",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion sencha/dist/pubnub.min.js

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions test/server/unit/impl/node.js/xdr.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,5 +161,23 @@ describe('#xdr', function () {
body: ''
});
});

it('support additional headers', function () {
var proxy = { hostname: 'moose.com', port: 1337, headers: { h1: 'header1', h2: 'header2' } };
var xdrInstance = XDR.createInstance('testing1', proxy, false);
var xdrSetup = { data: {}, ssl: true, url: ['https://pubsub.pubnub.com', 'time', 0] };

xdrInstance.request(xdrSetup);

assert.deepEqual(httpsMock.args[0][0], {
hostname: 'moose.com',
port: 1337,
path: 'http://pubsub.pubnub.com/time/0?pnsdk=testing1',
headers: { Host: 'pubsub.pubnub.com', h1: 'header1', h2: 'header2' },
method: 'GET',
keepAlive: false,
body: ''
});
});
});
});
4 changes: 2 additions & 2 deletions titanium/dist/pubnub.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! 3.14.2 / titanium */
/*! 3.14.3 / titanium */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
Expand Down Expand Up @@ -685,7 +685,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = {
"name": "pubnub",
"preferGlobal": false,
"version": "3.14.2",
"version": "3.14.3",
"author": "PubNub <support@pubnub.com>",
"description": "Publish & Subscribe Real-time Messaging with PubNub",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion titanium/dist/pubnub.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions web/dist/pubnub.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! 3.14.2 / web */
/*! 3.14.3 / web */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
Expand Down Expand Up @@ -804,7 +804,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = {
"name": "pubnub",
"preferGlobal": false,
"version": "3.14.2",
"version": "3.14.3",
"author": "PubNub <support@pubnub.com>",
"description": "Publish & Subscribe Real-time Messaging with PubNub",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion web/dist/pubnub.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions web/pubnub.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! 3.14.2 / web */
/*! 3.14.3 / web */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
Expand Down Expand Up @@ -804,7 +804,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = {
"name": "pubnub",
"preferGlobal": false,
"version": "3.14.2",
"version": "3.14.3",
"author": "PubNub <support@pubnub.com>",
"description": "Publish & Subscribe Real-time Messaging with PubNub",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion web/pubnub.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions webos/dist/pubnub.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! 3.14.2 / webos */
/*! 3.14.3 / webos */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
Expand Down Expand Up @@ -406,7 +406,7 @@ return /******/ (function(modules) { // webpackBootstrap
module.exports = {
"name": "pubnub",
"preferGlobal": false,
"version": "3.14.2",
"version": "3.14.3",
"author": "PubNub <support@pubnub.com>",
"description": "Publish & Subscribe Real-time Messaging with PubNub",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion webos/dist/pubnub.min.js

Large diffs are not rendered by default.

0 comments on commit 314c14c

Please sign in to comment.