elnode icon indicating copy to clipboard operation
elnode copied to clipboard

Special characters in routes

Open erikriverson opened this issue 11 years ago • 1 comments

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

erikriverson avatar Aug 28 '14 22:08 erikriverson

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.

nicferrier avatar Aug 29 '14 21:08 nicferrier