[PR #3100] [MERGED] Fix legacy URL redirects #16766

Closed
opened 2025-11-02 12:18:37 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/3100
Author: @ethantkoenig
Created: 12/6/2017
Status: Merged
Merged: 12/7/2017
Merged by: @lunny

Base: masterHead: fix/redirect


📝 Commits (2)

  • 2aa6f7f Fix legacy URL redirects
  • f486691 Merge branch 'master' into fix/redirect

📊 Changes

2 files changed (+9 additions, -3 deletions)

View changed files

📝 integrations/links_test.go (+4 -2)
📝 modules/context/repo.go (+5 -1)

📄 Description

Fix legacy URL redirects, which previously ignored the path component of the URL. Also adds tests.

For example, /user/repo/src/master/file.txt previously redirected to /user/repo/src/branch/master, but now redirects to /user/repo/src/branch/master/file.txt.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/3100 **Author:** [@ethantkoenig](https://github.com/ethantkoenig) **Created:** 12/6/2017 **Status:** ✅ Merged **Merged:** 12/7/2017 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `fix/redirect` --- ### 📝 Commits (2) - [`2aa6f7f`](https://github.com/go-gitea/gitea/commit/2aa6f7f3509e32357c0e22cfd9dfbb636a03530f) Fix legacy URL redirects - [`f486691`](https://github.com/go-gitea/gitea/commit/f4866910b34be9555767922824491e34d3d6d2be) Merge branch 'master' into fix/redirect ### 📊 Changes **2 files changed** (+9 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `integrations/links_test.go` (+4 -2) 📝 `modules/context/repo.go` (+5 -1) </details> ### 📄 Description Fix legacy URL redirects, which previously ignored the path component of the URL. Also adds tests. For example, `/user/repo/src/master/file.txt` previously redirected to `/user/repo/src/branch/master`, but now redirects to `/user/repo/src/branch/master/file.txt`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 12:18:37 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#16766