ring-clojure / ring-headers

Ring middleware for common response headers
26 stars 12 forks source link

Custom Uri format throws Malformed exception #8

Open jojojames opened 7 years ago

jojojames commented 7 years ago

If using ring defaults with:

:absolute-redirects - Any redirects to relative URLs will be turned into redirects to absolute URLs, to better conform to the HTTP spec.

set to true,

Returning something like this:

  {:status 302
   :headers {"Location" (format "blah://blah?abc=%s" abc)}
   :body ""}

Will throw -> java.net.MalformedURLException: unknown protocol: blah

Copied from https://github.com/ring-clojure/ring/issues/306#issuecomment-329920396