Project

General

Profile

Bug #33787

Drop non-standard compliant way of selecting api version

Added by Tomer Brisker 10 months ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

We currently allow passing the api version using a version string in the Accept: HTTP header. This is not compliant with the HTTP standard and is not actually needed since we currently only have one API version and no plans to add v3 in the foreseeable future.

Associated revisions

Revision 576774e7 (diff)
Added by Tomer Brisker 10 months ago

Fixes #33787 - Drop Accept Header handling for API version

The API controller has been abusing the Accept header to define which
version of the API should be used. This is not compliant with the HTTP
spec1 which specifies that this header should be used to indicate
acceptable media types by the client.
Any clients currently passing the header should not be affected as the
default version of the API is v2. There are no plans currently to create
API v3, and even if it will eventually be developed, users will be able
to use the route to indicate which version they wish to use.

[1] https://httpwg.org/specs/rfc7231.html#header.accept

History

#1 Updated by The Foreman Bot 10 months ago

  • Assignee set to Tomer Brisker
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/8877 added

#2 Updated by The Foreman Bot 10 months ago

  • Fixed in Releases 3.1.0 added

#3 Updated by Tomer Brisker 10 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF