> lenght=os.fstat(file.fileno())[stat.ST_SIZE] > print lenght > headers['Content-Lenght']=lenght I am not experienced with webDav, but perhaps you are trying to spell "length". I believe the name of the header matters in this case. - Josiah