b.t.h.SmartClientHTTPMedium(medium.SmartClientMedium) : class documentation

Part of bzrlib.transport.http View In Hierarchy

No class docstring
Method __init__ Undocumented
Method get_request Undocumented
Method should_probe Should RemoteBzrDirFormat.probe_transport send a smart request on
Method remote_path_from_transport Convert transport into a path suitable for using in a request.
Method send_http_smart_request Undocumented
Method disconnect See SmartClientMedium.disconnect().
Method _report_activity See SmartMedium._report_activity.

Inherited from SmartClientMedium:

Method protocol_version Find out if 'hello' smart request works.
Method _is_remote_before Is it possible the remote side supports RPCs for a given version?
Method _remember_remote_is_before Tell this medium that the remote side is older the given version.

Inherited from SmartMedium (via SmartClientMedium):

Method read_bytes Read some bytes from this medium.
Method _push_back Return unused bytes to the medium, because they belong to the next
Method _get_push_back_buffer Undocumented
Method _read_bytes Undocumented
Method _get_line Read bytes from this request's response until a newline byte.
def __init__(self, http_transport):
Undocumented
def get_request(self):
Undocumented
def should_probe(self):
Should RemoteBzrDirFormat.probe_transport send a smart request on this medium?

Some transports are unambiguously smart-only; there's no need to check if the transport is able to carry smart requests, because that's all it is for. In those cases, this method should return False.

But some HTTP transports can sometimes fail to carry smart requests, but still be usuable for accessing remote bzrdirs via plain file accesses. So for those transports, their media should return True here so that RemoteBzrDirFormat can determine if it is appropriate for that transport.

def remote_path_from_transport(self, transport):
Convert transport into a path suitable for using in a request.

Note that the resulting remote path doesn't encode the host name or anything but path, so it is only safe to use it in requests sent over the medium from the matching transport.

def send_http_smart_request(self, bytes):
Undocumented
def _report_activity(self, bytes, direction):
See SmartMedium._report_activity.

Does nothing; the underlying plain HTTP transport will report the activity that this medium would report.

def disconnect(self):
See SmartClientMedium.disconnect().
API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.