Project

Profile

Help

Issue #1930

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

Added by cduryee over 4 years ago. Updated over 1 year 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

History

#1 Updated by dkliban@redhat.com over 4 years ago

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

#2 Updated by jcline@redhat.com over 4 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/\`

#3 Updated by jcline@redhat.com over 4 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.

#4 Updated by signed8bit over 3 years ago

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

#5 Updated by bmbouter over 3 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

#6 Updated by bmbouter over 1 year ago

  • Status changed from NEW to CLOSED - WONTFIX

#7 Updated by bmbouter over 1 year 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.

#8 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF