Comparing version
@@ -0,0 +0,0 @@ // Load modules |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ // Example serves a favicon.ico file that is cached on the client for a day |
@@ -0,0 +0,0 @@ // Load modules |
@@ -0,0 +0,0 @@ // Load modules |
@@ -0,0 +0,0 @@ // Load modules |
@@ -0,0 +0,0 @@ // Load modules |
@@ -0,0 +0,0 @@ // Load modules |
@@ -0,0 +0,0 @@ // Load modules |
@@ -0,0 +0,0 @@ // Load modules |
@@ -0,0 +0,0 @@ // Load modules |
@@ -0,0 +0,0 @@ // Load modules |
@@ -0,0 +0,0 @@ // Load modules |
@@ -55,3 +55,4 @@ // Load modules | ||
method: request.method, | ||
headers: {} | ||
headers: {}, | ||
jar: false | ||
}; | ||
@@ -58,0 +59,0 @@ |
@@ -0,0 +0,0 @@ // Load modules |
@@ -0,0 +0,0 @@ // Load modules |
@@ -75,5 +75,18 @@ // Load modules | ||
if (responseHeaders) { | ||
var locaHeaders = this._headers; | ||
var localCookies = Utils.clone(this._headers['Set-Cookie']); | ||
var localHeaders = this._headers; | ||
this._headers = Utils.clone(responseHeaders); | ||
Utils.merge(this._headers, locaHeaders); | ||
Utils.merge(this._headers, localHeaders); | ||
if (localCookies) { | ||
var headerKeys = Object.keys(responseHeaders); | ||
for (var i = 0, il = headerKeys.length; i < il; ++i) { | ||
if (headerKeys[i].toLowerCase() === 'set-cookie') { | ||
delete this._headers[headerKeys[i]]; | ||
this._headers['Set-Cookie'] = [].concat(responseHeaders[headerKeys[i]]).concat(localCookies); | ||
break; | ||
} | ||
}; | ||
} | ||
} | ||
@@ -80,0 +93,0 @@ } |
@@ -0,0 +0,0 @@ // Load modules |
@@ -0,0 +0,0 @@ // Load modules |
@@ -0,0 +0,0 @@ // Load modules |
@@ -0,0 +0,0 @@ // Load modules |
@@ -5,3 +5,3 @@ { | ||
"homepage": "http://hapijs.com", | ||
"version": "0.15.7", | ||
"version": "0.15.8", | ||
"author": { | ||
@@ -8,0 +8,0 @@ "name": "Eran Hammer", |
@@ -0,0 +0,0 @@ <a href="https://github.com/spumko"><img src="https://raw.github.com/spumko/spumko/master/images/from.png" align="right" /></a> |
@@ -0,0 +0,0 @@ // Load modules |
@@ -0,0 +0,0 @@ // Load modules |
@@ -0,0 +0,0 @@ // Load modules |
@@ -0,0 +0,0 @@ // Load modules |
@@ -0,0 +0,0 @@ // Declare internals |
@@ -0,0 +0,0 @@ // Declare internals |
@@ -0,0 +0,0 @@ // Declare internals |
@@ -0,0 +0,0 @@ // Plugin registration |
@@ -0,0 +0,0 @@ // Declare internals |
@@ -39,6 +39,12 @@ // Load modules | ||
this.reply({ | ||
if (this.state.test) { | ||
return this.reply('error'); | ||
} | ||
this.reply.payload({ | ||
'id': 'fa0dbda9b1b', | ||
'name': 'John Doe' | ||
}); | ||
}) | ||
.state('test', '123') | ||
.send(); | ||
}; | ||
@@ -155,2 +161,3 @@ | ||
server.state('auto', { autoValue: 'xyz' }); | ||
server.start(function () { | ||
@@ -178,3 +185,4 @@ | ||
form: options.form, | ||
headers: options.headers | ||
headers: options.headers, | ||
jar: false | ||
}, next); | ||
@@ -189,3 +197,10 @@ } | ||
expect(rawRes.body).to.contain('John Doe'); | ||
done(); | ||
expect(rawRes.headers['set-cookie']).to.deep.equal(['test=123','auto=xyz']); | ||
makeRequest({ path: '/profile' }, function (rawRes) { | ||
expect(rawRes.statusCode).to.equal(200); | ||
expect(rawRes.body).to.contain('John Doe'); | ||
done(); | ||
}); | ||
}); | ||
@@ -192,0 +207,0 @@ }); |
@@ -0,0 +0,0 @@ // Load modules |
@@ -0,0 +0,0 @@ // Load modules |
@@ -0,0 +0,0 @@ // Load modules |
@@ -0,0 +0,0 @@ // Load modules |
@@ -0,0 +0,0 @@ // Load modules |
@@ -0,0 +0,0 @@ // Load modules |
@@ -0,0 +0,0 @@ // Load modules |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
13329
0.18%788653
-1.57%