You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ol...@apache.org on 2004/09/25 16:28:48 UTC

cvs commit: jakarta-commons/httpclient/xdocs authentication.xml redirects.xml tutorial.xml

olegk       2004/09/25 07:28:48

  Modified:    httpclient/xdocs authentication.xml redirects.xml
                        tutorial.xml
  Log:
  Several factual mistakes in the HttpClient 3.0 documentation corrected
  
  Contributed by Oleg Kalnichevski
  
  Revision  Changes    Path
  1.14      +2 -6      jakarta-commons/httpclient/xdocs/authentication.xml
  
  Index: authentication.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/authentication.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- authentication.xml	6 Sep 2004 20:10:02 -0000	1.13
  +++ authentication.xml	25 Sep 2004 14:28:47 -0000	1.14
  @@ -49,10 +49,6 @@
   		Credentials cred)</code> and <code>getCredentials(AuthScope authscope)</code> 
   		methods.</p>
   
  -		<p><i>Note:</i> To set default Credentials for any realm that has not been
  -		explicitly specified, pass in <code>null</code> as the value of
  -		<code>realm</code>.</p>
  -
   		<p>The automatic authorization built in to HttpClient can be disabled
   		with the method <code>setDoAuthentication(boolean doAuthentication)</code>
   		in the HttpMethod class.  The change only affects that method instance.</p>
  @@ -63,7 +59,7 @@
   		the server gives an unauthorized response in certain situations, thus reducing the overhead
   		of making the connection.  To enable this use the following:</p>
   
  -    <source>client.getState().setAuthenticationPreemptive(true);</source>
  +    <source>client.getParams().setAuthenticationPreemptive(true);</source>
   
   		<p>Preemptive authentication mode also requires default Credentials to be set 
   		for the target or proxy host against which preemptive authentication is to be 
  
  
  
  1.5       +12 -10    jakarta-commons/httpclient/xdocs/redirects.xml
  
  Index: redirects.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/redirects.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- redirects.xml	16 Sep 2004 06:24:43 -0000	1.4
  +++ redirects.xml	25 Sep 2004 14:28:48 -0000	1.5
  @@ -15,17 +15,19 @@
           with <em>HttpClient</em>.</p>
   
           <p>There are a few types of redirect that HttpClient can't handle
  -        automatically either because they require user interaction or are
  -        outside of the scope of HttpClient.  These status codes are listed <a
  -        href="#Special%20Redirect%20Codes">below</a>.</p>
  +        automatically either because they require user interaction, or they are
  +        outside of the scope of HttpClient (these status codes are listed <a
  +        href="#Special%20Redirect%20Codes">below</a>), or due to internal 
  +        limitations. Currently HttpClient is unable to automatically handle 
  +        redirects of entity enclosing methods such as <tt>POST</tt> and 
  +        <tt>PUT</tt>. There can also be situations when manual processing
  +        of redirects is desired due to specific application requirements.
  +        </p>
       </section>
   
  -    <section name="Handling Redirects">
  -      <p>When a server returns a redirect instruction to HttpClient that
  -      requires connecting to a different host, HttpClient will simply return
  -      the redirect status code as the response status.  All response codes
  -      between 300 and 399 inclusive are redirect responses of
  -      some form.  The most common redirect response codes are:</p>
  +    <section name="Handling redirects manually">
  +      <p>All response codes between 300 and 399 inclusive are redirect responses
  +       of some form. The most common redirect response codes are:</p>
   
         <ul>
           <li>301 Moved Permanently.
  
  
  
  1.8       +3 -3      jakarta-commons/httpclient/xdocs/tutorial.xml
  
  Index: tutorial.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/tutorial.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- tutorial.xml	16 Sep 2004 06:24:43 -0000	1.7
  +++ tutorial.xml	25 Sep 2004 14:28:48 -0000	1.8
  @@ -103,7 +103,7 @@
           <subsection name="HttpException">
             <p>An HttpException represents a logical error and is thrown when the request 
              cannot be sent or the response cannot be processed due to a fatal violation of 
  -           the HTTP protocol violation. Usually this kind of exceptions cannot be recovered 
  +           the HTTP specification. Usually this kind of exceptions cannot be recovered 
              from. For a detailed discussion on protocol exceptions please refer to 
              <a href="exception-handling.html#Protocol exceptions">the HttpClient exception 
              handling guide</a>. Note that HttpException actually extends IOException 
  @@ -124,7 +124,7 @@
           <subsection name="Method recovery">
           <p>Per default HttpClient will automatically attempt to recover from the not-fatal 
           errors, that is, when a plain IOException is thrown. HttpClient will retry the 
  -        method five times provided that the request has never been fully transmitted to 
  +        method three times provided that the request has never been fully transmitted to 
           the target server. For a detailed discussion on HTTP method recovery please refer 
           to <a href="exception-handling.html#HTTP transport safety">the HttpClient 
           exception handling guide</a></p>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org