Skip to content
Myr

Merge branch 'master' into encoding

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Aaron Heckmann · committed by Aaron Heckmann · parents 4e68705, 5dc152c · Browse files · 3 files+33 added−9 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+33 added−9 removed

  • tests:+17 added−2 removed
  • other:+16 added−7 removed

3 files+33 added−9 removed

modified:lib/express/plugins/cookie.js+16 added-7 removed
modified:lib/support/hamlnot shown

Its text is not shown, modified.

modified:spec/spec.plugins.cookie.js+17 added-2 removed
53 unmodified lines
54 it 'should disregard ad-hoc invalid whitespace'55 var attrs = ' SID = 1232431234234 ; data = foo'56 parseCookie(attrs).should.eql { SID: '1232431234234', data: 'foo' }57 end5859 it 'should support complex quoted values'60 var attrs = 'SID="123456789"; fbs_0011223355="uid=0987654321&name=Test+User"'61 parseCookie(attrs).should.eql { SID: '123456789', fbs_0011223355: 'uid=0987654321&name=Test User' }62 end63 64 it 'should not override when a duplicate key is found'65 var attrs = 'SID=1234; SID=9999'66 parseCookie(attrs).should.eql { SID: '1234' }67 end68 69 it 'should support malformed cookies'70 var attrs = 'SID'71 parseCookie(attrs).should.eql {}72 end73 end74 75 describe 'on'76 describe 'request'
19 unmodified lines
96 this.cookie('SID', '732423sdfs73243', { path: '/', secure: true })97 this.cookie('foo', 'bar')98 return '' 99 })85 get('/user').headers['Set-Cookie'].should.eql 'SID=732423sdfs73243; path=/; secure\nSet-Cookie: foo=bar; path=/'100 get('/user').headers['Set-Cookie'].should.eql 'SID=732423sdfs73243; path=/; secure\r\nSet-Cookie: foo=bar; path=/'101 end102 end103 end104
6 unmodified lines
111 end112 end113 114 end100end115end