Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use 1 MB buffers to avoid silent errors #84

Merged
merged 2 commits into from
May 2, 2023

Conversation

portante
Copy link
Contributor

@portante portante commented Apr 27, 2023

See r3labs/sse#158, "Improve receive message error handling."

Fixes #77, "ERROR gosmee bufio.Scanner: token too long".

I filed this as 2 separate commits so that the actual fix is separate from the logging changes I made as part of my debugging efforts (commit message body below for the supporting commit):

Add log entries with req headers to aid debugging

The new published log entries in both the client and server contain the
the original payload headers, and for the server the request ID,
allowing one to track down behaviors from know sources (e.g. GitHub
posts a list of events it sent to a web hook with the headers used).

Layered on top of #83.

@portante portante force-pushed the address-token-too-long branch 2 times, most recently from 79756fd to 05f2478 Compare April 27, 2023 10:17
@chmouel
Copy link
Owner

chmouel commented Apr 28, 2023

i am not sure what is the default of caddy

https://caddyserver.com/docs/caddyfile/directives/request_body

doesn't give the default here

on nginx the default POST value seems to be 1MB https://docs.rackspace.com/support/how-to/limit-file-upload-size-in-nginx/

The new published log entries in both the client and server contain the
the original payload headers, and for the server the request ID,
allowing one to track down behaviors from know sources (e.g. GitHub
posts a list of events it sent to a web hook with the headers used).
See r3labs/sse#158, "Improve receive message
error handling."

Fixes chmouel#77, "`ERROR gosmee
bufio.Scanner: token too long`".
@portante portante force-pushed the address-token-too-long branch from 05f2478 to dc14cd2 Compare April 29, 2023 11:52
@portante portante marked this pull request as ready for review April 29, 2023 11:54
@chmouel chmouel merged commit 5969d6b into chmouel:main May 2, 2023
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.

ERROR gosmee bufio.Scanner: token too long
2 participants