in shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-websocket/src/main/java/org/apache/shenyu/plugin/websocket/WebSocketPlugin.java [148:185]
private static CloseStatus adaptCloseStatus(final CloseStatus closeStatus) {
int code = closeStatus.getCode();
if (code > 2999 && code < 5000) {
return closeStatus;
}
switch (code) {
case 1000:
case 1001:
case 1002:
case 1003:
case 1007:
case 1008:
case 1009:
case 1010:
case 1011:
return closeStatus;
case 1004:
// Should not be used in a close frame
// RESERVED;
case 1005:
// Should not be used in a close frame
// return CloseStatus.NO_STATUS_CODE;
case 1006:
// Should not be used in a close frame
// return CloseStatus.NO_CLOSE_FRAME;
case 1012:
// Not in RFC6455
// return CloseStatus.SERVICE_RESTARTED;
case 1013:
// Not in RFC6455
// return CloseStatus.SERVICE_OVERLOAD;
case 1015:
// Should not be used in a close frame
// return CloseStatus.TLS_HANDSHAKE_FAILURE;
default:
return CloseStatus.PROTOCOL_ERROR;
}
}