~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/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
"""Handlers for HTTP Responses.
18
18
 
91
91
 
92
92
    def set_boundary(self, boundary):
93
93
        """Define the boundary used in a multi parts message.
94
 
        
 
94
 
95
95
        The file should be at the beginning of the body, the first range
96
96
        definition is read and taken into account.
97
97
        """
114
114
            # IIS 6 and 7 incorrectly wrap boundary strings in <>
115
115
            # together they make a beautiful bug, which we will be gracious
116
116
            # about here
117
 
            if (self._unquote_boundary(boundary_line) != 
 
117
            if (self._unquote_boundary(boundary_line) !=
118
118
                '--' + self._boundary + '\r\n'):
119
119
                raise errors.InvalidHttpResponse(
120
120
                    self._path,
288
288
    :param msg: An HTTPMessage containing the headers for the response
289
289
    :param data: A file-like object that can be read() to get the
290
290
                 requested data
291
 
    :return: A file-like object that can seek()+read() the 
 
291
    :return: A file-like object that can seek()+read() the
292
292
             ranges indicated by the headers.
293
293
    """
294
294
    rfile = RangeFile(url, data)