mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-22 13:39:50 +00:00
v24.11.30
REALITY NFT: https://opensea.io/assets/ethereum/0x5ee362866001613093361eb8569d59c4141b76d1/2
This commit is contained in:
parent
4f6f12616c
commit
98a72b6fb4
@ -19,7 +19,7 @@ import (
|
|||||||
var (
|
var (
|
||||||
Version_x byte = 24
|
Version_x byte = 24
|
||||||
Version_y byte = 11
|
Version_y byte = 11
|
||||||
Version_z byte = 21
|
Version_z byte = 30
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -159,9 +159,6 @@ func (h *requestHandler) ServeHTTP(writer http.ResponseWriter, request *http.Req
|
|||||||
errors.LogInfoInner(context.Background(), err, "failed to upload (PushReader)")
|
errors.LogInfoInner(context.Background(), err, "failed to upload (PushReader)")
|
||||||
writer.WriteHeader(http.StatusConflict)
|
writer.WriteHeader(http.StatusConflict)
|
||||||
} else {
|
} else {
|
||||||
if request.Header.Get("Content-Type") == "application/grpc" {
|
|
||||||
writer.Header().Set("Content-Type", "application/grpc")
|
|
||||||
}
|
|
||||||
writer.WriteHeader(http.StatusOK)
|
writer.WriteHeader(http.StatusOK)
|
||||||
<-request.Context().Done()
|
<-request.Context().Done()
|
||||||
}
|
}
|
||||||
@ -227,9 +224,7 @@ func (h *requestHandler) ServeHTTP(writer http.ResponseWriter, request *http.Req
|
|||||||
// teeing the response stream into their cache, causing slowdowns.
|
// teeing the response stream into their cache, causing slowdowns.
|
||||||
writer.Header().Set("Cache-Control", "no-store")
|
writer.Header().Set("Cache-Control", "no-store")
|
||||||
|
|
||||||
if request.Header.Get("Content-Type") == "application/grpc" {
|
if !h.config.NoSSEHeader {
|
||||||
writer.Header().Set("Content-Type", "application/grpc")
|
|
||||||
} else if !h.config.NoSSEHeader {
|
|
||||||
// magic header to make the HTTP middle box consider this as SSE to disable buffer
|
// magic header to make the HTTP middle box consider this as SSE to disable buffer
|
||||||
writer.Header().Set("Content-Type", "text/event-stream")
|
writer.Header().Set("Content-Type", "text/event-stream")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user