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() {
194
194
195
195
it ( 'should answer with correct request header names' , function checkResponse ( done ) {
196
196
var hdr1 = 'test1' ,
197
- hdr2 = 'test2' ;
197
+ hdr2 = 'test2' ,
198
+ cl = '23' ,
199
+ ct = 'text/plain' ;
198
200
199
201
request ( {
200
202
uri : 'http://localhost:' + port ,
201
203
method : 'GET' ,
202
204
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'
205
209
}
206
210
} , function ( err , res , body ) {
207
211
expect ( res . statusCode ) . to . be . equal ( 200 ) ;
@@ -210,6 +214,8 @@ describe('echo Server', function setup() {
210
214
var echo = JSON . parse ( body ) ;
211
215
expect ( echo ) . to . have . deep . property ( 'headers.x-testhdr' , hdr1 ) ;
212
216
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 ) ;
213
219
214
220
done ( err ) ;
215
221
} ) ;
You can’t perform that action at this time.
0 commit comments