mirror of
https://github.com/octoleo/syncthing.git
synced 2025-02-02 11:58:28 +00:00
Return correct content type for /rest/events
This commit is contained in:
parent
e93c766c42
commit
a7a9d7d85c
@ -893,8 +893,10 @@ func (s *apiService) getEvents(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
s.fss.gotEventRequest()
|
s.fss.gotEventRequest()
|
||||||
|
|
||||||
// Flush before blocking, to indicate that we've received the request
|
// Flush before blocking, to indicate that we've received the request and
|
||||||
// and that it should not be retried.
|
// that it should not be retried. Must set Content-Type header before
|
||||||
|
// flushing.
|
||||||
|
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
||||||
f := w.(http.Flusher)
|
f := w.(http.Flusher)
|
||||||
f.Flush()
|
f.Flush()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user