pulp / pulp/pulpcore

Downloader creates empty files in case no content is present in requests' bodies

Open
#3,895 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue
Dominant language
Python
Stars
598
Forks
168
Avg merge
1d 4h
Merged PRs (30d)
86

Description

https://github.com/pulp/pulpcore/blob/204d671278e9dbf2c02a1e3985d72f5d4e7959ae/pulpcore/download/http.py#L208-L217

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.