[Yum] - something is wrong

Torkil Zachariassen torkil at flug.fo
Sun Nov 9 01:48:05 UTC 2003


FYI: yum-2 on RedHat 8.0.

   # yum list
   Gathering header information file(s) from server(s)
...
   [Errno 6] ERROR: Url Return no Content-Length  - something is wrong

The proxy I use, Apache/2.0.39 (Unix), drops the Content-Length: header 
line. yum seems to think, and thinks that is wrong.

This might very well be regarded as a bug in the proxy, rather than yum.

Anyway, with help from #dhg, a quick fix was to get yum from cvs and to 
comment out a few lines in urlgrabber.py, rebuild and copy the new 
urlgrabber.pyc into /usr/share/yum.

diff -u yum.000/urlgrabber.py yum/urlgrabber.py
--- yum.000/urlgrabber.py      2003-08-31 19:00:08.000000000 +0100
+++ yum/urlgrabber.py   2003-11-09 01:11:16.000000000 +0000
@@ -319,10 +319,11 @@
      # header then its probably something generated dynamically, such
      # as php, cgi, a directory listing, or an error message.  It is
      # probably not what we want.
-    if have_urllib2 or scheme != 'file':
-        # urllib does not provide content-length for local files
-        if not hdr is None and not hdr.has_key('Content-Length'):
-            raise URLGrabError(6, _('ERROR: Url Return no 
Content-Length  - something is wrong'))
+# this prevent me from doing what I want to do
+#    if have_urllib2 or scheme != 'file':
+#        # urllib does not provide content-length for local files
+#        if not hdr is None and not hdr.has_key('Content-Length'):
+#            raise URLGrabError(6, _('ERROR: Url Return no 
Content-Length  - something is wrong'))

      # download and store the file
      try:





More information about the Yum mailing list