~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_http_response.py

  • Committer: Matt Nordhoff
  • Date: 2009-04-04 02:50:01 UTC
  • mfrom: (4253 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4256.
  • Revision ID: mnordhoff@mattnordhoff.com-20090404025001-z1403k0tatmc8l91
Merge bzr.dev, fixing conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
"""Tests from HTTP response parsing.
18
18
 
407
407
 
408
408
 
409
409
class TestRangeFileMultipleRangesQuotedBoundaries(TestRangeFileMultipleRanges):
410
 
    """Perform the same tests as TestRangeFileMultipleRanges, but uses 
 
410
    """Perform the same tests as TestRangeFileMultipleRanges, but uses
411
411
    an angle-bracket quoted boundary string like IIS 6.0 and 7.0
412
412
    (but not IIS 5, which breaks the RFC in a different way
413
413
    by using square brackets, not angle brackets)
414
 
    
415
 
    This reveals a bug caused by 
416
 
    
417
 
    - The bad implementation of RFC 822 unquoting in Python (angles are not 
418
 
      quotes), coupled with 
 
414
 
 
415
    This reveals a bug caused by
 
416
 
 
417
    - The bad implementation of RFC 822 unquoting in Python (angles are not
 
418
      quotes), coupled with
419
419
 
420
420
    - The bad implementation of RFC 2046 in IIS (angles are not permitted chars
421
421
      in boundary lines).
422
 
 
 
422
 
423
423
    """
424
424
    # The boundary as it appears in boundary lines
425
425
    # IIS 6 and 7 use this value
801
801
    """
802
802
 
803
803
    def setUp(self):
 
804
        tests.TestCase.setUp(self)
804
805
        # create a test datablock larger than _max_read_size.
805
806
        chunk_size = response.RangeFile._max_read_size
806
807
        test_pattern = '0123456789ABCDEF'