[PR #2085] [CLOSED] Fix broken download redirect #1750

Closed
opened 2026-02-05 18:23:40 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/pelican-dev/panel/pull/2085
Author: @hUwUtao
Created: 1/8/2026
Status: Closed

Base: mainHead: patch/dwnld


📝 Commits (1)

  • ba57b1b Fix download redirect for file downloads

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 app/Filament/Server/Resources/Files/Pages/DownloadFiles.php (+3 -1)

📄 Description

The file download procedure do a single redirect to the download endpoint on wings. However, if redirect respond contains a body, it will not download for some reason.

HTTP Request when actual content is sent but not trigger browser download:

GET https://example.com/server/________/files/download/defaultconfigs/woodenbucket-server.toml HTTP/2.0
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
accept-encoding: gzip, deflate, br
accept-language: en-US,en;q=0.9

HTTP/2.0 302
date: Sun, 04 Jan 2026 09:09:31 GMT
content-type: text/html; charset=utf-8
location: https://example.com/download/file?token=________
cache-control: no-store
expires: Fri, 01 Jan 1990 00:00:00 GMT
pragma: no-cache
status: 302 Found

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="refresh" content="0;url='https://example.com/download/file?token=________'" />
    <title>Redirecting</title>
  </head>
  <body>
    Redirecting to <a href="https://example.com/download/file?token=________">download</a>.
  </body>
</html>

GET https://example.com/download/file?token=________ HTTP/2.0
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
accept-encoding: gzip, deflate, br
accept-language: en-US,en;q=0.9

HTTP/2.0 200
content-disposition: attachment; filename="woodenbucket-server.toml"
content-type: application/octet-stream
date: Sun, 04 Jan 2026 09:09:31 GMT
content-length: 770

["Balance Options"]
    crackingTemperature = 1000

🔄 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/pelican-dev/panel/pull/2085 **Author:** [@hUwUtao](https://github.com/hUwUtao) **Created:** 1/8/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `patch/dwnld` --- ### 📝 Commits (1) - [`ba57b1b`](https://github.com/pelican-dev/panel/commit/ba57b1bb12efbef0a71e8ab18045d544a4541a88) Fix download redirect for file downloads ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `app/Filament/Server/Resources/Files/Pages/DownloadFiles.php` (+3 -1) </details> ### 📄 Description The file download procedure do a single redirect to the download endpoint on wings. However, if redirect respond contains a body, it will not download for some reason. HTTP Request when actual content is sent but not trigger browser download: ``` GET https://example.com/server/________/files/download/defaultconfigs/woodenbucket-server.toml HTTP/2.0 user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 accept-encoding: gzip, deflate, br accept-language: en-US,en;q=0.9 HTTP/2.0 302 date: Sun, 04 Jan 2026 09:09:31 GMT content-type: text/html; charset=utf-8 location: https://example.com/download/file?token=________ cache-control: no-store expires: Fri, 01 Jan 1990 00:00:00 GMT pragma: no-cache status: 302 Found <!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <meta http-equiv="refresh" content="0;url='https://example.com/download/file?token=________'" /> <title>Redirecting</title> </head> <body> Redirecting to <a href="https://example.com/download/file?token=________">download</a>. </body> </html> GET https://example.com/download/file?token=________ HTTP/2.0 user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 accept-encoding: gzip, deflate, br accept-language: en-US,en;q=0.9 HTTP/2.0 200 content-disposition: attachment; filename="woodenbucket-server.toml" content-type: application/octet-stream date: Sun, 04 Jan 2026 09:09:31 GMT content-length: 770 ["Balance Options"] crackingTemperature = 1000 ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 18:23:40 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/panel-pelican-dev#1750