fix ws early data compatibility (#585)

This commit is contained in:
hzdrro
2023-05-15 08:10:48 +08:00
committed by GitHub
parent 4fd00cca33
commit 9f21603d0a
2 changed files with 2 additions and 10 deletions

View File

@@ -21,11 +21,7 @@ namespace NekoRay::fmt {
}
if (ws_early_data_length > 0) {
transport["max_early_data"] = ws_early_data_length;
if (ws_early_data_name.isEmpty()) {
transport["early_data_header_name"] = "Sec-WebSocket-Protocol";
} else {
transport["early_data_header_name"] = ws_early_data_name;
}
transport["early_data_header_name"] = ws_early_data_name;
}
} else if (network == "http") {
if (!path.isEmpty()) transport["path"] = path;

View File

@@ -26,11 +26,7 @@ namespace NekoRay::fmt {
}
if (ws_early_data_length > 0) {
ws["maxEarlyData"] = ws_early_data_length;
if (ws_early_data_name.isEmpty()) {
ws["earlyDataHeaderName"] = "Sec-WebSocket-Protocol";
} else {
ws["earlyDataHeaderName"] = ws_early_data_name;
}
ws["earlyDataHeaderName"] = ws_early_data_name;
}
streamSettings["wsSettings"] = ws;
} else if (network == "http") {