gate
gate copied to clipboard
Set FlushInterval when initializing httputil.ReverseProxy
Due to httputil.ReverseProxy's buffering behavior, I have to wait before HTTP 1.1 Transfer-Encoding: chunked response to start being sent. Setting FlushInterval to httputil.ReverseProxy solves this issue.
Hard-coding the flush interval of 500ms may be arguable.
Note: due to martini-contrib/oauth2's incompatible changes, this branch can't be merged to current master...