bug in jqt websocket handling of '*' strings
Closed this issue · 2 comments
The docs for the window driver command syntax [1] say that * can be followed by an arbitrary binary string, but something in the jqt websocket driver seems to truncate the string if the following sequence is found in any order, with any number of characters in between:
- a double quote
- followed by a double quote
- followed by a semicolon
- ... with any other characters interspersed
Example session:
wssvr_handler_z_ =: {{ 'e sock' =: y }}
wd 'ws listen 5555'
wscln_handler_z_ =: ]
client=: wd 'ws connect ws://localhost:5555'
NB. send the string. return its actual length and the number of bytes sent
test =: #;{{wd 'ws send ',client,' *',y}}
test 'abcd'
┌─┬─┐
│4│4│
└─┴─┘
test 'a"b"c;d'
┌─┬─┐
│7│5│
└─┴─┘
test '"";' NB. simplest case
┌─┬─┐
│3│2│
└─┴─┘
The following demonstrates that the wd driver itself is able to parse the sequence correctly (the full string shows up, including the semicolon), so the problem must be in the websocket handling.
wd'pc abc closeok;minwh 150 100;cc e edit;pshow;set e text *"";'
[1] https://code.jsoftware.com/wiki/Guides/Window_Driver/Command_Syntax
Thanks for reporting it. The websocket connection should accept binary data. I'll take a look.
BTW, this repo is for the J engine. The qtide repo would be better for this issue, but I will reply privately.
Thanks so much! Sorry for posting it in the wrong place :)