Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if clip description ends with ? it wil skip first argument #2

Open
SurajBhari opened this issue Feb 21, 2024 · 2 comments
Open

if clip description ends with ? it wil skip first argument #2

SurajBhari opened this issue Feb 21, 2024 · 2 comments
Assignees
Labels
bug Something isn't working stale Things that are held for long time

Comments

@SurajBhari
Copy link
Owner

No description provided.

@SurajBhari SurajBhari changed the title if clip description ends with ? it wil overwrite request.args if clip description ends with ? it wil first argument Feb 21, 2024
@SurajBhari SurajBhari changed the title if clip description ends with ? it wil first argument if clip description ends with ? it wil skip first argument Feb 21, 2024
@SurajBhari
Copy link
Owner Author

SurajBhari commented Feb 21, 2024

from flask import Flask, request



app = Flask(__name__)

@app.route("/<a>/<b>")
def a_b(a,b):
    print(a)
    print(b)
    print(request.args)
    return "ok"
app.run()

curling http://localhost:5000/a/b??delay=5
will print

a
b
ImmutableMultiDict([('?delay')])

this is expected behaviour. an ? in arg should not be a part of arg but last positional location.

@SurajBhari SurajBhari added the bug Something isn't working label Feb 21, 2024
@SurajBhari SurajBhari self-assigned this Feb 21, 2024
@SurajBhari
Copy link
Owner Author

A patch to fix half of the issue was implemented
now you can't escape the argument

@SurajBhari SurajBhari added the stale Things that are held for long time label Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale Things that are held for long time
Projects
None yet
Development

No branches or pull requests

1 participant