~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/http/__init__.py

  • Committer: Patch Queue Manager
  • Date: 2012-02-14 17:49:28 UTC
  • mfrom: (6450.2.1 924746-http-fileobj)
  • Revision ID: pqm@pqm.ubuntu.com-20120214174928-2ybbnystvv1mhgvz
(vila) Avoid invalid range access errors on whole files when using http
 transport (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
from __future__ import absolute_import
23
23
 
 
24
import os
24
25
import re
25
26
import urlparse
26
27
import sys
236
237
                    # Split the received chunk
237
238
                    for offset, size in cur_coal.ranges:
238
239
                        start = cur_coal.start + offset
239
 
                        rfile.seek(start, 0)
 
240
                        rfile.seek(start, os.SEEK_SET)
240
241
                        data = rfile.read(size)
241
242
                        data_len = len(data)
242
243
                        if data_len != size: