Skip to content

PXD-2297 ⁃ providing file size of 0 to indexd GET /urls creates unexpected error #190

@philloooo

Description

@philloooo

At time of writing, indexd has a GET /urls endpoint to “Get a list of urls that match query params”.

You can query by size, hash, and/or ids.

Querying by size gives the expected output…

$ curl ~~X GET https://zlchitty.planx~~pla.net/index/urls/?size=42
{"hashes":{},"limit":100,"size":42,"start":0,"urls":[]}

$ curl ~~X GET https://zlchitty.planx~~pla.net/index/urls/?size=1
{"hashes":{},"limit":100,"size":1,"start":0,"urls":[]}

…unless you input size=0.

$ curl ~~X GET https://zlchitty.planx~~pla.net/index/urls/?size=0
{"error":"Please provide size/hashes/ids to filter"}

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