Skip to content

Commit

Permalink
Update lua/hurl/lib/hurl_parser.lua
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
jellydn and coderabbitai[bot] authored Oct 31, 2024
1 parent de1d1e8 commit 2486f56
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/hurl/lib/hurl_parser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@ function M.parse_hurl_output(stderr, stdout)
-- Check the next line for the actual request details
if i < #lines then
local nextLine = lines[i + 1]
local method, url = nextLine:match('^%* (%w+)%s+(.+)')
local method, url = nextLine:match('^%* (%w+)%s+([^%s].*)$')
if method and url and currentEntry then
currentEntry.requestMethod = method
currentEntry.requestUrl = url
currentEntry.requestUrl = url:gsub('%%20', ' '):gsub('%%(%x%x)', function(h)
return string.char(tonumber(h, 16))
end)
end
end
elseif line:find('^error:') then
Expand Down

0 comments on commit 2486f56

Please sign in to comment.