Skip to content

Mt gateway driver socketio parser max attachments#270

Merged
Gioee merged 5 commits into
mt-gateway-driverfrom
mt-gateway-driver-socketio-parser-max-attachments
May 27, 2026
Merged

Mt gateway driver socketio parser max attachments#270
Gioee merged 5 commits into
mt-gateway-driverfrom
mt-gateway-driver-socketio-parser-max-attachments

Conversation

@danielebriggi
Copy link
Copy Markdown
Member

No description provided.

Daniele Briggi and others added 5 commits May 22, 2026 15:57
socket.io-parser 4.2.6 rejects binary packets with more than 10 attachments by default. SQLite Cloud rowsets with BLOB values can exceed that count, causing the browser websocket driver to fail with a parser error before the binary payloads are delivered.

Add socket.io-parser as an explicit dependency and pass a custom parser to socket.io-client. The custom decoder raises maxAttachments while preserving the standard encoder and normal Socket.IO transport negotiation.

Add a focused unit assertion for the websocket connection options so the parser override remains wired into future builds.
Add a minimal Vite + TypeScript example that queries SQLite Cloud over
WebSocket from the browser. Uses a generic runQuery helper and consumes the driver from a locally packed tarball via npm run sync-driver, documented in the README.
@danielebriggi danielebriggi requested a review from Gioee May 25, 2026 14:18
const raw = this.config.gatewayurl
gatewayUrl = raw.startsWith('ws://') || raw.startsWith('wss://') ? raw : `ws://${raw}`
ioOpts.extraHeaders = { Host: this.config.host }
ioOpts.transports = ['websocket']
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you force websocket transport in localhost?

@Gioee Gioee merged commit 723eda0 into mt-gateway-driver May 27, 2026
7 of 16 checks passed
@Gioee Gioee deleted the mt-gateway-driver-socketio-parser-max-attachments branch May 27, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants