WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#35333 closed enhancement (fixed)

Add support for 451 http status code.

Reported by: andizer Owned by: joehoyle
Milestone: 4.5 Priority: low
Severity: normal Version:
Component: HTTP API Keywords: good-first-bug has-patch
Focuses: Cc:

Description

It would be nice to add support for the newly 451 (HTTP 451 Unavailable For Legal Reasons) http response code.

I recently used the status_header function and I saw this response code was missing.

See https://en.wikipedia.org/wiki/HTTP_451 for more details about the response code.

Attachments (1)

35333.diff (453 bytes) - added by andizer 4 years ago.

Download all attachments as: .zip

Change History (8)

#1 @ericlewis
4 years ago

  • Component changed from General to HTTP API
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

Great idea @andizer, and welcome to WordPress Trac :)

Would you like to submit a patch for this?

#2 @kraftbj
4 years ago

It isn't yet final (though very very close): https://datatracker.ietf.org/doc/draft-ietf-httpbis-legally-restricted-status/ Personally, I'm good with adding it now, but is there a good reason to wait?

#3 @johnbillion
4 years ago

  • Milestone changed from Future Release to 4.5
  • Priority changed from normal to low
  • Type changed from feature request to enhancement

This is fine to go in. We support other statuses whose RFCs are technically still in the proposal stage (see #16914).

#4 @voldemortensen
4 years ago

  • Keywords good-first-bug added

@andizer
4 years ago

#5 @andizer
4 years ago

  • Keywords has-patch added; needs-patch removed

I've uploaded a patch for this ticket.

#7 @joehoyle
4 years ago

  • Owner set to joehoyle
  • Resolution set to fixed
  • Status changed from new to closed

In 36273:

Add support for 451 http status code (Unavailable For Legal Reasons.)

Though this is technically still in the proposal stage, there is support from the core team and precedent in #16914

Props andizer.
Fixes #35333.

Note: See TracTickets for help on using tickets.