File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -251,10 +251,6 @@ export function getBodyEncoding (req: CyHttpMessages.IncomingRequest): BodyEncod
251251 if ( contentType . includes ( 'charset=utf-8' ) || contentType . includes ( 'charset="utf-8"' ) ) {
252252 return 'utf8'
253253 }
254-
255- if ( contentType . includes ( 'multipart/form-data' ) ) {
256- return 'binary'
257- }
258254 }
259255
260256 // with fallback to inspecting the buffer using
Original file line number Diff line number Diff line change @@ -69,19 +69,5 @@ describe('net-stubbing util', () => {
6969
7070 expect ( getBodyEncoding ( req ) , 'image' ) . to . equal ( 'binary' )
7171 } )
72-
73- it ( 'returns binary for form-data bodies' , ( ) => {
74- const formDataRequest = {
75- body : Buffer . from ( 'hello world' ) ,
76- headers : {
77- 'content-type' : 'multipart/form-data' ,
78- } ,
79- method : 'POST' ,
80- url : 'somewhere' ,
81- httpVersion : '1.1' ,
82- }
83-
84- expect ( getBodyEncoding ( formDataRequest ) ) . to . equal ( 'binary' )
85- } )
8672 } )
8773} )
You can’t perform that action at this time.
0 commit comments