Commit f9f6261
committed
Make _http_exists send the ranged GET its docstring describes
The docstring states the requirement exactly: a ranged GET, so that servers
which ignore HEAD still work. The body calls make_head_request, which is
requests.head.
Two consequences. The Range header is meaningless on a HEAD, so the 206 the
function tests for is never observed on that path. And requests.head defaults
to allow_redirects=False, so a 302 also reads as missing.
That combination takes out the HuggingFace lane entirely: huggingface.py
accepts only .bin, every real .bin weight is Git-LFS backed, and HF serves
those from a CDN via a 302.
Signed-off-by: Arpit Jain <arpitjain099@gmail.com>1 parent 27c4fc9 commit f9f6261
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
254 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
255 | 262 | | |
256 | 263 | | |
0 commit comments