Project

Profile

Help

Issue #6507

closed

The base_url of a Distribution is missing a trailing slash

Added by dkliban@redhat.com over 4 years ago. Updated over 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 71
Quarter:

Description

Since the content app requires a trailing slash at the end of a URL, the base_url for a Distribution should include it. Without it the user receives a 404.

The API currently returns something like this:

        {
            "base_path": "pub/centos/8/BaseOS/x86_64/kickstart",
            "base_url": "http://localhost:24816/pulp/content/pub/centos/8/BaseOS/x86_64/kickstart",
            "content_guard": null,
            "name": "5e97b2d16e50c92d5c2d60bc-centos8",
            "publication": "/pulp/api/v3/publications/rpm/rpm/2c62294c-6e2d-4460-9358-0efc4f3e01a7/",
            "pulp_created": "2020-04-16T14:11:09.474847Z",
            "pulp_href": "/pulp/api/v3/distributions/rpm/rpm/a2dce49e-925f-4965-be4c-a2c6df62350b/"
        }

But it should return

        {
            "base_path": "pub/centos/8/BaseOS/x86_64/kickstart",
            "base_url": "http://localhost:24816/pulp/content/pub/centos/8/BaseOS/x86_64/kickstart/",
            "content_guard": null,
            "name": "5e97b2d16e50c92d5c2d60bc-centos8",
            "publication": "/pulp/api/v3/publications/rpm/rpm/2c62294c-6e2d-4460-9358-0efc4f3e01a7/",
            "pulp_created": "2020-04-16T14:11:09.474847Z",
            "pulp_href": "/pulp/api/v3/distributions/rpm/rpm/a2dce49e-925f-4965-be4c-a2c6df62350b/"
        }

Also available in: Atom PDF