Skip to content

Commit

Permalink
fix: space character problem when parsing content-type
Browse files Browse the repository at this point in the history
  • Loading branch information
anonymous2ch committed Nov 2, 2024
1 parent a3643b2 commit 0eafaee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/kulala/internal_processing/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ local FS = require("kulala.utils.fs")
local GLOBALS = require("kulala.globals")
local DB = require("kulala.db")
local CONFIG = require("kulala.config")
local STRING_UTILS = require("kulala.utils.string")
local M = {}

-- Function to access a nested key in a table dynamically
Expand Down Expand Up @@ -111,6 +112,7 @@ M.get_config_contenttype = function()
local headers = get_lower_headers_as_table()
if headers["content-type"] then
local content_type = vim.split(headers["content-type"], ";")[1]
content_type = STRING_UTILS.trim(content_type)
local config = CONFIG.get().contenttypes[content_type]
if config then
return config
Expand Down

0 comments on commit 0eafaee

Please sign in to comment.