ring-clojure / ring-clojure/ring

function ring.util.response/file-response doesn't work with opt. :root like "C:\\" in Windows

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

Nobody has claimed this yet.

Dominant language
Clojure
Stars
3.9k
Forks
528
PR merge metrics
No merged PRs in 30d

Description

I try to resolve and foundout that .getCanonicalPath has strange behavior:
useful-stuff.multitool> (.getCanonicalPath (File. "c:"))
"C:\Users\Intel"
useful-stuff.multitool> (.getCanonicalPath (File. "c:/"))
"C:\"
useful-stuff.multitool> (.getCanonicalPath (File. "c:\"))
"C:\"

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.

Research direction

Start at ring.util.response/file-response and trace how the optional :root value is resolved on Windows. Reproduce the examples with roots such as "c:�" and "c:/", then ensure file responses handle the drive-root case consistently and verify the behavior with a regression test.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.