0
mirror of https://github.com/XTLS/Xray-core.git synced 2025-06-14 12:29:36 +03:00

SplitHTTP: Remove ok compatibility logic (#3753)

Remove some code that was added to maintain compatibility with older
Xray versions. This breaks compatibility with Xray-core v1.8.23 or older.
This commit is contained in:
mmmray
2024-09-03 04:25:15 +02:00
committed by GitHub
parent f1c439c2aa
commit ab3c00e96b
3 changed files with 1 additions and 59 deletions

View File

@ -196,14 +196,6 @@ func (h *requestHandler) ServeHTTP(writer http.ResponseWriter, request *http.Req
h.config.WriteResponseHeader(writer)
writer.WriteHeader(http.StatusOK)
if _, ok := request.URL.Query()["x_padding"]; !ok {
// in earlier versions, this initial body data was used to immediately
// start a 200 OK on all CDN. but xray client since 1.8.16 does not
// actually require an immediate 200 OK, but now requires these
// additional bytes "ok". xray client 1.8.24+ doesn't require "ok"
// anymore, and so this line should be removed in later versions.
writer.Write([]byte("ok"))
}
responseFlusher.Flush()