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

http://127.0.0.1:5000/HomePage #44

Closed
davidawad opened this Issue Oct 16, 2014 · 6 comments

Comments

Projects
None yet
2 participants
@davidawad
Contributor

davidawad commented Oct 16, 2014

Messes with my flask apps!
Every time i run any app and try to navigate to http://127.0.0.1:5000/
it changes it to http://127.0.0.1:5000/HomePage

I'm not even using this app anymore I'm trying to use other flask apps that were working before.

@davidawad

This comment has been minimized.

Show comment
Hide comment
@davidawad

davidawad Oct 16, 2014

Contributor

Should have mentioned i was using the example code. In wiki.py the app.redirect rule is what caused this problem but it seems to have affected my flask installation. I uninstalled flask and tried changing the line but nothing seems to be working.

Contributor

davidawad commented Oct 16, 2014

Should have mentioned i was using the example code. In wiki.py the app.redirect rule is what caused this problem but it seems to have affected my flask installation. I uninstalled flask and tried changing the line but nothing seems to be working.

@dcrosta

This comment has been minimized.

Show comment
Hide comment
@dcrosta

dcrosta Oct 17, 2014

Owner

When you get redirected to http://127.0.0.1:5000/HomePage, do you get a 404 error from the app you're trying to run, or do you see the wiki example homepage? If you see the latter, it probably means you still have the wiki example app running somewhere -- check your terminal windows to see if it's still running, and if that fails, run ps aux | grep wiki.py | grep -v grep (assuming you're on OS X, Linux, or similar -- I don't know how to do the equivalent on Windows) -- if you see any output from that command, then it's running somewhere and you have to kill it (kill -INT <pid> where <pid> is the value of the second column of output should do the trick)

Owner

dcrosta commented Oct 17, 2014

When you get redirected to http://127.0.0.1:5000/HomePage, do you get a 404 error from the app you're trying to run, or do you see the wiki example homepage? If you see the latter, it probably means you still have the wiki example app running somewhere -- check your terminal windows to see if it's still running, and if that fails, run ps aux | grep wiki.py | grep -v grep (assuming you're on OS X, Linux, or similar -- I don't know how to do the equivalent on Windows) -- if you see any output from that command, then it's running somewhere and you have to kill it (kill -INT <pid> where <pid> is the value of the second column of output should do the trick)

@davidawad

This comment has been minimized.

Show comment
Hide comment
@davidawad

davidawad Oct 19, 2014

Contributor

I'm getting a 404 error. That command didn't have any output. The process isn't running anymore i'm sure of that. I just don't understand what to do about this problem. It's really frustrating. I've restarted my computer since then so even if it was still running it's definitely not now. What is the purpose of the re-direct rule? Why is it applying itself permanently to other flask apps?

Contributor

davidawad commented Oct 19, 2014

I'm getting a 404 error. That command didn't have any output. The process isn't running anymore i'm sure of that. I just don't understand what to do about this problem. It's really frustrating. I've restarted my computer since then so even if it was still running it's definitely not now. What is the purpose of the re-direct rule? Why is it applying itself permanently to other flask apps?

@dcrosta

This comment has been minimized.

Show comment
Hide comment
@dcrosta

dcrosta Oct 20, 2014

Owner

Ah, I see what's happening -- the rule made by https://github.com/dcrosta/flask-pymongo/blob/master/examples/wiki/wiki.py#L32 returns a permanent redirect, which your browser is caching (correctly). You should be able to "fix" the issue by clearing your browser caches, and you can confirm this by trying another browser which you've never used to look at the wiki app.

I'll update the example app when I get a moment, or you could (I'll accept a PR for this). Sorry about this!

Owner

dcrosta commented Oct 20, 2014

Ah, I see what's happening -- the rule made by https://github.com/dcrosta/flask-pymongo/blob/master/examples/wiki/wiki.py#L32 returns a permanent redirect, which your browser is caching (correctly). You should be able to "fix" the issue by clearing your browser caches, and you can confirm this by trying another browser which you've never used to look at the wiki app.

I'll update the example app when I get a moment, or you could (I'll accept a PR for this). Sorry about this!

@davidawad

This comment has been minimized.

Show comment
Hide comment
@davidawad

davidawad Oct 20, 2014

Contributor

Cool. I'll edit it a bit. It's really just removing the line and messing with some names. Thanks!

Contributor

davidawad commented Oct 20, 2014

Cool. I'll edit it a bit. It's really just removing the line and messing with some names. Thanks!

davidawad added a commit to davidawad/flask-pymongo that referenced this issue Jan 5, 2015

Solves the url redirect rule problem
I brought this up a WHILE ago in an issue - dcrosta#44
Finally remembered to fix it.
@dcrosta

This comment has been minimized.

Show comment
Hide comment
@dcrosta

dcrosta May 21, 2017

Owner

Closed by #51 -- @davidawad thanks for the patch and bug report, and I'm really ashamed it took almost 3 years to get to this, I've been horrible to this project.

Owner

dcrosta commented May 21, 2017

Closed by #51 -- @davidawad thanks for the patch and bug report, and I'm really ashamed it took almost 3 years to get to this, I've been horrible to this project.

@dcrosta dcrosta closed this May 21, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment