We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e0d86d commit f3d319fCopy full SHA for f3d319f
lua/rest-nvim/request/init.lua
@@ -290,8 +290,11 @@ M.buf_get_request = function(bufnr, curpos)
290
local curl_args, body_start = get_curl_args(bufnr, headers_end, end_line)
291
292
local host = headers[utils.key(headers, "host")] or ""
293
- parsed_url.url = host:gsub("%s+", "") .. parsed_url.url
294
- headers[utils.key(headers, "host")] = nil
+
+ if string.sub(parsed_url.url, 1, 1) == "/" then
295
+ parsed_url.url = host:gsub("%s+", "") .. parsed_url.url
296
+ headers[utils.key(headers, "host")] = nil
297
+ end
298
299
local body = get_body(bufnr, body_start, end_line)
300
0 commit comments