File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -290,8 +290,11 @@ M.buf_get_request = function(bufnr, curpos)
290290 local curl_args , body_start = get_curl_args (bufnr , headers_end , end_line )
291291
292292 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
293+
294+ 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
295298
296299 local body = get_body (bufnr , body_start , end_line )
297300
329332-- full_body boolean
330333M .stringify_request = function (req , opts )
331334 opts = vim .tbl_deep_extend (
332- " force" , -- use value from rightmost map
335+ " force" , -- use value from rightmost map
333336 { full_body = false , headers = true }, -- defaults
334337 opts or {}
335338 )
You can’t perform that action at this time.
0 commit comments