Issue #1930

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

Added by cduryee over 5 years ago. Updated over 2 years ago.

Start date:
Due date:
Estimated time:
1. Low
Platform Release:
Sprint Candidate:
Pulp 2


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


#1 Updated by over 5 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 over 5 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, `\` rather than `\`), the browser interprets the relative path (say, for example, `listing`) as `\`.

One solution would be to redirect clients who request the `\` URL to `\`

#3 Updated by over 5 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 4 years ago

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

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


#6 Updated by bmbouter over 2 years ago

  • Status changed from NEW to CLOSED - WONTFIX

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

#8 Updated by bmbouter over 2 years ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF