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

URL for UI must have ui/ #831

Closed
ericraymond opened this issue Dec 21, 2018 · 1 comment
Closed

URL for UI must have ui/ #831

ericraymond opened this issue Dec 21, 2018 · 1 comment
Assignees

Comments

@ericraymond
Copy link

Description

In 2.1, the url for the ui must have a slash after ui (e.g., https://site.name/ui/) Request to https://site.name/ui fail

Expected behaviour

https://site.name/ui should work the same as https://site.name/ui/

Actual behaviour

Throws a 500 error with the following logs:

Error: 301 Moved Permanently: None
Traceback:
Traceback (most recent call last):
  File "/home/ubuntu/foo/site-packages/werkzeug/routing.py", line 1538, in match
    rv = rule.match(path, method)
  File "/home/ubuntu/foo/site-packages/werkzeug/routing.py", line 776, in match
    raise RequestSlash()
werkzeug.routing.RequestSlash
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/ubuntu/foo/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/ubuntu/foo/site-packages/flask/app.py", line 1791, in dispatch_request
    self.raise_routing_exception(req)
  File "/home/ubuntu/foo/site-packages/flask/app.py", line 1774, in raise_routing_exception
    raise request.routing_exception
  File "/home/ubuntu/foo/site-packages/flask/ctx.py", line 336, in match_request
    self.url_adapter.match(return_rule=True)
  File "/home/ubuntu/foo/site-packages/werkzeug/routing.py", line 1542, in match
    safe='/:|+') + '/', query_args))
werkzeug.routing.RequestRedirect: 301 Moved Permanently: None```


### Steps to reproduce

Using swagger (openapi 2) definition in connexion.

Visit https://site.name/ui

### Additional info:

Output of the commands:

Python 3.6.5 :: Anaconda, Inc.

connexion 2.1.0
@dtkav
Copy link
Collaborator

dtkav commented Jan 8, 2019

I wasn't able to reproduce this with Flask, but I think it is an issue with aiohttp.
There's an open PR to fix this issue here: #827

@dtkav dtkav added the bug label Jan 8, 2019
@dtkav dtkav self-assigned this Jan 24, 2019
@dtkav dtkav added the aiohttp label Mar 7, 2019
@jmcs jmcs closed this as completed in #843 Mar 25, 2019
jmcs pushed a commit that referenced this issue Mar 25, 2019
…843)

Fixes #831 

Changes proposed in this pull request:
 - redirect ui -> ui/ for aiohttp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants