We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Just noticed 'error.BodyTooBig' is not handled by requestError, which should something like this:
fn requestError(conn: *HTTPConn, err: anyerror) !void { const handle = conn.stream.handle; switch (err) { error.HeaderTooBig => { metrics.invalidRequest(); return writeError(handle, 431, "Request header is too big"); }, error.BodyTooBig => { metrics.invalidRequest(); return writeError(handle, 413, "Request body is too big"); }, error.UnknownMethod, error.InvalidRequestTarget, error.UnknownProtocol, error.UnsupportedProtocol, error.InvalidHeaderLine, error.InvalidContentLength => { metrics.invalidRequest(); return writeError(handle, 400, "Invalid Request"); }, error.BrokenPipe, error.ConnectionClosed, error.ConnectionResetByPeer => return, else => { log.err("server error: {}", .{err}); metrics.internalError(); return writeError(handle, 500, "Internal Server Error"); }, } return err; }
The text was updated successfully, but these errors were encountered:
Send 413 reply on body too large
458281c
#107
You're right, that's better. Thanks
Sorry, something went wrong.
No branches or pull requests
Just noticed 'error.BodyTooBig' is not handled by requestError, which should something like this:
The text was updated successfully, but these errors were encountered: