Closed dongmuni-rankwave closed 5 years ago
Excellent point! Yeah, I totally agree - now fixed in https://github.com/httptoolkit/mockttp/commit/d3a450e87fc453a0df2f7931dd25590f0fd1e0e8. I've got a few other changes to include soon, but this'll get shipped in the next release.
Thanks for the report, great suggestion :+1:
Thank you for your quick handling. I hope you have a happy day.
Now published as v0.14.2
Good!
Thank you for making a good library first. There was work to test the HTTPS MITM related logic, and I use it very well. But there was one thing that made me sad.
In order to respond to multiple HTTP headers with the same name, I assigned the value of the header to array[], and see that they are combined into one header and the value is separated by a comma(',').
I checked the request-util.ts code and found it to be 'value.toString()'.
So when I removed '.toString()' and tested it, I found that it is normally divided into three headers.
response.setHeader(header, value);