simonwittber / uniwebserver

An embedded HTTP server for Unity3D.
MIT License
76 stars 30 forks source link

Add headers creation in Response constructor #6

Closed romanus closed 5 years ago

romanus commented 5 years ago

Hi guys! Many thanks for your work! I use this server in many projects and it works perfectly. Just wanted to fix an unexpected behavior when adding headers to the Response. It happens when I return JSON object and set the MIME type. The response is object reference not set to an instance of an object with no more info or errors, so it is not easy to guess that the headers object is null.

romanus commented 5 years ago

Just noticed that the same change is in the other pull request #5. So, you can approve only it.