Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Absolute paths not supported in Location header #156

Open
jautor opened this issue Feb 22, 2022 · 1 comment
Open

Absolute paths not supported in Location header #156

jautor opened this issue Feb 22, 2022 · 1 comment
Labels

Comments

@jautor
Copy link
Member

jautor commented Feb 22, 2022

Location header should allow for either relative or absolute paths, including scheme http:// or https://

@edtanous
Copy link

edtanous commented Sep 9, 2022

Having a Location header be an absolute path has a lot of problems in implementations:

  • The output of the request might be flushed through a Redfish aggregator, which would need to both detect this case, and handle all possible corner cases of using an ip address instead of a hostname, using a local hosts file name in the uri, as well as the host having multiple well known DNS names. In some cases, the Redfish server might not even know it's FQDN.

  • The output of the request might run through a "dumb" reverse proxy (think nginx or similar) that would result in the location header seemingly having a different source name. If location contains an absolute path, to avoid this, this reverse proxy now has to have significant smarts in it to conditionally rewrite the location header, when in a lot of cases a naive reverse proxy is desired.

  • For restful create semantics, for which Location is used generally, it's not clear that an absolute URI is valid or preferred, even though it is technically allowed in the HTTP RFC. For a given RESTful service, the CRUD operation is being performed on a restful implementation on that particular service. Returning an absolute path to a Location implies that the resource could've been created outside of this REST resource tree, which in a RESTful interface wouldn't be a create (ie POST) verb to a Resource, it would be something else entirely, because it wouldn't be effecting this services tree. In practice, I'm assuming any implementations that return an absolute Location are returning a URI to within this service roots tree anyway.

  • If Location returns an absolute URI, it's quite possible that to properly follow that URI, the client has to do yet another name lookup, then open, negotiate, and authenticate another Redfish HTTP connection to meet the letter of what following that URI represents, which doesn't seem realistic for most clients to do. The abstraction most clients have is "service root", for which there's one or more sockets connected. Having an absolute URI breaks that model. The other service root could also have different supported query params, TLS ciphers, or other incompatibilities that would make it damn near impossible to test in interop.

In short.... Please make the Location header specified to be relative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants