Skip to content

Bug in Sub Resources' Location header #1442

@itsjef

Description

@itsjef

Setup

Follow this snippet

Expected Behavior

When creating sub-resource items, I expect the Location header to be the URL of the first item.

$ curl -i -X POST http://127.0.0.1:5000/lists/60304123b0727836fbc24d0f/items -d 'name=Alice'

Location: http://127.0.0.1:5000/lists/60304123b0727836fbc24d0f/items/60304146b0727836fbc24d10

Actual Behavior

Path to the parent resource is duplicated.

Location: http://127.0.0.1:5000/lists/60304123b0727836fbc24d0f/lists/60304123b0727836fbc24d0f/items/60304146b0727836fbc24d10

Environment

  • Python version: 3.8.6
  • Eve version: 1.1.5

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