mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-17 20:44:38 +03:00
fix ws early data compatibility (#585)
This commit is contained in:
@@ -21,11 +21,7 @@ namespace NekoRay::fmt {
|
|||||||
}
|
}
|
||||||
if (ws_early_data_length > 0) {
|
if (ws_early_data_length > 0) {
|
||||||
transport["max_early_data"] = ws_early_data_length;
|
transport["max_early_data"] = ws_early_data_length;
|
||||||
if (ws_early_data_name.isEmpty()) {
|
transport["early_data_header_name"] = ws_early_data_name;
|
||||||
transport["early_data_header_name"] = "Sec-WebSocket-Protocol";
|
|
||||||
} else {
|
|
||||||
transport["early_data_header_name"] = ws_early_data_name;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else if (network == "http") {
|
} else if (network == "http") {
|
||||||
if (!path.isEmpty()) transport["path"] = path;
|
if (!path.isEmpty()) transport["path"] = path;
|
||||||
|
|||||||
@@ -26,11 +26,7 @@ namespace NekoRay::fmt {
|
|||||||
}
|
}
|
||||||
if (ws_early_data_length > 0) {
|
if (ws_early_data_length > 0) {
|
||||||
ws["maxEarlyData"] = ws_early_data_length;
|
ws["maxEarlyData"] = ws_early_data_length;
|
||||||
if (ws_early_data_name.isEmpty()) {
|
ws["earlyDataHeaderName"] = ws_early_data_name;
|
||||||
ws["earlyDataHeaderName"] = "Sec-WebSocket-Protocol";
|
|
||||||
} else {
|
|
||||||
ws["earlyDataHeaderName"] = ws_early_data_name;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
streamSettings["wsSettings"] = ws;
|
streamSettings["wsSettings"] = ws;
|
||||||
} else if (network == "http") {
|
} else if (network == "http") {
|
||||||
|
|||||||
Reference in New Issue
Block a user