twisted / twisted/klein

allow for "overlay" routing

Open
#70 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
Python
Stars
838
Forks
123
Avg merge
7h 58m
Merged PRs (30d)
12

Description

Sometimes I have a structure like this:

@route("/a/", branch=True)
def some_tree(request):
    return static.File("...")

@route("/a/foo/bar/special_thing.txt")
def some_overlaid_resource(request):
    return EventSource(...)

I'd really like that second route to show up if that specific route is requested, but the first to take over for everything else within that hierarchy.

Probably this is a bug in Werkzeug, but I am experiencing it with Klein so I'm starting here.

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 by reproducing the two-route example in Klein and trace how the branch route handles requests under /a/. Compare the observed behavior with Werkzeug routing, then verify that the specific route is selected while the branch handles other paths beneath the hierarchy.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.