Project

Profile

Help

Issue #1930

closed

404s for pulp apache static content process unless there is a trailing slash in the URL

Added by cduryee almost 8 years ago. Updated almost 5 years ago.

Status:
CLOSED - WONTFIX
Priority:
High
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

It is possible to get 404 for packages listed by the pulp apache static content process because of the use of relative hrefs.

If you were to visit the URL /pulp/repos/Default_Organization/Library/custom/Zoo-Product/Zoo-Repo (note the missing trailing slash) and then click on the following link:

<a href="bear-4.1-1.noarch.rpm">bear-4.1-1.noarch.rpm</a>

The resultant URL would be /pulp/repos/Default_Organization/Library/custom/Zoo-Product/bear-4.1-1.noarch.rpm which is a 404.

Either absolute URLs should be used in the HREF or /pulp/repos/Default_Organization/Library/custom/Zoo-Product/Zoo-Repo should be rewritten to /pulp/repos/Default_Organization/Library/custom/Zoo-Product/Zoo-Repo/ in the apache configuration.

Steps to Reproduce

  1. Visit a pulp generated repo page
  2. Remove the trailing / if present in the url and revisit the page if necessary
  3. Click on any package link
  4. Note 404
Actions #1

Updated by dkliban@redhat.com almost 8 years ago

  • Priority changed from Normal to High
  • Severity changed from 2. Medium to 1. Low
  • Triaged changed from No to Yes
Actions #2

Updated by jcline@redhat.com almost 8 years ago

I was able to reproduce this when doing other things. It turns out if you request the page without a trailing / (for example, `https://dev.example.com/pulp/repos/demo\` rather than `https://dev.example.com/pulp/repos/demo/\`), the browser interprets the relative path (say, for example, `listing`) as `https://dev.example.com/pulp/repos/listing\`.

One solution would be to redirect clients who request the `https://dev.example.com/pulp/repos/demo\` URL to `https://dev.example.com/pulp/repos/demo/\`

Actions #3

Updated by jcline@redhat.com almost 8 years ago

  • Subject changed from occasionally unable to browse repos via browser to 404s for pulp apache static content process unless there is a trailing slash in the URL
  • Description updated (diff)

I've updated the description with the description of #2009 since it's got a nice reproducer and explanation.

Actions #4

Updated by signed8bit almost 7 years ago

Any chance this can get looked at for a short term release?

Actions #5

Updated by bmbouter almost 7 years ago

@signed8bit, we are Pulp3 focused right now so the core team probably can't prioritize this currently. Is there any way you can contribute a fix and we can help support you in that? I was asking in #pulp-dev and we think that this defect is probably in a rewrite rule here[0]. We have a dev environment that is pretty easy to setup, but for conf file changes, you can use almost any Pulp installation.

[0]: https://github.com/pulp/pulp_rpm/blob/39c10268b78efb2b3f8ff8d4e19a3e3a125281d1/plugins/etc/httpd/conf.d/pulp_rpm.conf#L27-L41

Actions #6

Updated by bmbouter almost 5 years ago

  • Status changed from NEW to CLOSED - WONTFIX
Actions #7

Updated by bmbouter almost 5 years ago

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

Actions #8

Updated by bmbouter almost 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF