URL string corruption from JS to Python in XHR
Issue type
Bug
How did you install PythonMonkey?
None
OS platform and distribution
No response
Python version (python --version)
No response
PythonMonkey version (pip show pythonmonkey)
No response
Bug Description
seen
xhr:open open start, method=GET xhr:open url is https://result-submitter.distributed.computer/result-submitter/?EIO=4&transport=polling&t=Oz0CL_o&sid=n5qV1aGjbJJ3aTiGABjW xhr:open finished open, state is 1 xhr:send sending; body length=undefined xhr:send content-type=undefined xhr:send sending in async mode xhr:send GET https://result-submitter.distributed.computer/result-submitter/?EIO=4&transport=polling&t=Oz0CL_o&sid=n5qV1aGjbJJ3aTiGABjW xhr:aiohttp creating request for °¢²¦ùaÀ¸¦ùaubmitter.distributed.computer/result-submitter/?EIO=4&transport=polling&t=Oz0CL_o&sid=n5qV1aGjbJJ3aTiGABjW
and
socketio(i:1): connecting to https://scheduler.distributed.computer/job-submit/ xhr:open open start, method=GET xhr:open url is https://scheduler.distributed.computer/job-submit/?EIO=4&transport=polling&t=OuXOkdA xhr:open finished open, state is 1 xhr:headers set header X-DCP=pythonmonkey debug ad04f5bf37ae33dc2de46b0336a1aaaddafdceb7 xhr:headers set header Accept=/ xhr:send sending; body length=undefined xhr:send content-type=undefined xhr:send sending in async mode xhr:events:dispatch ProgressEvent loadstart xhr:send GET https://scheduler.distributed.computer/job-submit/?EIO=4&transport=polling&t=OuXOkdA xhr:headers headers=x-dcp,pythonmonkey debug ad04f5bf37ae33dc2de46b0336a1aaaddafdceb7,accept,/ socketio(i:1): sending transport announcement (ack: false sz: 100000000 pi: 10100) socketio(i:1): sending message 1 to scheduler.distributed.computer socketio(i:1): drain tx pending queue, 1 ready socketio(i:1): sent message 1 (165 bytes) wallet - lockIfTimerExpired on wes qhacks xhr:headers after set default { 'x-dcp': 'pythonmonkey debug ad04f5bf37ae33dc2de46b0336a1aaaddafdceb7', accept: '/', 'user-agent': 'Python/3.10.12 PythonMonkey/0.3.1.dev42+6b5fb9d' } xhr:aiohttp creating request for pH¦µÌUP)¯µÌUr.distributed.computer/job-submit/?EIO=4&transport=polling&t=OuXOkdA 11:12 That's exactly 16 chars of corruption in that string on the last line ... two or four machine words depending on exactly where it's gone sideways 11:16 After this, I have xhr:events:dispatch ProgressEvent error xhr:events:dispatch ProgressEvent loadend socketio(i:1): unable to connect to https://scheduler.distributed.computer/job-submit/ xhr poll error socketio(i:1): closing connection (xhr poll error) so we're firing an error in the middle of XHR
and
Standalone code to reproduce the issue
No response
Relevant log output or backtrace
No response
Additional info if applicable
No response
What branch of PythonMonkey were you developing on? (If applicable)
No response
We just saw a corrupted a string in the dcp HTTP header: See https://dstrbtv.slack.com/archives/C03RNFRL4NQ/p1720632114448979 and https://dstrbtv.slack.com/archives/C03RNFRL4NQ/p1720632995395079