Skip to content

Commit 60966f3

Browse files
David MaloneyDavid Maloney
authored andcommitted
handle a blank response body
sometimes the response body itself can be blank so we need to handle that properly. MSP-9972
1 parent 4293af0 commit 60966f3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/rex/parser/appscan_nokogiri.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@ def record_request_and_response
195195
res_header = Rex::Proto::Http::Packet::Header.new
196196
req_header.from_s request_headers.lstrip
197197
res_header.from_s response_headers.lstrip
198+
if response_body.blank?
199+
response_body = ''
200+
end
198201
@state[:request_headers] = req_header
199202
@state[:request_body] = request_body.lstrip
200203
@state[:response_headers] = res_header

0 commit comments

Comments
 (0)