aglinxinyuan commented on PR #4980:
URL: https://github.com/apache/texera/pull/4980#issuecomment-4403826963

   @Yicong-Huang traced it — short version: it was wired up in March, then 
orphaned in October when downloads moved to the browser. The `require` line was 
missed during that cleanup.
   
   | When | Commit | What happened |
   | --- | --- | --- |
   | 2025-03-04 | [`9ecd32c` 
(#3241)](https://github.com/apache/texera/pull/3241) — *Fix download operators 
result* | `var contentDisposition = require("content-disposition")` was added 
so a new `saveBlobFile(response, defaultFileName)` helper could parse the 
server's `Content-Disposition` header and pull `filename=` out of it. Used on 
the `HttpClient` blob path for single-operator result download. |
   | 2025-10-10 | [`1317199` 
(#3728)](https://github.com/apache/texera/pull/3728) — *switch workflow result 
downloads to use browser native downloads* | Local result download switched 
from `HttpClient` blob → standard HTML form submit, so the browser handles the 
download (and the filename) directly. `saveBlobFile` (the only 
`contentDisposition.parse` caller) was deleted; the bare `require` at the top 
of the file was left behind. |
   
   So it's been dead since Oct 10, 2025 — the package and its types just rode 
along until I noticed.
   
   Relevant blame on `main`:
   
   ```
   9ecd32ca6a  ali risheh   2025-03-04   var contentDisposition = 
require("content-disposition");
   ```
   
   And the removed call site (added in `9ecd32c`, gone in `1317199`):
   
   ```ts
   public saveBlobFile(response: any, defaultFileName: string): void {
     const dispositionHeader = response.headers.get("Content-Disposition");
     let fileName = defaultFileName;
     if (dispositionHeader) {
       const parsed = contentDisposition.parse(dispositionHeader);
       fileName = parsed.parameters.filename || defaultFileName;
     }
     ...
   }
   ```
   
   No other references to `content-disposition` / `contentDisposition` remain 
under `frontend/src` (grepped), so dropping the dep is safe.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to