The Slim Framework support forum has moved to http://discourse.slimframework.com. This Tender forum is no longer maintained or monitored.

Slim Request Headers

Erwinson Pagtalunan's Avatar

Erwinson Pagtalunan

27 Aug, 2015 02:46 AM

Good day. I am using Slim v2 (no time to upgrade and also, v3 is still beta).
I am using custom headers and been wondering why I can't fetch it in my app.
So I decided to browse the source code, and found out that the part that converts '_' to '-' were commented out on it, resulting to my custom header values not being fetched (ex. X_FOO_BAR, yeah, I know X- headers are deprecated) and when I changed it to X-FOO-BAR, it now works.
So now, my question is that, is it okay to modify these codes? (uncomment it?)
Thanks.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac