/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: v.ladeuil+lp at free
  • Date: 2006-10-13 10:50:33 UTC
  • mfrom: (2077 +trunk)
  • mto: (2145.1.1 keepalive)
  • mto: This revision was merged to the branch mainline in revision 2146.
  • Revision ID: v.ladeuil+lp@free.fr-20061013105033-7e091ff8dcc0ed0c
Merge bzr.dev. Including http modifications by "smart" related code

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
                                              request.user, request.password)
82
82
 
83
83
    def _perform(self, request):
84
 
        """Send the request to the server and handles common errors."""
 
84
        """Send the request to the server and handles common errors.
 
85
 
 
86
        :returns: urllib2 Response object
 
87
        """
85
88
        if self._connection is not None:
86
89
            # Give back shared info
87
90
            request.connection = self._connection
137
140
        self._connection.fake_close()
138
141
        return code, data
139
142
 
 
143
    def _post(self, body_bytes):
 
144
        abspath = self._real_abspath('.bzr/smart')
 
145
        response = self._perform(Request('POST', abspath, body_bytes))
 
146
        code = response.code
 
147
        data = handle_response(abspath, code, response.headers, response)
 
148
        # Close response to free the httplib.HTTPConnection pipeline
 
149
        self._connection.fake_close()
 
150
        return code, data
 
151
 
140
152
    def should_cache(self):
141
153
        """Return True if the data pulled across should be cached locally.
142
154
        """