|
Bugzilla – Full Text Bug Listing |
| Summary: | redirector KDE:KDE3 -> KDE:/KDE3 does not work anymore | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE.org | Reporter: | Adrian Schröter <adrian.schroeter> |
| Component: | BuildService | Assignee: | Peter Poeml <poeml> |
| Status: | RESOLVED FIXED | QA Contact: | Adrian Schröter <adrian.schroeter> |
| Severity: | Normal | ||
| Priority: | P5 - None | CC: | ms |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
|
Description
Adrian Schröter
2007-07-19 14:46:55 UTC
I thought about implementing this in the redirector, but came to the conclusion that this is not a feature related to the redirector at all. It is best implemented with mod_rewrite (unless there are more specific needs, but I don't know of any). I'll figure something out. I fixed it like this:
# rewriting of ':' to ':/' in buildservice project names
# https://bugzilla.novell.com/show_bug.cgi?id=293081
RedirectMatch permanent ^/repositories/([^/]+):([^/]+)/(.*) http://download.opensuse.org/repositories/$1:/$2/$3
This yields a recursive rule by returning 301 (permanent redirect) to the client, and make it come back for the next replacement. Not the most efficient procedure, but works, and I have the feeling that the recursion would be difficult to express in mod_rewrite (although it can probably be done through rewriting subrequests). If required, this can be revisited later.
I added testcases to https://svn.suse.de/svn/opensuse/trunk/urltests
This rule will fail for devel:languages:something , because it is not recursive, right ? No, it will not fail, that's what I tried to explain above ;) I have put a respective testcase in here: http://svn.suse.de/viewcvs/opensuse/trunk/urltests/ftpoo-tests?r1=671&r2=675 The point is that the first redirect goes to an URL with one colon replaced, and if there is another one in the next request which the client issues, it will be redirected with another replacement, and so on. This seems sufficient to me atm. I find only a few (5) project names with more than two colons. It could probably be done as RewriteRule more efficiently. I have looked in the configuration svn of ftp.o.o, but I haven't found anything in the old revisions. Maybe it wasn't implemented in apache configuration but in the old redirector. The last 100.000 accesses didn't really contain such requests, so it doesn't look important to be more efficient here: root@ftp:/usr/local/testapache # tail -n 100000 /var/log/apache2/software.opensuse.org/access_log | awk '{print $7}' | grep ':[^/]' | grep -v ':/' | grep -v "\(Factory\|Fedora\)" /download/server%3a/monitoring/openSUSE_10.2/server:monitoring.repo /download/home%3a/sax2/10.2/home:sax2.repo /KDE%3A/KDE3/openSUSE_10.2/KDE:KDE3.repo (I excluded Factory and Fedora because they are handled by other RewriteRules anyway) |