Skip to content

Commit ce4c150

Browse files
committed
Avoid false positive security issue in api error log; fixup header ifr
1 parent 75cf7e5 commit ce4c150

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

kafka/protocol/parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def send_request(self, request, correlation_id=None):
6363
data = request.encode(framed=True, header=True)
6464
self.bytes_to_send.append(data)
6565
if request.expect_response():
66-
self.in_flight_requests.append(header)
66+
self.in_flight_requests.append(request.header)
6767
return correlation_id
6868

6969
def send_bytes(self):
@@ -140,7 +140,7 @@ def _process_response(self, read_buffer):
140140
correlation_id = header.correlation_id
141141
response_type = get_response_class(header.api_key, header.api_version)
142142
if response_type is None:
143-
log.error('Unable to find ResponseType for api_key=%d api_version=%d',
143+
log.error('Unable to find ResponseType for api=%d version=%d',
144144
header.api_key, header.api_version)
145145
raise Errors.KafkaProtocolError('Unable to find response type for api %d v%d' % (header.api_key, header.api_version))
146146
response_header = response_type.parse_header(read_buffer)

0 commit comments

Comments
 (0)