Oracle web cache does not rewrite port correctly in HTTP header and page contents 

Joined:
03/21/2010
Posts:
48

April 25, 2010 05:09:14    Last update: April 25, 2010 05:10:46
  1. Oracle Web Cache version used:
    Oracle Application Server Web Cache 10.1.2.3.0
    Copyright (c) 1999, 2008, Oracle. All rights reserved.
    


  2. The test page is a simple Struts action sending a URL redirect:
    public ActionForward execute(ActionMapping map,
                                     ActionForm form,
                                     HttpServletRequest req,
                                     HttpServletResponse resp)
                                     throws IOException, ServletException {
            resp.sendRedirect("/testApp/index.jsp"); 
            return null;
        }
    


  3. Web Cache setup
    Origin server
    Host NamePort
    oas.host7777


    Site
    Host NamePortURL Path Prefix
    webcache.host80


  4. Test results
    Request directly to the OC4J (Oracle Application Server):
    C:\work\testAppWebApp2>curl --dump-header - http://oas.host:7777/testApp/index.do
    HTTP/1.1 302 Moved Temporarily
    Date: Sat, 24 Apr 2010 20:20:12 GMT
    Server: Oracle-Application-Server-10g/10.1.3.5.0 Oracle-HTTP-Server
    Set-Cookie: JSESSIONID=a50c3c6cdd7ea0bfd4267ec6d1998e5ea2fef1f2ac34475f2b5f234c6
    550ded5.e3mRbNiObx0Oe38Tb30Lc3iQa40; path=/testApp
    Location: http://oas.host:7777/testApp/index.jsp
    Transfer-Encoding: chunked
    Content-Type: text/html
    
    <HTML><HEAD>
    <TITLE>Redirect to http://oas.host:7777/testApp/index.jsp</TITLE>
    </HEAD>
    <BODY><A HREF="http://oas.host:7777/testApp/index.jsp">
    http://oas.host:7777/testApp/index.jsp</A></BODY></HTML>
    


    Request to Oracle Web Cache:
    C:\work\testAppWebApp2>curl --dump-header - http://webcache.host/testApp/index.do
    HTTP/1.1 302 Moved Temporarily
    Location: http://webcache.host:7777/testApp/index.jsp
    Content-Type: text/html
    Set-Cookie: ORA_WX_SESSION="4BB06EB96D94FF58A71CE09C1B3BBAC224745034-1#2"; path=/
    Set-Cookie: JSESSIONID=bd34f55fb8cd83019b1efe5b6890c9b9031887552bded994ee90d0a8c
    3d5162f.e3mRbNiObx0Oe38Tb30Lc3iQa40; path=/testApp
    Server: Oracle-Application-Server-10g/10.1.3.5.0 Oracle-HTTP-Server 
    OracleAS-Web-Cache-10g/10.1.2.3.0 (N;ecid=22769053913,0)
    Content-Length: 228
    Date: Sat, 24 Apr 2010 20:20:28 GMT
    
    <HTML><HEAD>
    <TITLE>Redirect to http://webcache.host:7777/testApp/index.jsp</TITLE>
    </HEAD>
    <BODY><A HREF="http://webcache.host:7777/testApp/index.jsp">
    http://webcache.host:7777/testApp/index.jsp</A></BODY></HTML>
    


    Notice that Oracle Web Cache correctly translated the host name in the header and HTML page. However, the port number remained that of the Oracle App Server.

Share |
| Comment  | Tags
2 comments