golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
122.96k stars 17.53k forks source link

net/http: StatusRequestedRangeNotSatisfiable should be StatusRangeNotSatisfiable #69540

Closed cookiengineer closed 6 hours ago

cookiengineer commented 6 hours ago

Go version

1.23+

Output of go env in your module/workspace:

Doesn't matter for this bug report

What did you do?

The RFC 9110 states that unsatisfiable Range request / Content-Range response should be answered with 416 Range Not Satisfiable.

In the current go HEAD, this status is encoded as 416 Requested Range Not Satisfiable.

In order to stay RFC compliant, The const StatusRequestedRangeNotSatisfiable should be renamed to StatusRangeNotSatisfiable, and the String() method should return the correct string.

What did you see happen?

...

What did you expect to see?

...

gabyhelp commented 6 hours ago

Related Issues and Documentation

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)