[Yum] Url return no Content-Length

James Scott Hunter hunter.scott at ghc.org
Fri Sep 17 18:03:35 UTC 2004


Hello all. 

Here at the office I am behind a proxy server.  When I try using yum I
get errors that look like this:
============
# yum update
Gathering header information file(s) from server(s)
Server: Fedora Linux 1 - i386 - core
retrygrab() failed for:
  http://ayo.freshrpms.net/fedora/linux/1/i386/core/headers/header.info
  Executing failover method
failover: out of servers to try
Error getting file
http://ayo.freshrpms.net/fedora/linux/1/i386/core/headers/header.info
[Errno 6] ERROR: Url Return no Content-Length  - something is wrong
===========

Interestingly I get get the same file using wget.   Interestingly one of
the messages wget reports is:

Length: unspecified [text/plain]

===========

wget doesn't stumble and correctly brings across the file.  So to make
yum work I modified the python file and commented out this test.. Here's
the diff:

<     if have_urllib2 or scheme != 'file':
---
>     #if have_urllib2 or scheme != 'file':
332,333c333,334
<         if not hdr is None and not hdr.has_key('Content-Length'):
<             raise URLGrabError(6, _('ERROR: Url Return no
Content-Length  - something is wrong'))
---
>         #if not hdr is None and not hdr.has_key('Content-Length'):
>         #    raise URLGrabError(6, _('ERROR: Url Return no
Content-Length  - something is wrong'))


HTH. 

-Scott
hunter.scott at ghc.org



More information about the Yum mailing list