Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Custom Uri format throws Malformed exception

Open
#8 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
clojure
Domain
backend

Research direction

Start by locating the Ring middleware handling the :absolute-redirects option and reproduce the example with the custom blah:// URI. Trace why the redirect is treated as a malformed URL; done means custom URI schemes no longer trigger the reported MalformedURLException while absolute redirects continue to work.

Written by the indexing model from the issue text.

Description

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

Dominant language
Clojure
Stars
27
Forks
13
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ring-clojure/ring-headers

All issues in ring-clojure/ring-headers

Similar issues

More Clojure issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.