www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dino Valente <d...@zooid.com>
Subject mod_jserv/5036: sendRedirect is slow under Netscape.
Date Sat, 18 Sep 1999 00:29:52 GMT

>Number:         5036
>Category:       mod_jserv
>Synopsis:       sendRedirect is slow under Netscape.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jserv
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Fri Sep 17 17:40:00 PDT 1999
>Last-Modified:
>Originator:     dino@zooid.com
>Organization:
apache
>Release:        1.0
>Environment:
NT 4.0, jdk1.2.2,
>Description:
Under IE 4.0, everything works fine and redirection is quick. However, under
Netscape 4.61, it takes about 4-6 seconds before the redirected page is
displayed.

If I use another Servlet engine (e.g. JRun), this problem doesn't occur.
>How-To-Repeat:
TestServlet.java:
---------------------
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class TestServlet extends HttpServlet {
public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
  resp.setContentType("text/html");
  PrintWriter out = resp.getWriter();
  out.println("<HTML><HEAD>");
  out.println("<TITLE>HTML directory");
  out.println("</TITLE></HEAD><BODY TEXT=\"#800000\"
BGCOLOR=\"#FEFBEB\"><FORM METHOD=\"POST\" >");
  out.println("<BR><INPUT TYPE=\"SUBMIT\" VALUE=\"Test redirect\"
NAME=\"Test redirect\">");
  out.println("</FORM></BODY></HTML>");
  out.close();
}
public void doPost(final HttpServletRequest req,
       HttpServletResponse resp)
  throws ServletException, IOException {
  int port = req.getServerPort();
  String abs = req.getScheme() + "://" + req.getServerName() +
     (port == 80 ? "" : ":"+port) + "/servlet/HelloServlet";
  System.err.println( "Redirecting to: " + abs + " resp class name:" +
resp.getClass().getName());
  resp.sendRedirect( abs );
}
}
----------------
HelloServlet.java
-------------------

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloServlet extends HttpServlet {
public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
  resp.setContentType("text/html");
  PrintWriter out = resp.getWriter();
  out.println("<HTML><HEAD>");
  out.println("<TITLE>Hi there");
  out.println("</TITLE></HEAD><BODY TEXT=\"#800000\"
BGCOLOR=\"#FEFBEB\"><FORM METHOD=\"POST\" >");
  out.println("Hi there </FORM></BODY></HTML>");
  out.close();
}
}

Call TestServlet and press "Test redirect" under Netscape 4.61 (try this
with IE 4.0 and see the speed difference).
>Fix:

>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <apbugs@Apache.Org> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or      ]
["Re: general/1098:").  If the subject doesn't match this       ]
[pattern, your message will be misfiled and ignored.  The       ]
["apbugs" address is not added to the Cc line of messages from  ]
[the database automatically because of the potential for mail   ]
[loops.  If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request from a  ]
[developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]




Mime
View raw message