@@ -59,23 +59,6 @@ describe('request stream length', function() {
59
59
} )
60
60
} )
61
61
62
- if ( node_major_ver >= 10 ) {
63
- it ( 'returns 400 if Transfer-Encoding is set to a blank string' , function ( done ) {
64
- send_request ( { headers : { 'Transfer-Encoding' : '' } } , function ( err , resp ) {
65
- should . not . exist ( err ) ;
66
- resp . statusCode . should . eql ( 400 ) ;
67
- done ( )
68
- } )
69
- } )
70
- } else {
71
- it ( 'doesnt work if Transfer-Encoding is set to a blank string' , function ( done ) {
72
- send_request ( { headers : { 'Transfer-Encoding' : '' } } , function ( err , resp ) {
73
- err . code . should . eql ( 'ECONNRESET' ) ;
74
- done ( )
75
- } )
76
- } )
77
- }
78
-
79
62
it ( 'works if Transfer-Encoding is not set' , function ( done ) {
80
63
send_request ( { } , function ( err , resp ) {
81
64
should . not . exist ( err ) ;
@@ -86,45 +69,6 @@ describe('request stream length', function() {
86
69
87
70
} )
88
71
89
- describe ( 'stream_length set to invalid value' , function ( ) {
90
-
91
- if ( node_major_ver >= 10 ) {
92
-
93
- it ( 'returns 400 if Transfer-Encoding is set to a blank string' , function ( done ) {
94
- send_request ( { stream_length : 5 , headers : { 'Transfer-Encoding' : '' } } , function ( err , resp ) {
95
- should . not . exist ( err ) ;
96
- resp . statusCode . should . eql ( 400 ) ;
97
- done ( )
98
- } )
99
- } )
100
-
101
- it ( 'returns 400 if Transfer-Encoding is not set' , function ( done ) {
102
- send_request ( { stream_length : 5 } , function ( err , resp ) {
103
- should . not . exist ( err ) ;
104
- resp . statusCode . should . eql ( 400 ) ;
105
- done ( )
106
- } )
107
- } )
108
-
109
- } else {
110
-
111
- it ( 'doesnt work if Transfer-Encoding is set to a blank string' , function ( done ) {
112
- send_request ( { stream_length : 5 , headers : { 'Transfer-Encoding' : '' } } , function ( err , resp ) {
113
- err . code . should . eql ( 'ECONNRESET' ) ;
114
- done ( )
115
- } )
116
- } )
117
- it ( 'doesnt work if Transfer-Encoding is not set' , function ( done ) {
118
- send_request ( { stream_length : 5 } , function ( err , resp ) {
119
- err . code . should . eql ( 'ECONNRESET' ) ;
120
- done ( )
121
- } )
122
- } )
123
-
124
- }
125
-
126
- } )
127
-
128
72
describe ( 'stream_length is set to valid value' , function ( ) {
129
73
130
74
it ( 'sets Content-Length header to that value' , function ( done ) {
@@ -206,23 +150,6 @@ describe('request stream length', function() {
206
150
} )
207
151
} )
208
152
209
- if ( node_major_ver >= 10 ) {
210
- it ( 'returns 400 if Transfer-Encoding is set to a blank string' , function ( done ) {
211
- send_request ( { stream_length : 0 , headers : { 'Transfer-Encoding' : '' } } , function ( err , resp ) {
212
- should . not . exist ( err ) ;
213
- resp . statusCode . should . eql ( 400 ) ;
214
- done ( )
215
- } )
216
- } )
217
- } else {
218
- it ( 'throws ECONNRESET if Transfer-Encoding is set to a blank string' , function ( done ) {
219
- send_request ( { stream_length : 0 , headers : { 'Transfer-Encoding' : '' } } , function ( err , resp ) {
220
- err . code . should . eql ( 'ECONNRESET' ) ;
221
- done ( )
222
- } )
223
- } )
224
- }
225
-
226
153
it ( 'works if Transfer-Encoding is not set' , function ( done ) {
227
154
send_request ( { stream_length : 0 } , function ( err , resp ) {
228
155
should . not . exist ( err ) ;
0 commit comments