On Sat, 5 Oct 2013 11:47:36 -0700 (PDT)
Niphlod <[email protected]> wrote:

> web2py looks for remote_port to look for the parameters_xxx.py file,
> not http_x_forwarded port.

I did some further testing...

First of all, tried to write minimal Flask app showing headers and
tolerating web2py bashing in #flask.

Then I found out that flask is also sets SERVER_PORT & REMOTE_PORT to
'80'.

Further experiments, revealed that e.g. diesel server reports the
following:

HTTP_HOST       :       
atmarama.sites.djangohosting.ch
HTTP_X_FORWARDED_PORT   :       
443
HTTP_X_FORWARDED_PROTO  :       
https
HTTP_X_FORWARDED_PROTOCOL       :       
https
HTTP_X_REAL_IP  :       
93.139.202.152
HTTP_X_REAL_PORT        :       
93.139.202.152
PATH_INFO       :       
/welcome/default/index
QUERY_STRING    :       
RAW_URI :       
/welcome/default/index
REMOTE_ADDR     :       
127.0.0.1
REQUEST_METHOD  :       
GET
SCRIPT_NAME     :       
SERVER_PORT     :       
62019

and by providing parameters_62019.py, web2py is happy now. :-)

And I assume it's correct assuming that wsgiserver is listening on that
port, right?

I've two questions:

1) why web2py puts strange (to me) value in HTTP_REAL_PORT?

2) why is wsgi.url_scheme       :       
http

and not https?

So, e.g cherrypy, diesel, rocket correctly report 62019 port, while
gunicorn does not.

Thank you for all the input, let me contact gunicorn dev about it.


Sincerely,
Gour

-- 
A person who is not disturbed by the incessant flow of 
desires — that enter like rivers into the ocean, which is 
ever being filled but is always still — can alone achieve 
peace, and not the man who strives to satisfy such desires.

http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to