def read_request_headers(self): """ Reads the request headers out of the underlying TTransportBase and return an FContext Returns: FContext """ headers = _Headers._read(self.get_transport()) context = FContext() for key, value in headers.items(): context.set_request_header(key, value) op_id = headers[_OPID_HEADER] context._set_response_op_id(op_id) # Put a new opid in the request headers so this context an be # used/propagated on the receiver context.set_request_header(_OPID_HEADER, _get_next_op_id()) cid = context.correlation_id if cid: context.set_response_header(_CID_HEADER, cid) return context
def read_request_headers(self): """Reads the request headers out of the underlying TTransportBase and return an FContext Returns: FContext """ headers = _Headers._read(self.get_transport()) context = FContext() for key, value in headers.items(): context._set_request_header(key, value) op_id = headers[_OPID_HEADER] context._set_response_op_id(op_id) cid = context.correlation_id if cid: context._set_response_header(_CID_HEADER, cid) return context