How can put this character to header?

Hmm. Would adding a %A0 at the front work? i.e. a non-breaking space.

I’m surprised Caddy is trimming whitespace here. I think it shouldn’t. I’ll look into it.

Edit: The Caddyfile adapter doesn’t trim the whitespace (the whitespace is preserved in the adapted JSON), and I’m not seeing anything in the headers.go code that trims before setting the values… does the Go stdlib http.Header do this implicitly @matt?

1 Like