RESTED icon indicating copy to clipboard operation
RESTED copied to clipboard

Extensions crashes when you return string "I need arguments..." from python code

Open hvma411 opened this issue 4 years ago • 0 comments

Hi, me and my friends found some strange bug in RESTED extension. Simple example of code (python) that crashes it below:

@app.route('/sum')
def sum():

    a = request.args.get('a')
    b = request.args.get('b')

    if a and b:
        return f"<h1>{a} + {b} = {int(a) + int(b)}</h1>"


    return "I need arguments..."

When you use RESTED request GET with "http://localhost:5000/sum" without arguments it should show you returned string "I need arguments..." but it crashes, but if you return "I need arguments" without 3 dots at the end of the string it just works ok. The problem was tested just in chrome.

hvma411 avatar Jan 27 '21 11:01 hvma411