python urljpeg py header length http/ ok datewed apr : : gmt serverapache(ubuntulast-modifiedmon may : : gmt etag" - accept-rangesbytes content-length varyaccept-encoding cache-controlmax-age= no-cacheno-storemust-revalidate pragmano-cache expireswed jan : : gmt connectionclose content-typeimage/jpeg you can see that for this urlthe content-type header indicates that body of the document is an image (image/jpegonce the program completesyou can view the image data by opening the file stuff jpg in an image viewer as the program runsyou can see that we don' get characters each time we call the recv(method we get as many characters as have been transferred across the network to us by the web server at the moment we call recv(in this examplewe either get as few as characters each time we request up to characters of data your results may be different depending on your network speed also note that on the last call to recv(we get byteswhich is the end of the streamand in the next call to recv(we get zero-length string that tells us that the server has called close(on its end of the socket and there is no more data forthcoming we can slow down our successive recv(calls by uncommenting the call to time sleep(this waywe wait quarter of second after each call so that the server can "get aheadof us and send more data to us before we call recv(again with the delayin place the program executes as followspython urljpeg py header length