probot / smee-client

🔴 Receives payloads then sends them to your local server
https://smee.io
ISC License
441 stars 135 forks source link

Beta branch - Not supporting special chars in received payload #319

Open Dancho80 opened 1 month ago

Dancho80 commented 1 month ago

in case the payload contains some special char like ®, the client fails with error:

TypeError: Cannot convert argument to a ByteString because the character at index 10117 has a value of 8482 which is greater than 255.
at Client.fetch (/smee-client/node_modules/undici/index.js:112:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Client.onmessage (file:///smee-client/index.js:52:30)
wolfy1339 commented 1 month ago

Can you try changing line 82 so it looks like this

    headers["content-type"] = "application/json; charset=utf-8";

Are you sending the payload as JSON or urlencoded?

Dancho80 commented 1 month ago

same error my use case: sending Webhooks from GitHub, Content Type = application/json [EDIT] if I switch the method from application/json to urlencoded in GitHub Webhook settings so smee-client is passing the payload but the receiver doesnt accept it with the error 431

org.eclipse.jetty.http.HttpParser parseFields
Header is too large 8193>8192