From 5da87e601917535d2eaefba72e80c7060edeb732 Mon Sep 17 00:00:00 2001 From: Nang Chan Date: Sat, 28 Oct 2023 00:04:11 -0700 Subject: [PATCH] Fix bug where lowercase "content-type" was ignored ("Content-Type" only worked) --- ftplugin/rest.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ftplugin/rest.vim b/ftplugin/rest.vim index 7decc96..c2b72a0 100644 --- a/ftplugin/rest.vim +++ b/ftplugin/rest.vim @@ -209,7 +209,7 @@ function! s:ParseHeaders(start, end) let sepIdx = stridx(line, ':') if sepIdx > -1 let key = s:StrTrim(line[0:sepIdx - 1]) - let headers[key] = s:StrTrim(line[sepIdx + 1:]) + let headers[key == 'content-type' ? 'Content-Type' : key] = s:StrTrim(line[sepIdx + 1:]) endif endfor return headers