Hi Mark, Thanks for investigating this issue. Things are not clear for me either because what you changed in getHostPort() should already be done by the parseHost() method called. Could you try to debug this a bit more and see what is wrong with the current logic? We need to take into account other protocols like HTTPS, so we use the Protocol#getDefaultPort() method instead of just '80'. Regarding why it matters: as a Restlet Component is potentially deployed as a standalone Java program, it has to know how to fully route the requests, including doing the virtual hosting/dispatching. Also, when doing client side redirections or when generating links in response entities, we need to know precisely what was the actual/complete URI used by the client to contact your server front-end (Apache HTTP in your case). Maybe its time to enter a bug report to keep track of this issue? Do you mind creating one? If you could attach a reproducible sample WebApp, that would help as well, and indicate which Servlet containers you tested with: http://www.restlet.org/community/issues
Best regards, Jerome _____ De : Mark Cornelius [mailto:[EMAIL PROTECTED] Envoyé : mardi 1 juillet 2008 15:24 À : [email protected] Objet : Re: More on port 80 - VirtualHost.resourcePort property Ok, the weird thing is, I dont get a stack trace at all. I simply get a blank screen whenever I run the application with the weblogic port set to 80. It works fine when the port is set to any other value. What I ended up doing to fix this was overriding your getHostPort() method in your HttpServerCall class with the following: Public int getHostPort(){ if (getRequestHeaders().getFirstValue()(HttpConstants.HEADER_HOST, true).indexOf(:)==-1) return 80; if(!hostParsed){ parseHost(); return super.getHostPort(); } And then overriding the constructor in HTTPRequest to always append the port number to the stringbuffer. (removing the IF logic surrounding it) When I did that, it worked whether I used a port number or not. The thing I dont get though, is why does the port number even matter, if this code is not executed until the servlet container has received the request anyway. (In which case the url would have to have specified the correct port number). Why do you need to worry about them at all? In my situation, in our environment there is a front end apache which routes requests to our servlet container, so the incoming url wont be the actual url of the servlet container itself, and incoming url will always be on port 80. Thus, I need this to work. I know there has to be something Ive overlooked. _____ From: Jerome Louvel <[EMAIL PROTECTED]> Reply-To: <[email protected]> Date: Tue, 1 Jul 2008 13:27:01 +0200 To: <[email protected]> Subject: RE: More on port 80 - VirtualHost.resourcePort property Mark, We need more details to help you out like stack traces and design details. I noticed you use ServerServletConverter but what do you have behind, a component, an application? Best regards, Jerome _____ De : Mark Cornelius [mailto:[EMAIL PROTECTED] Envoyé : lundi 30 juin 2008 18:37 À : [email protected] Objet : More on port 80 - VirtualHost.resourcePort property I read in an earlier thread someone having trouble with port 80 needed to set this property, but when/where do you do it? -- ________________________________ Mark E. Cornelius

