Friday 15 June 2012

wget - Confirmation of Successful HTTP Download in Python -


Is it an easy and reliable way to ensure that a web download is for Python or WGET [big files]? I want to make sure that the file is fully downloaded before performing another action.

practice, believe me) HTTP / 1.1 header section, expecting how long you have the institution body If you expect this, you can decide that you have got all the institution data. See for full details, but essentially:

  • Sometimes the content-length indicates the length of the correct entity entity
  • ever -Only the entity body is reacting to the response code or if the response is responding to a HEAD request
  • ; Sometimes the transfer request is encoded; And the HTTP data has some markers that 'I am now doing' ( transfer encoding: selected ) and occasionally, the message is officially done when The connection closes (in that case, you can not differentiate between getting the whole thing and the initial deduction)

In all cases, but the last one, you can tell Whether you got the whole thing or not. I do not know that specially any device (wget or existing dragon library) gives you an easy explanatory signal that your reaction or deduction was not done.


No comments:

Post a Comment