Skip to content

Commit

Permalink
fix ws early data compatibility (MatsuriDayo#585)
Browse files Browse the repository at this point in the history
  • Loading branch information
hzdrro authored May 15, 2023
1 parent 4fd00cc commit 9f21603
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions fmt/Bean2CoreObj_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 1 addition & 5 deletions fmt/Bean2CoreObj_ray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down

0 comments on commit 9f21603

Please sign in to comment.