<p dir="auto">Extra slashes in the URL change the routing. For example, <code class="notranslate">/x</code> and <code class="notranslate">//x</code> do not route the same way.<br>
Here's a unit test which demonstrates this:</p>
<p dir="auto"><a href="https://gist.github.com/robnagler/1a5d0361cc71a6806fc6">https://gist.github.com/robnagler/1a5d0361cc71a6806fc6</a></p>
<p dir="auto">If you put a proxy in front of flask, it will normalize the URLs so this isn't an issue. It would seem, however, that Flask should normalize the URLs as well.</p>
<p dir="auto">Here's an example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from flask import Flask
app = Flask(__name__)

@app.route('/&lt;urlvar&gt;')
def hello_world(urlvar):
    return 'Hello World! ' + repr(urlvar)

if __name__ == '__main__':
    app.run(debug=True)"><pre class="notranslate"><code class="notranslate">from flask import Flask
app = Flask(__name__)

@app.route('/&lt;urlvar&gt;')
def hello_world(urlvar):
    return 'Hello World! ' + repr(urlvar)

if __name__ == '__main__':
    app.run(debug=True)
</code></pre></div>
<p dir="auto">When running:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="curl http://localhost:5000/aaa%2Fbbb"><pre class="notranslate"><code class="notranslate">curl http://localhost:5000/aaa%2Fbbb
</code></pre></div>
<p dir="auto">I would expect to see:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Hello World! u'aaa/bbb'"><pre class="notranslate"><code class="notranslate">Hello World! u'aaa/bbb'
</code></pre></div>
<p dir="auto">Instead I get:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 3.2 Final//EN&quot;&gt;
&lt;title&gt;404 Not Found&lt;/title&gt;
&lt;h1&gt;Not Found&lt;/h1&gt;
&lt;p&gt;The requested URL was not found on the server.  If you entered the URL manually please check your spelling and try again.&lt;/p&gt;"><pre class="notranslate"><code class="notranslate">&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"&gt;
&lt;title&gt;404 Not Found&lt;/title&gt;
&lt;h1&gt;Not Found&lt;/h1&gt;
&lt;p&gt;The requested URL was not found on the server.  If you entered the URL manually please check your spelling and try again.&lt;/p&gt;
</code></pre></div>
<p dir="auto">I tested this against Flask 0.9 and Flask 0.10.1. Both had the same error.</p>
<p dir="auto">While searching for existing bug reports, I came across this: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="520442" data-permission-text="Title is private" data-url="https://github.com/pallets/werkzeug/issues/21" data-hovercard-type="issue" data-hovercard-url="/pallets/werkzeug/issues/21/hovercard" href="https://github.com/pallets/werkzeug/issues/21">pallets/werkzeug#21</a></p>
<p dir="auto">Is this related? If yes, what's the status?</p>
<p dir="auto">In any case, being a WSGI spec problem or not, this is behaviour is incorrect!</p>