~bzr-pqm/bzr/2.3

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-07-29 02:08:01 UTC
  • mfrom: (5657.1.1 198646-http-boundary-2.3)
  • Revision ID: pqm@pqm.ubuntu.com-20110729020801-fn8z5s8tj0y3ddrb
(mbp) cope with proxies that drop the connection during a multipart response
 (bug 198646) (Martin Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1722
1722
        InvalidHttpResponse.__init__(self, path, msg)
1723
1723
 
1724
1724
 
 
1725
class HttpBoundaryMissing(InvalidHttpResponse):
 
1726
    """A multipart response ends with no boundary marker.
 
1727
 
 
1728
    This is a special case caused by buggy proxies, described in
 
1729
    <https://bugs.launchpad.net/bzr/+bug/198646>.
 
1730
    """
 
1731
 
 
1732
    _fmt = "HTTP MIME Boundary missing for %(path)s: %(msg)s"
 
1733
 
 
1734
    def __init__(self, path, msg):
 
1735
        InvalidHttpResponse.__init__(self, path, msg)
 
1736
 
 
1737
 
1725
1738
class InvalidHttpContentType(InvalidHttpResponse):
1726
1739
 
1727
1740
    _fmt = 'Invalid http Content-type "%(ctype)s" for %(path)s: %(msg)s'