common/src/main/java/HTTPClient/HTTPResponse.java
/**
     * Should the request be retried by the application? If the application
     * used an <var>HttpOutputStream</var> in the request then various
     * modules (such as the redirection and authorization modules) are not
     * able to resend the request themselves. Instead, it becomes the
     * application's responsibility. The application can check this flag, and
     * if it's set, resend the exact same request. The modules such as the
     * RedirectionModule or AuthorizationModule will then recognize the resend
     * and fix up or redirect the request as required (i.e. they defer their
     * normal action until the resend).
     *
     * <P>If the application resends the request then it <strong>must</strong>
     * use the same <var>HttpOutputStream</var> instance. This is because the
     * modules use this to recognize the retried request and to perform the
     * necessary work on the request before it's sent.
     *
     * <P>Here is a skeleton example of usage:
     * <PRE>
     *     OutputStream out = new HttpOutputStream(1234);
     *     do
     *     {
     *         rsp = con.Post("/cgi-bin/my_cgi", out);
     *         out.write(...);
     *         out.close();
     *     } while (rsp.retryRequest());
     *
     *     if (rsp.getStatusCode() >= 300)
     *         ...
     * </PRE>
     *
     * <P>Note that for this to ever return true, the java system property
     * <var>HTTPClient.deferStreamed</var> must be set to true at the beginning
     * of the application (before the HTTPConnection class is loaded). This
     * prevents unwary applications from causing inadvertent memory leaks. If
     * an application does set this, then it <em>must</em> resend any request
     * whose response returns true here in order to prevent memory leaks (a
     * switch to JDK 1.2 will allow us to use weak references and eliminate
     * this problem).
     *
     * @return true if the request should be retried.
     * @exception IOException If any exception occurs on the socket.
     * @exception ModuleException if any module encounters an exception.
     */
Should the request be retried by the application. If the application
used an HttpOutputStream in the request then various
modules (such as the redirection and authorization modules) are not
able to resend the request themselves. Instead, it becomes the
application's responsibility. The application can check this flag, and
if it's set, resend the exact same request. The modules such as the
RedirectionModule or AuthorizationModule will then recognize the resend
and fix up or redirect the request as required .

If the application resends the request then it must
use the same HttpOutputStream instance. This is because the
modules use this to recognize the retried request and to perform the
necessary work on the request before it's sent.





Note that for this to ever return true, the java system property
HTTPClient.deferStreamed must be set to true at the beginning
of the application (before the HTTPConnection class is loaded). This
prevents unwary applications from causing inadvertent memory leaks. If
an application does set this, then it must resend any request
whose response returns true here in order to prevent memory leaks (a
switch to JDK 1.2 will allow us to use weak references and eliminate
this problem).

@return true if the request should be retried.
@exception IOException If any exception occurs on the socket.
@exception ModuleException if any module encounters an exception.
Should the request be retried by the application . If the application used an HttpOutputStream in the request then various modules ( such as the redirection and authorization modules ) are not able to resend the request themselves . Instead it becomes the application ' s responsibility . The application can check this flag and if it ' s set resend the exact same request . The modules such as the RedirectionModule or AuthorizationModule will then recognize the resend and fix up or redirect the request as required . If the application resends the request then it must use the same HttpOutputStream instance . This is because the modules use this to recognize the retried request and to perform the necessary work on the request before it ' s sent . Note that for this to ever return true the java system property HTTPClient . deferStreamed must be set to true at the beginning of the application ( before the HTTPConnection class is loaded ) . This prevents unwary applications from causing inadvertent memory leaks . If an application does set this then it must resend any request whose response returns true here in order to prevent memory leaks ( a switch to JDK 1 . 2 will allow us to use weak references and eliminate this problem ) . @return true if the request should be retried . @exception IOException If any exception occurs on the socket . @exception ModuleException if any module encounters an exception .
public boolean retryRequest()  throws IOException, ModuleException
    {
	if (!initialized)
	{
	    try
		{ handleResponse(); }
	    catch (RetryException re)
		{ this.retry = response.retry; }
	}
	return retry;
    }
public boolean retryRequest ( ) throws IOException , ModuleException { if ( ! initialized ) { try { handleResponse ( ) ; } catch ( RetryException re ) { this . retry = response . retry ; } } return retry ; }
Should the request be retried by the application?
Should the request be retried by the application?