Skip to content

Not possible to find service when Accept headers with multiple schemes #62

@tiberiuichim

Description

@tiberiuichim

This simple jquery call should work:

  $.ajax(
    {
      url,
      method: 'POST',
      dataType: 'json',
      success: function (resp) { }
    }
  );

The Accept is sent as 'application/json, text/javascript, */*; q=0.01', result of parse_accept_header(accept) is [('application', 'json'), ('text', 'javascript'), ('*', '*')].

Except for cowardly exiting in lookup_service_id:

    if len(media_types) != 1:
        return None

IMHO, it should loop over the result of media_types and only return None if no services are found.

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