The request object has all header names in lower case, but the code uses Capital case.
req.headers['Content-Type'] = ...
This will result in the same header being appended. I.e. it ends up with 'Content-Type' and 'content-type'.
The fix should be to assign the header using the lower-case name.
n.b. setHeader(.., ..) method is not available on the IncomingRequest type.
Lines #137 and #141
The request object has all header names in lower case, but the code uses Capital case.
req.headers['Content-Type'] = ...
This will result in the same header being appended. I.e. it ends up with 'Content-Type' and 'content-type'. The fix should be to assign the header using the lower-case name.
n.b. setHeader(.., ..) method is not available on the IncomingRequest type.