Merge 8ce2274d3b into b4834a7d6d
This commit is contained in:
commit
10af4d10a7
@ -124,6 +124,13 @@ reassemble the fragments to receive the complete message.
|
|||||||
Only a single fragmented message can be transmitted at a time, but it may
|
Only a single fragmented message can be transmitted at a time, but it may
|
||||||
be interrupted by CURLWS_CLOSE, CURLWS_PING or CURLWS_PONG frames.
|
be interrupted by CURLWS_CLOSE, CURLWS_PING or CURLWS_PONG frames.
|
||||||
|
|
||||||
|
## CURLWS_FIN
|
||||||
|
|
||||||
|
This flag is set when the FIN bit is present in the received WebSocket frame.
|
||||||
|
In WebSocket protocol, the FIN bit indicates that this frame is the final
|
||||||
|
frame of the message. When CURLWS_FIN is set, it means no further frames
|
||||||
|
follow for this message.
|
||||||
|
|
||||||
# %PROTOCOLS%
|
# %PROTOCOLS%
|
||||||
|
|
||||||
# EXAMPLE
|
# EXAMPLE
|
||||||
|
|||||||
@ -1146,6 +1146,7 @@ CURLWARNING 7.66.0
|
|||||||
CURLWS_BINARY 7.86.0
|
CURLWS_BINARY 7.86.0
|
||||||
CURLWS_CLOSE 7.86.0
|
CURLWS_CLOSE 7.86.0
|
||||||
CURLWS_CONT 7.86.0
|
CURLWS_CONT 7.86.0
|
||||||
|
CURLWS_FIN 8.13.0
|
||||||
CURLWS_OFFSET 7.86.0
|
CURLWS_OFFSET 7.86.0
|
||||||
CURLWS_PING 7.86.0
|
CURLWS_PING 7.86.0
|
||||||
CURLWS_PONG 7.86.0
|
CURLWS_PONG 7.86.0
|
||||||
|
|||||||
@ -43,6 +43,7 @@ struct curl_ws_frame {
|
|||||||
#define CURLWS_CLOSE (1<<3)
|
#define CURLWS_CLOSE (1<<3)
|
||||||
#define CURLWS_PING (1<<4)
|
#define CURLWS_PING (1<<4)
|
||||||
#define CURLWS_OFFSET (1<<5)
|
#define CURLWS_OFFSET (1<<5)
|
||||||
|
#define CURLWS_FIN (1<<6)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NAME curl_ws_recv()
|
* NAME curl_ws_recv()
|
||||||
|
|||||||
2
lib/ws.c
2
lib/ws.c
@ -195,6 +195,8 @@ static CURLcode ws_dec_read_head(struct ws_decoder *dec,
|
|||||||
}
|
}
|
||||||
|
|
||||||
dec->frame_flags = ws_frame_op2flags(dec->head[0]);
|
dec->frame_flags = ws_frame_op2flags(dec->head[0]);
|
||||||
|
dec->frame_flags = dec->frame_flags |
|
||||||
|
((dec->head[0] & WSBIT_FIN) ? CURLWS_FIN : 0);
|
||||||
if(!dec->frame_flags) {
|
if(!dec->frame_flags) {
|
||||||
failf(data, "WS: unknown opcode: %x",
|
failf(data, "WS: unknown opcode: %x",
|
||||||
dec->head[0] & WSBIT_OPCODE_MASK);
|
dec->head[0] & WSBIT_OPCODE_MASK);
|
||||||
|
|||||||
@ -64,7 +64,7 @@ Sec-WebSocket-Key: NDMyMTUzMjE2MzIxNzMyMQ==
|
|||||||
</protocol>
|
</protocol>
|
||||||
<stdout mode="text">
|
<stdout mode="text">
|
||||||
68 65 6c 6c 6f
|
68 65 6c 6c 6f
|
||||||
RECFLAGS: 1
|
RECFLAGS: 41
|
||||||
</stdout>
|
</stdout>
|
||||||
</verify>
|
</verify>
|
||||||
</testcase>
|
</testcase>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user