Skip to content

Consider disallowing redirects for API requests that redirect from POST to GET #801

@philvarner

Description

@philvarner

I recently had a situation where a server that used an https URL incorrectly had http links in it's link relations. The result of this was that the underlying http client library in pystac-client got a redirect from a POST /search request, and then retried with a GET /search request. However, this didn't work correctly, since the POST body was not also re-constructed as GET query parameters, so the search instead resulted in all items being returned.

  1. Changing the default behavior of redirects like this would be difficult to do outside of a major release.
  2. Adding some documentation about ensuring that the response link rels match the requested URL could be useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions