Home / Function/ statusDisallowsBody() — fiber Function Reference

statusDisallowsBody() — fiber Function Reference

Architecture documentation for the statusDisallowsBody() function in res.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  dc0da131_440e_80f6_e3ec_34710b9b7ef2["statusDisallowsBody()"]
  4ab93de8_955a_4087_8264_32cf8000452f["res.go"]
  dc0da131_440e_80f6_e3ec_34710b9b7ef2 -->|defined in| 4ab93de8_955a_4087_8264_32cf8000452f
  style dc0da131_440e_80f6_e3ec_34710b9b7ef2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

res.go lines 1031–1043

func statusDisallowsBody(status int) bool {
	// As per RFC 9110, 1xx (Informational) responses cannot have a body.
	if status >= 100 && status < 200 {
		return true
	}

	switch status {
	case StatusNoContent, StatusResetContent, StatusNotModified:
		return true
	default:
		return false
	}
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does statusDisallowsBody() do?
statusDisallowsBody() is a function in the fiber codebase, defined in res.go.
Where is statusDisallowsBody() defined?
statusDisallowsBody() is defined in res.go at line 1031.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free