Downloader creates empty files in case no content is present in requests' bodies
Open
Nobody has claimed this yet.
Issue
- Dominant language
- Python
- Stars
- 598
- Forks
- 168
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 86
Description
If we issue, e.g., a head request, the downloader still creates an empty temporary file when handling the response. We should not create unnecessary temporary files if not needed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in pulpcore/download/http.py at lines 208-217 and inspect how the downloader handles responses without content, such as a HEAD response. Confirm the change prevents an unnecessary empty temporary file while preserving temporary-file creation for responses with content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100