-
1. Re: Pages.encodeScheme(), HTTPS, and context root '/'
flashguru Mar 7, 2007 11:40 PM (in response to flashguru)Correction. serverUrl.getPort() returns -1 not serverUrl.getHost()
-
2. Re: Pages.encodeScheme(), HTTPS, and context root '/'
gavin.king Mar 7, 2007 11:41 PM (in response to flashguru)Patches are welcome.
-
3. Re: Pages.encodeScheme(), HTTPS, and context root '/'
flashguru Mar 8, 2007 12:23 AM (in response to flashguru)It might be an easy fix if standard http/https ports are assumed. However, for custom https ports, I can not think of any simple solution other than adding an attribute in the pages.xml to support custom http/https ports.
Unfortunately, this might not be the end of the story. There is a potential problem with determining the scheme using the request url as it is done in Pages.getRequestScheme(). That is, in a proxied environment, determining the scheme is a bit tricky. For example, a web server might communicate https with the browser but http with the app server, leaving the app server with no knowledge of https. Although, I have seen some web servers passing custom header values as hints to the app server.
What might work best for everybody is that if Seam can provide a pluggable implementation for the encodeScheme() functionality. This way, people with configurations similar to the ones mentioned above can write their own implementation of the encodeScheme() while everybody else can simply use the default Seam implementation. -
4. Re: Pages.encodeScheme(), HTTPS, and context root '/'
shane.bryzak Mar 8, 2007 4:29 AM (in response to flashguru)I've modified the encoding a little bit so that invalid ports will no longer be included and the extra '/' shouldn't be added. If you need to override this stuff it's an easy matter to extend Pages and override the encodeScheme() method.
-
5. Re: Pages.encodeScheme(), HTTPS, and context root '/'
flashguru Mar 8, 2007 8:46 AM (in response to flashguru)Thank you so much for a quick response.
There is, however, one thing that is still a mystery to me. In the new code:URL serverUrl = new URL(requestUrl); StringBuilder sb = new StringBuilder(); sb.append(scheme); sb.append("://"); sb.append(serverUrl.getHost()); if (serverUrl.getPort() != -1) { sb.append(":"); sb.append(serverUrl.getPort()); }
When you are switching from http to https, and you are using ports say 8080,8483, would not the serverUrl.getPort() in the above code return 8080 while what you want is 8483? -
6. Re: Pages.encodeScheme(), HTTPS, and context root '/'
shane.bryzak Mar 9, 2007 2:27 AM (in response to flashguru)We should probably make these ports configurable I guess. If you raise a JIRA issue for this I'll take care of it.
-
7. Re: Pages.encodeScheme(), HTTPS, and context root '/'
flashguru Mar 10, 2007 3:34 PM (in response to flashguru)Although I am happy with the simple fix you added, I think it might help others if the http/https custom ports were to work also.
A JIRA issue created as you requestd:
http://jira.jboss.org/jira/browse/JBSEAM-1024 -
8. Re: Pages.encodeScheme(), HTTPS, and context root '/'
shane.bryzak Mar 13, 2007 11:29 PM (in response to flashguru)Custom port configuration has now been added in CVS, you can configure your http/https ports in components.xml:
<core:pages http-port="8080" https-port="8483"/>
-
9. Re: Pages.encodeScheme(), HTTPS, and context root '/'
tony.herstell1 Mar 13, 2007 11:40 PM (in response to flashguru)Is a "howto" to set up Apache/JBossWeb? in front of a Seam App on JBoss a big ask? I guess it's more of a wiki ask (including https)
But if you have done it then a wiki page for idiots (me) would be useful.
Everytime I set it up I never really know how I did it... and dread re-producing it (like I have to soon). -
10. Re: Pages.encodeScheme(), HTTPS, and context root '/'
shane.bryzak Mar 14, 2007 12:11 AM (in response to flashguru)There's plenty of guides for this on the internet. I'd be hesitant to write one for Seam because it is something that is very dependent on the environment. That being said if you have difficulties feel free to being them up here, hopefully myself or someone else will be able to help out.
-
11. Re: Pages.encodeScheme(), HTTPS, and context root '/'
tony.herstell1 Mar 14, 2007 12:22 AM (in response to flashguru)Ok, thanks.
The ones on the net are simply not up to the standard of the seam doco.
I am getting spoiled.