Closed VladimirMerk closed 9 months ago
After checking the code looks Ok. I'll add a test for it, and check it again.
Which Workerman version are you using ?
Version 4.1.13 I think there is a problem with the parseHttpHeader function in Websocket.php Explode splits the header line at colons with a limit of 2 elements. It turns out that if there is a colon in the header value, then everything after it is cut off. It seems that you need to split the header into a key-value only at the first colon, and save the value as is.
Checked also Websocket.php, and it seems OK.
Code: https://github.com/walkor/workerman/blob/4.1/Protocols/Websocket.php#L534C13-L534C67
Example with the code and your header with colons. https://3v4l.org/WW2Xc
The code is correct and work OK.
Yes, indeed, everything is fine.
I looked at my code again and found an error on my part. Sorry for that.
Thank you for your time. Successful growth and development of your excellent project!
If I send a custom header whose value contains colons, then on the server I receive an incomplete value. The value on the server is only up to the first colon.
Example: Sending Custom-Header: foo:bar:baz
Receive on server Custom-Header: foo