gateway icon indicating copy to clipboard operation
gateway copied to clipboard

headers don't get written if no content or status is written

Open UnquietCode opened this issue 5 years ago • 1 comments
trafficstars

The golang http server will write out on close, just in case nothing was written. Could the End() method be changed to call Write([]byte{}) so that it will trigger the headers and status OK being written?

This is using v2.0.0 of the library.

UnquietCode avatar Nov 08 '20 21:11 UnquietCode

I've just sent a PR with an example of what I mean. :+1: #39

UnquietCode avatar Nov 09 '20 02:11 UnquietCode