Add SplitHTTP Browser Dialer support (#3484)

This commit is contained in:
mmmray 2024-07-11 09:56:20 +02:00 committed by GitHub
parent 308f0c64c3
commit c8f6ba9ff0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 536 additions and 294 deletions

View file

@ -32,7 +32,7 @@ type requestHandler struct {
}
type httpSession struct {
uploadQueue *UploadQueue
uploadQueue *uploadQueue
// for as long as the GET request is not opened by the client, this will be
// open ("undone"), and the session may be expired within a certain TTL.
// after the client connects, this becomes "done" and the session lives as
@ -163,7 +163,7 @@ func (h *requestHandler) ServeHTTP(writer http.ResponseWriter, request *http.Req
writer.Header().Set("X-Accel-Buffering", "no")
// magic header to make the HTTP middle box consider this as SSE to disable buffer
writer.Header().Set("Content-Type", "text/event-stream")
writer.WriteHeader(http.StatusOK)
// send a chunk immediately to enable CDN streaming.
// many CDN buffer the response headers until the origin starts sending