elnode
elnode copied to clipboard
Special characters in routes
Not sure if this is a true issue, but I ran into this while testing peek-mode with the scratch buffer, which contains the '*' character.
A simple example:
(defconst test-url
'(("^/test/$" . test-handler)))
(defun test-handler (httpcon))
(defun my-test-handler (httpcon)
(elnode-hostpath-dispatcher httpcon test-url))
(elnode-start 'my-test-handler :port 8010 :host "localhost")
Then visit:
http://localhost:8010/blah/ --> 404 not found, this is fine.
http://localhost:8010/bl*ah/ --> string 'Server error' returned with status 200
Sounds like an issue to me... can't remember if * is a valid char in urls though. I think I might have written a check with an error in there somewhere. I'll take a look.