title: Get file size from "Content-Length" value from a file in python 3.2
body: <p>I want to get the <code>Content-Length</code> value from the meta variable. I need to get the size of the file that I want to download. But the last line returns an error, <code>HTTPMessage</code> object has no attribute <code>getheaders</code>.</p>
  
  <pre><code>import urllib.request
  import http.client
  
  #----HTTP HANDLING PART----
   url = "http://client.akamai.com/install/test-objects/10MB.bin"
  
  file_name = url.split('/')[-1]
  d = urllib.request.urlopen(url)
  f = open(file_name, 'wb')
  
  #----GET FILE SIZE----
  meta = d.info()
  
  print ("Download Details", meta)
  file_size = int(meta.getheaders("Content-Length")[0])
  </code></pre>