File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -194,14 +194,18 @@ describe('echo Server', function setup() {
194194
195195 it ( 'should answer with correct request header names' , function checkResponse ( done ) {
196196 var hdr1 = 'test1' ,
197- hdr2 = 'test2' ;
197+ hdr2 = 'test2' ,
198+ cl = '23' ,
199+ ct = 'text/plain' ;
198200
199201 request ( {
200202 uri : 'http://localhost:' + port ,
201203 method : 'GET' ,
202204 headers : {
203- 'x_testhdr' : hdr1 , // XXX: Using underscores because fcgi-handler
204- 'x_test_hdr' : hdr2 // passes hyphens in CGI params
205+ 'x_testhdr' : hdr1 , // XXX: Using underscores because fcgi-handler
206+ 'x_test_hdr' : hdr2 , // passes hyphens in CGI params
207+ 'content-length' : cl ,
208+ 'content-type' : 'text/plain'
205209 }
206210 } , function ( err , res , body ) {
207211 expect ( res . statusCode ) . to . be . equal ( 200 ) ;
@@ -210,6 +214,8 @@ describe('echo Server', function setup() {
210214 var echo = JSON . parse ( body ) ;
211215 expect ( echo ) . to . have . deep . property ( 'headers.x-testhdr' , hdr1 ) ;
212216 expect ( echo ) . to . have . deep . property ( 'headers.x-test-hdr' , hdr2 ) ;
217+ expect ( echo ) . to . have . deep . property ( 'headers.content-length' , cl ) ;
218+ expect ( echo ) . to . have . deep . property ( 'headers.content-type' , ct ) ;
213219
214220 done ( err ) ;
215221 } ) ;
You can’t perform that action at this time.
0 commit comments