bbyars / mountebank

Over the wire test doubles
http://www.mbtest.org
MIT License
2k stars 262 forks source link

Connection closed when both http headers transfer-encoding as chunked and content-length sent together #770

Open naveengowda0623 opened 3 months ago

naveengowda0623 commented 3 months ago

Expected behaviour

Mountebank source code should accept the request connection and send response appropriately

Actual behaviour

Mountebank connection gets closed even before it reaches the actual imposters

Steps to reproduce

Send http/https POST request with transfer-encoding: "chunked" and content-length: null

Software versions used

OS         : Mac OS and Linux
mountebank : 2.8.1
node.js    :16.15.0
  (only if installed via npm)
Installation method :npm
  (npm, zip, tar, pkg, deb, rpm)

Log contents in mb.log when running mb --loglevel debug

debug: [https:2561 OCV] ::1:51949 ESTABLISHED
debug: [https:2561 OCV] ::1:51949 CLOSED
debug: [https:2561 OCV] ::1:52035 ESTABLISHED
debug: [https:2561 OCV] ::1:52036 ESTABLISHED
debug: [https:2561 OCV] ::1:52035 CLOSED
debug: [https:2561 OCV] ::1:52036 CLOSED