Skip to content

🐛 [Bug]: No 413 response sent to firefox #2086

@mybigman

Description

@mybigman

Bug Description

Fiber doesnt send 413 response to firefox, however under chrome or safari it does.

Firefox inspector - v104.0.2
image

Chrome inspector
image

How to Reproduce

Steps to reproduce the behavior:

  1. create post endpoint as per code below
  2. use firefox to upload file > 5MB

Firefox returns

The connection was reset
The connection to the server was reset while the page was loading.

Expected Behavior

To return 413 response. Without this cant use custom error handler.

Fiber Version

Fiber v2.37.1

Code Snippet (optional)

func PostUpload(c *fiber.Ctx) error {
	file, err := c.FormFile("attachment")
	if err != nil {
		log.Println(err)
	}
	log.Println(file.Filename)
	log.Println(file.Size)

	return nil
}

Checklist:

  • I agree to follow Fiber's Code of Conduct.
  • I have checked for existing issues that describe my problem prior to opening this one.
  • I understand that improperly formatted bug reports may be closed without explanation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions