mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 17:38:41 +00:00
Add SplitHTTP Browser Dialer support (#3484)
This commit is contained in:
parent
308f0c64c3
commit
c8f6ba9ff0
11 changed files with 536 additions and 294 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue