You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2022/11/06 19:02:25 UTC
svn commit: r1905103 [2/9] - in /httpcomponents/site: ./ httpcomponents-asyncclient-4.1.x/ httpcomponents-client-4.5.x/ httpcomponents-client-5.1.x/ httpcomponents-client-5.1.x/migration-guide/ httpcomponents-client-5.2.x/ httpcomponents-core-4.4.x/ ht...
Modified: httpcomponents/site/httpcomponents-client-4.5.x/examples.html
URL: http://svn.apache.org/viewvc/httpcomponents/site/httpcomponents-client-4.5.x/examples.html?rev=1905103&r1=1905102&r2=1905103&view=diff
==============================================================================
--- httpcomponents/site/httpcomponents-client-4.5.x/examples.html (original)
+++ httpcomponents/site/httpcomponents-client-4.5.x/examples.html Sun Nov 6 19:02:24 2022
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
- | Generated by Apache Maven Doxia Site Renderer 1.9.2 from src/site/markdown/httpcomponents-client-4.5.x/examples.md
+ | Generated by Apache Maven Doxia Site Renderer 1.11.1 from src/site/markdown/httpcomponents-client-4.5.x/examples.md
| Rendered using Apache Maven Fluido Skin 1.9
-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
- <meta name="generator" content="Apache Maven Doxia Site Renderer 1.9.2" />
+ <meta name="generator" content="Apache Maven Doxia Site Renderer 1.11.1" />
<title>Apache HttpComponents – HttpClient Examples</title>
<link rel="stylesheet" href="../css/apache-maven-fluido-1.9.min.css" />
<link rel="stylesheet" href="../css/site.css" />
@@ -25,7 +25,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
- <li id="publishDate">Last Published: 2022-10-31<span class="divider">|</span>
+ <li id="publishDate">Last Published: 2022-11-06<span class="divider">|</span>
</li>
<li class=""><a href="http://hc.apache.org/index.html" class="externalLink" title="HttpComponents">HttpComponents</a><span class="divider">/</span></li>
<li class="active ">HttpClient Examples <a href="https://github.com/apache/httpcomponents-website/tree/master/src/site/markdown/httpcomponents-client-4.5.x/examples.md"><img src="../images/accessories-text-editor.png" title="Edit" /></a></li>
@@ -51,8 +51,7 @@
<li class="nav-header">Components</li>
<li><a href="../httpcomponents-client-5.2.x/index.html" title="HttpClient 5.2 BETA"><span class="icon-chevron-right"></span>HttpClient 5.2 BETA</a></li>
<li><a href="../httpcomponents-client-5.1.x/index.html" title="HttpClient 5.1"><span class="icon-chevron-right"></span>HttpClient 5.1</a></li>
- <li><a href="../httpcomponents-core-5.2.x/index.html" title="HttpCore 5.2 BETA"><span class="icon-chevron-right"></span>HttpCore 5.2 BETA</a></li>
- <li><a href="../httpcomponents-core-5.1.x/index.html" title="HttpCore 5.1"><span class="icon-chevron-right"></span>HttpCore 5.1</a></li>
+ <li><a href="../httpcomponents-core-5.2.x/index.html" title="HttpCore 5.2"><span class="icon-chevron-right"></span>HttpCore 5.2</a></li>
<li><a href="../httpcomponents-client-4.5.x/index.html" title="HttpClient 4.5"><span class="icon-chevron-down"></span>HttpClient 4.5</a>
<ul class="nav nav-list">
<li><a href="../httpcomponents-client-4.5.x/quickstart.html" title="Quick Start"><span class="none"></span>Quick Start</a></li>
@@ -113,89 +112,104 @@
<h1>HttpClient Examples</h1>
<ul>
-<li><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientWithResponseHandler.java">Response handling</a></li>
-</ul>
-<p>This example demonstrates how to process HTTP responses using a response handler. This is the recommended way of executing HTTP requests and processing HTTP responses. This approach enables the caller to concentrate on the process of digesting HTTP responses and to delegate the task of system resource deallocation to HttpClient. The use of an HTTP response handler guarantees that the underlying HTTP connection will be released back to the connection manager automatically in all cases.</p>
-<ul>
+<li>
-<li><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientConnectionRelease.java">Manual connection release</a></li>
-</ul>
-<p>This example demonstrates how to ensure the release of the underlying HTTP connection back to the connection manager in case of a manual processing of HTTP responses.</p>
-<ul>
+<p><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientWithResponseHandler.java">Response handling</a></p>
+<p>This example demonstrates how to process HTTP responses using a response handler. This is the recommended way of
+executing HTTP requests and processing HTTP responses. This approach enables the caller to concentrate on the process
+of digesting HTTP responses and to delegate the task of system resource deallocation to HttpClient. The use of an HTTP
+response handler guarantees that the underlying HTTP connection will be released back to the connection manager
+automatically in all cases.</p>
+</li>
+<li>
-<li><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientConfiguration.java">HttpClient configuration</a></li>
-</ul>
-<p>This example demonstrates how to customize and configure the most common aspects of HTTP request execution and connection management.</p>
-<ul>
+<p><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientConnectionRelease.java">Manual connection release</a></p>
+<p>This example demonstrates how to ensure the release of the underlying HTTP connection back to the connection manager
+in case of a manual processing of HTTP responses.</p>
+</li>
+<li>
-<li><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientAbortMethod.java">Abort method</a></li>
-</ul>
+<p><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientConfiguration.java">HttpClient configuration</a></p>
+<p>This example demonstrates how to customize and configure the most common aspects of HTTP request execution and
+connection management.</p>
+</li>
+<li>
+
+<p><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientAbortMethod.java">Abort method</a></p>
<p>This example demonstrates how to abort an HTTP request before its normal completion.</p>
-<ul>
+</li>
+<li>
-<li><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientAuthentication.java">Client authentication</a></li>
-</ul>
+<p><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientAuthentication.java">Client authentication</a></p>
<p>This example uses HttpClient to execute an HTTP request against a target site that requires user authentication.</p>
-<ul>
+</li>
+<li>
-<li><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientExecuteProxy.java">Request via a proxy</a></li>
-</ul>
+<p><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientExecuteProxy.java">Request via a proxy</a></p>
<p>This example demonstrates how to send an HTTP request via a proxy.</p>
-<ul>
+</li>
+<li>
-<li><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientProxyAuthentication.java">Proxy authentication</a></li>
-</ul>
-<p>A simple example showing execution of an HTTP request over a secure connection tunneled through an authenticating proxy.</p>
-<ul>
+<p><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientProxyAuthentication.java">Proxy authentication</a></p>
+<p>A simple example showing execution of an HTTP request over a secure connection tunneled through an authenticating
+proxy.</p>
+</li>
+<li>
-<li><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientChunkEncodedPost.java">Chunk encoded POST</a></li>
-</ul>
+<p><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientChunkEncodedPost.java">Chunk encoded POST</a></p>
<p>This example shows how to stream out a request entity using chunk encoding.</p>
-<ul>
+</li>
+<li>
-<li><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientCustomContext.java">Custom execution context</a></li>
-</ul>
+<p><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientCustomContext.java">Custom execution context</a></p>
<p>This example demonstrates the use of a local HTTP context populated custom attributes.</p>
-<ul>
+</li>
+<li>
-<li><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientFormLogin.java">Form based logon</a></li>
-</ul>
+<p><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientFormLogin.java">Form based logon</a></p>
<p>This example demonstrates how HttpClient can be used to perform form-based logon.</p>
-<ul>
+</li>
+<li>
-<li><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientMultiThreadedExecution.java">Threaded request execution</a></li>
-</ul>
+<p><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientMultiThreadedExecution.java">Threaded request execution</a></p>
<p>An example that executes HTTP requests from multiple worker threads.</p>
-<ul>
+</li>
+<li>
-<li><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientCustomSSL.java">Custom SSL context</a></li>
-</ul>
+<p><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientCustomSSL.java">Custom SSL context</a></p>
<p>This example demonstrates how to create secure connections with a custom SSL context.</p>
-<ul>
+</li>
+<li>
-<li><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientPreemptiveBasicAuthentication.java">Preemptive BASIC authentication</a></li>
-</ul>
-<p>This example shows how HttpClient can be customized to authenticate preemptively using BASIC scheme. Generally, preemptive authentication can be considered less secure than a response to an authentication challenge and therefore discouraged.</p>
-<ul>
+<p><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientPreemptiveBasicAuthentication.java">Preemptive BASIC authentication</a></p>
+<p>This example shows how HttpClient can be customized to authenticate preemptively using BASIC scheme. Generally,
+preemptive authentication can be considered less secure than a response to an authentication challenge and therefore
+discouraged.</p>
+</li>
+<li>
-<li><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientPreemptiveDigestAuthentication.java">Preemptive DIGEST authentication</a></li>
-</ul>
-<p>This example shows how HttpClient can be customized to authenticate preemptively using DIGEST scheme. Generally, preemptive authentication can be considered less secure than a response to an authentication challenge and therefore discouraged.</p>
-<ul>
+<p><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientPreemptiveDigestAuthentication.java">Preemptive DIGEST authentication</a></p>
+<p>This example shows how HttpClient can be customized to authenticate preemptively using DIGEST scheme. Generally,
+preemptive authentication can be considered less secure than a response to an authentication challenge and therefore
+discouraged.</p>
+</li>
+<li>
-<li><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ProxyTunnelDemo.java">Proxy tunnel</a></li>
-</ul>
-<p>This example shows how to use ProxyClient in order to establish a tunnel through an HTTP proxy for an arbitrary protocol.</p>
-<ul>
+<p><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ProxyTunnelDemo.java">Proxy tunnel</a></p>
+<p>This example shows how to use ProxyClient in order to establish a tunnel through an HTTP proxy for an arbitrary
+protocol.</p>
+</li>
+<li>
-<li><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpmime/src/examples/org/apache/http/examples/entity/mime/ClientMultipartFormPost.java">Multipart encoded request entity</a></li>
-</ul>
+<p><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpmime/src/examples/org/apache/http/examples/entity/mime/ClientMultipartFormPost.java">Multipart encoded request entity</a></p>
<p>This example shows how to execute requests enclosing a multipart encoded entity.</p>
-<ul>
+</li>
+<li>
-<li><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient-win/src/examples/org/apache/http/examples/client/win/ClientWinAuth.java">Native Windows Negotiate/NTLM</a></li>
-</ul>
+<p><a class="externalLink" href="https://github.com/apache/httpcomponents-client/tree/4.5.x/httpclient-win/src/examples/org/apache/http/examples/client/win/ClientWinAuth.java">Native Windows Negotiate/NTLM</a></p>
<p>This example shows how to make use of Native Windows Negotiate/NTLM authentication when running on Windows OS.</p>
+</li>
+</ul>
</main>
</div>
</div>
Modified: httpcomponents/site/httpcomponents-client-4.5.x/index.html
URL: http://svn.apache.org/viewvc/httpcomponents/site/httpcomponents-client-4.5.x/index.html?rev=1905103&r1=1905102&r2=1905103&view=diff
==============================================================================
--- httpcomponents/site/httpcomponents-client-4.5.x/index.html (original)
+++ httpcomponents/site/httpcomponents-client-4.5.x/index.html Sun Nov 6 19:02:24 2022
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
- | Generated by Apache Maven Doxia Site Renderer 1.9.2 from src/site/markdown/httpcomponents-client-4.5.x/index.md
+ | Generated by Apache Maven Doxia Site Renderer 1.11.1 from src/site/markdown/httpcomponents-client-4.5.x/index.md
| Rendered using Apache Maven Fluido Skin 1.9
-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
- <meta name="generator" content="Apache Maven Doxia Site Renderer 1.9.2" />
+ <meta name="generator" content="Apache Maven Doxia Site Renderer 1.11.1" />
<title>Apache HttpComponents – HttpClient Overview</title>
<link rel="stylesheet" href="../css/apache-maven-fluido-1.9.min.css" />
<link rel="stylesheet" href="../css/site.css" />
@@ -25,7 +25,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
- <li id="publishDate">Last Published: 2022-10-31<span class="divider">|</span>
+ <li id="publishDate">Last Published: 2022-11-06<span class="divider">|</span>
</li>
<li class=""><a href="http://hc.apache.org/index.html" class="externalLink" title="HttpComponents">HttpComponents</a><span class="divider">/</span></li>
<li class="active ">HttpClient Overview <a href="https://github.com/apache/httpcomponents-website/tree/master/src/site/markdown/httpcomponents-client-4.5.x/index.md"><img src="../images/accessories-text-editor.png" title="Edit" /></a></li>
@@ -51,8 +51,7 @@
<li class="nav-header">Components</li>
<li><a href="../httpcomponents-client-5.2.x/index.html" title="HttpClient 5.2 BETA"><span class="icon-chevron-right"></span>HttpClient 5.2 BETA</a></li>
<li><a href="../httpcomponents-client-5.1.x/index.html" title="HttpClient 5.1"><span class="icon-chevron-right"></span>HttpClient 5.1</a></li>
- <li><a href="../httpcomponents-core-5.2.x/index.html" title="HttpCore 5.2 BETA"><span class="icon-chevron-right"></span>HttpCore 5.2 BETA</a></li>
- <li><a href="../httpcomponents-core-5.1.x/index.html" title="HttpCore 5.1"><span class="icon-chevron-right"></span>HttpCore 5.1</a></li>
+ <li><a href="../httpcomponents-core-5.2.x/index.html" title="HttpCore 5.2"><span class="icon-chevron-right"></span>HttpCore 5.2</a></li>
<li class="active"><a href="#"><span class="icon-chevron-down"></span>HttpClient 4.5</a>
<ul class="nav nav-list">
<li><a href="../httpcomponents-client-4.5.x/quickstart.html" title="Quick Start"><span class="none"></span>Quick Start</a></li>
@@ -111,16 +110,35 @@
under the License.
-->
<h1>HttpClient Overview</h1>
-<p>The Hyper-Text Transfer Protocol (HTTP) is perhaps the most significant protocol used on the Internet today. Web services, network-enabled appliances and the growth of network computing continue to expand the role of the HTTP protocol beyond user-driven web browsers, while increasing the number of applications that require HTTP support.</p>
-<p>Although the java.net package provides basic functionality for accessing resources via HTTP, it doesn’t provide the full flexibility or functionality needed by many applications. HttpClient seeks to fill this void by providing an efficient, up-to-date, and feature-rich package implementing the client side of the most recent HTTP standards and recommendations.</p>
-<p>Designed for extension while providing robust support for the base HTTP protocol, HttpClient may be of interest to anyone building HTTP-aware client applications such as web browsers, web service clients, or systems that leverage or extend the HTTP protocol for distributed communication.</p><section>
+<p>The Hyper-Text Transfer Protocol (HTTP) is perhaps the most significant protocol used on the Internet today. Web
+services, network-enabled appliances and the growth of network computing continue to expand the role of the HTTP
+protocol beyond user-driven web browsers, while increasing the number of applications that require HTTP support.</p>
+<p>Although the java.net package provides basic functionality for accessing resources via HTTP, it doesn't provide the full
+flexibility or functionality needed by many applications. HttpClient seeks to fill this void by providing an efficient,
+up-to-date, and feature-rich package implementing the client side of the most recent HTTP standards and recommendations.</p>
+<p>Designed for extension while providing robust support for the base HTTP protocol, HttpClient may be of interest to
+anyone building HTTP-aware client applications such as web browsers, web service clients, or systems that leverage or
+extend the HTTP protocol for distributed communication.</p><section>
<h2><a name="Documentation"></a>Documentation</h2>
<ol style="list-style-type: decimal">
-<li><a href="quickstart.html">Quick Start</a> - contains a simple, complete example of an HTTP GET and POST with parameters.</li>
-<li>HttpClient <a href="./current/tutorial/html/">Tutorial</a> (<a href="./current/tutorial/pdf/httpclient-tutorial.pdf">PDF</a>)</li>
-<li><a href="examples.html">HttpClient Examples</a> - a set of examples demonstrating some of the more complex use scenarios.</li>
-<li><a href="./primer.html">HttpClient Primer</a> - explains the scope of HttpClient. Note that HttpClient is not a browser. It lacks the UI, HTML renderer and a JavaScript engine that a browser will possess.</li>
+<li>
+
+<p><a href="quickstart.html">Quick Start</a> - contains a simple, complete example of an HTTP GET and POST with parameters.</p>
+</li>
+<li>
+
+<p>HttpClient <a href="./current/tutorial/html/">Tutorial</a> (<a href="./current/tutorial/pdf/httpclient-tutorial.pdf">PDF</a>)</p>
+</li>
+<li>
+
+<p><a href="examples.html">HttpClient Examples</a> - a set of examples demonstrating some of the more complex use scenarios.</p>
+</li>
+<li>
+
+<p><a href="./primer.html">HttpClient Primer</a> - explains the scope of HttpClient. Note that HttpClient is not a browser. It
+lacks the UI, HTML renderer and a JavaScript engine that a browser will possess.</p>
+</li>
<li>
<p>Javadocs</p>
@@ -150,15 +168,18 @@
<ul>
<li>Standards based, pure Java, implementation of HTTP versions 1.0 and 1.1</li>
-<li>Full implementation of all HTTP methods (GET, POST, PUT, DELETE, HEAD, OPTIONS, and TRACE) in an extensible OO framework.</li>
+<li>Full implementation of all HTTP methods (GET, POST, PUT, DELETE, HEAD, OPTIONS, and TRACE)
+in an extensible OO framework.</li>
<li>Supports encryption with HTTPS (HTTP over SSL) protocol.</li>
<li>Transparent connections through HTTP proxies.</li>
<li>Tunneled HTTPS connections through HTTP proxies, via the CONNECT method.</li>
<li>Basic, Digest, NTLMv1, NTLMv2, NTLM2 Session, SNPNEGO, Kerberos authentication schemes.</li>
<li>Plug-in mechanism for custom authentication schemes.</li>
<li>Pluggable secure socket factories, making it easier to use third party solutions</li>
-<li>Connection management support for use in multi-threaded applications. Supports setting the maximum total connections as well as the maximum connections per host. Detects and closes stale connections.</li>
-<li>Automatic Cookie handling for reading Set-Cookie: headers from the server and sending them back out in a <code>Cookie</code> header when appropriate.</li>
+<li>Connection management support for use in multi-threaded applications. Supports setting the maximum total connections
+as well as the maximum connections per host. Detects and closes stale connections.</li>
+<li>Automatic Cookie handling for reading Set-Cookie: headers from the server and sending them back out in a <code>Cookie</code>
+header when appropriate.</li>
<li>Plug-in mechanism for custom cookie policies.</li>
<li>Request output streams to avoid buffering any content body by streaming directly to the socket to the server.</li>
<li>Response input streams to efficiently read the response body by streaming directly from the socket to the server.</li>
@@ -169,7 +190,8 @@
<li>Source code is freely available under the Apache License.</li>
</ul></section><section>
<h2><a name="Standards_Compliance"></a>Standards Compliance</h2>
-<p>HttpClient strives to conform to the following specifications endorsed by the Internet Engineering Task Force (IETF) and the internet at large:</p>
+<p>HttpClient strives to conform to the following specifications endorsed by the Internet Engineering Task Force (IETF) and
+the internet at large:</p>
<ul>
<li><a class="externalLink" href="https://datatracker.ietf.org/doc/html/rfc1945">RFC 1945</a> - Hypertext Transfer Protocol – HTTP/1.0</li>
Modified: httpcomponents/site/httpcomponents-client-4.5.x/logging.html
URL: http://svn.apache.org/viewvc/httpcomponents/site/httpcomponents-client-4.5.x/logging.html?rev=1905103&r1=1905102&r2=1905103&view=diff
==============================================================================
--- httpcomponents/site/httpcomponents-client-4.5.x/logging.html (original)
+++ httpcomponents/site/httpcomponents-client-4.5.x/logging.html Sun Nov 6 19:02:24 2022
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
- | Generated by Apache Maven Doxia Site Renderer 1.9.2 from src/site/markdown/httpcomponents-client-4.5.x/logging.md
+ | Generated by Apache Maven Doxia Site Renderer 1.11.1 from src/site/markdown/httpcomponents-client-4.5.x/logging.md
| Rendered using Apache Maven Fluido Skin 1.9
-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
- <meta name="generator" content="Apache Maven Doxia Site Renderer 1.9.2" />
+ <meta name="generator" content="Apache Maven Doxia Site Renderer 1.11.1" />
<title>Apache HttpComponents – Logging Practices</title>
<link rel="stylesheet" href="../css/apache-maven-fluido-1.9.min.css" />
<link rel="stylesheet" href="../css/site.css" />
@@ -25,7 +25,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
- <li id="publishDate">Last Published: 2022-10-31<span class="divider">|</span>
+ <li id="publishDate">Last Published: 2022-11-06<span class="divider">|</span>
</li>
<li class=""><a href="http://hc.apache.org/index.html" class="externalLink" title="HttpComponents">HttpComponents</a><span class="divider">/</span></li>
<li class="active ">Logging Practices <a href="https://github.com/apache/httpcomponents-website/tree/master/src/site/markdown/httpcomponents-client-4.5.x/logging.md"><img src="../images/accessories-text-editor.png" title="Edit" /></a></li>
@@ -51,8 +51,7 @@
<li class="nav-header">Components</li>
<li><a href="../httpcomponents-client-5.2.x/index.html" title="HttpClient 5.2 BETA"><span class="icon-chevron-right"></span>HttpClient 5.2 BETA</a></li>
<li><a href="../httpcomponents-client-5.1.x/index.html" title="HttpClient 5.1"><span class="icon-chevron-right"></span>HttpClient 5.1</a></li>
- <li><a href="../httpcomponents-core-5.2.x/index.html" title="HttpCore 5.2 BETA"><span class="icon-chevron-right"></span>HttpCore 5.2 BETA</a></li>
- <li><a href="../httpcomponents-core-5.1.x/index.html" title="HttpCore 5.1"><span class="icon-chevron-right"></span>HttpCore 5.1</a></li>
+ <li><a href="../httpcomponents-core-5.2.x/index.html" title="HttpCore 5.2"><span class="icon-chevron-right"></span>HttpCore 5.2</a></li>
<li><a href="../httpcomponents-client-4.5.x/index.html" title="HttpClient 4.5"><span class="icon-chevron-down"></span>HttpClient 4.5</a>
<ul class="nav nav-list">
<li><a href="../httpcomponents-client-4.5.x/quickstart.html" title="Quick Start"><span class="none"></span>Quick Start</a></li>
@@ -111,7 +110,13 @@
under the License.
-->
<h1>Logging Practices</h1>
-<p>Being a library HttpClient is not to dictate which logging framework the user has to use. Therefore HttpClient utilizes the logging interface provided by the <a class="externalLink" href="http://commons.apache.org/logging/">Commons Logging</a> package. <code>Commons Logging</code> provides a simple and generalized <a class="externalLink" href="http://commons.apache.org/logging/commons-logging-1.0.4/docs/apidocs/">log interface</a> to various logging packages. By using <code>Commons Logging</code>, HttpClient can be configured for a variety of different logging behaviours. That means the user will have to make a choice which logging framework to use. By default <code>Commons Logging</code> supports the following logging frameworks:</p>
+<p>Being a library HttpClient is not to dictate which logging framework the user has to use. Therefore HttpClient utilizes
+the logging interface provided by the
+<a class="externalLink" href="http://commons.apache.org/logging/">Commons Logging</a> package. <code>Commons Logging</code> provides a simple and generalized
+<a class="externalLink" href="http://commons.apache.org/logging/commons-logging-1.0.4/docs/apidocs/">log interface</a> to various logging packages. By
+using <code>Commons Logging</code>, HttpClient can be configured for a variety of different logging behaviours. That means the user
+will have to make a choice which logging framework to use. By default <code>Commons Logging</code> supports the following logging
+frameworks:</p>
<ul>
<li>
@@ -124,80 +129,95 @@
</li>
<li>
-<p><a class="externalLink" href="http://commons.apache.org/logging/commons-logging-1.0.4/docs/apidocs/org/apache/commons/logging/impl/SimpleLog.html">SimpleLog</a> ( internal to <code>Commons Logging</code>)</p>
+<p><a class="externalLink" href="http://commons.apache.org/logging/commons-logging-1.0.4/docs/apidocs/org/apache/commons/logging/impl/SimpleLog.html">SimpleLog</a> (
+internal to <code>Commons Logging</code>)</p>
</li>
</ul>
-<p>By implementing some simple interfaces <code>Commons Logging</code> can be extended to support basically any other custom logging framework. <code>Commons Logging</code> tries to automatically discover the logging framework to use. If it fails to select the expected one, you must configure <code>Commons Logging</code> by hand. Please refer to the <code>Commons Logging</code> documentation for more information.</p>
-<p>HttpClient performs three different kinds of logging: the standard context logging used within each class, HTTP header logging and full wire logging.</p><section><section>
+<p>By implementing some simple interfaces <code>Commons Logging</code> can be extended to support basically any other custom logging
+framework. <code>Commons Logging</code> tries to automatically discover the logging framework to use. If it fails to select the
+expected one, you must configure <code>Commons Logging</code> by hand. Please refer to the <code>Commons Logging</code>
+documentation for more information.</p>
+<p>HttpClient performs three different kinds of logging: the standard context logging used within each class, HTTP header
+logging and full wire logging.</p><section><section>
<h3><a name="Context_Logging"></a>Context Logging</h3>
-<p>Context logging contains information about the internal operation of HttpClient as it performs HTTP requests. Each class has its own log named according to the class’s fully qualified name. For example the class <code>DefaultHttpClient</code> has a log named <code>org.apache.http.impl.client.DefaultHttpClient</code>. Since all classes follow this convention it is possible to configure context logging for all classes using the single log named <code>org.apache.http.impl.client</code>.</p></section><section>
+<p>Context logging contains information about the internal operation of HttpClient as it performs HTTP requests. Each class
+has its own log named according to the class's fully qualified name. For example the class <code>DefaultHttpClient</code> has a log
+named
+<code>org.apache.http.impl.client.DefaultHttpClient</code>. Since all classes follow this convention it is possible to configure
+context logging for all classes using the single log named
+<code>org.apache.http.impl.client</code>.</p></section><section>
<h3><a name="Wire_Logging"></a>Wire Logging</h3>
-<p>The wire log is used to log all data transmitted to and from servers when executing HTTP requests. The wire log uses the <code>org.apache.http.wire</code> logging category. This log should only be enabled to debug problems, as it will produce an extremely large amount of log data.</p></section><section>
+<p>The wire log is used to log all data transmitted to and from servers when executing HTTP requests. The wire log uses
+the <code>org.apache.http.wire</code> logging category. This log should only be enabled to debug problems, as it will produce an
+extremely large amount of log data.</p></section><section>
<h3><a name="HTTP_header_Logging"></a>HTTP header Logging</h3>
-<p>Because the content of HTTP requests is usually less important for debugging than the HTTP headers, the <code>org.apache.http.headers</code> logging category for capturing HTTP headers only.</p></section><section>
+<p>Because the content of HTTP requests is usually less important for debugging than the HTTP headers,
+the <code>org.apache.http.headers</code> logging category for capturing HTTP headers only.</p></section><section>
<h3><a name="Configuration_Examples"></a>Configuration Examples</h3>
-<p><code>Commons Logging</code> can delegate to a variety of loggers for processing the actual output. Below are configuration examples for <code>Commons Logging</code>, <code>Log4j 2</code> and <code>java.util.logging</code>.</p></section></section><section>
+<p><code>Commons Logging</code> can delegate to a variety of loggers for processing the actual output. Below are configuration
+examples for <code>Commons Logging</code>, <code>Log4j 2</code> and <code>java.util.logging</code>.</p></section></section><section>
<h2><a name="Commons_Logging_Examples"></a>Commons Logging Examples</h2>
-<p><code>Commons Logging</code> comes with a basic logger called <code>SimpleLog</code>. This logger writes all logged messages to <code>System.err</code>. The following examples show how to configure <code>Commons Logging</code> via system properties to use <code>SimpleLog</code>. It is strongly recommended configuring <code>Commons Logging</code> system properties through JVM process arguments at the start up.</p>
+<p><code>Commons Logging</code> comes with a basic logger called <code>SimpleLog</code>. This logger writes all logged messages to <code>System.err</code>.
+The following examples show how to configure
+<code>Commons Logging</code> via system properties to use <code>SimpleLog</code>. It is strongly recommended configuring <code>Commons Logging</code>
+system properties through JVM process arguments at the start up.</p>
<ul>
-<li>Enable header wire + context logging - «Best for Debugging»</li>
-</ul>
+<li>
-<div class="source">
-<div class="source"><pre class="prettyprint">-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
+<p>Enable header wire + context logging - «Best for Debugging»</p>
+
+<div class="source"><pre class="prettyprint"><code>-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
-Dorg.apache.commons.logging.simplelog.showdatetime=true
-Dorg.apache.commons.logging.simplelog.log.org.apache.http=DEBUG
-Dorg.apache.commons.logging.simplelog.log.org.apache.http.wire=ERROR
-</pre></div></div>
-
-<ul>
+</code></pre></div>
+</li>
+<li>
-<li>Enable full wire + context logging</li>
-</ul>
+<p>Enable full wire + context logging</p>
-<div class="source">
-<div class="source"><pre class="prettyprint">-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
+<div class="source"><pre class="prettyprint"><code>-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
-Dorg.apache.commons.logging.simplelog.showdatetime=true
-Dorg.apache.commons.logging.simplelog.log.org.apache.http=DEBUG
-</pre></div></div>
-
-<ul>
+</code></pre></div>
+</li>
+<li>
-<li>Enable context logging for connection management</li>
-</ul>
+<p>Enable context logging for connection management</p>
-<div class="source">
-<div class="source"><pre class="prettyprint">-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
+<div class="source"><pre class="prettyprint"><code>-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
-Dorg.apache.commons.logging.simplelog.showdatetime=true
-Dorg.apache.commons.logging.simplelog.log.org.apache.http.impl.conn=DEBUG
-</pre></div></div>
-
-<ul>
+</code></pre></div>
+</li>
+<li>
-<li>Enable context logging for connection management / request execution</li>
-</ul>
+<p>Enable context logging for connection management / request execution</p>
-<div class="source">
-<div class="source"><pre class="prettyprint">-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
+<div class="source"><pre class="prettyprint"><code>-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
-Dorg.apache.commons.logging.simplelog.showdatetime=true
-Dorg.apache.commons.logging.simplelog.log.org.apache.http.impl.conn=DEBUG
-Dorg.apache.commons.logging.simplelog.log.org.apache.http.impl.client=DEBUG
-Dorg.apache.commons.logging.simplelog.log.org.apache.http.client=DEBUG
-</pre></div></div>
-</section><section>
+</code></pre></div>
+</li>
+</ul></section><section>
<h2><a name="Log4j_2_Examples"></a>Log4j 2 Examples</h2>
-<p>The simplest way to <a class="externalLink" href="https://logging.apache.org/log4j/2.x/manual/configuration.html">configure</a> <code>Log4j 2</code> is via a <code>log4j2.xml</code> file. <code>Log4j 2</code> will <a class="externalLink" href="https://logging.apache.org/log4j/2.x/manual/configuration.html#AutomaticConfiguration">automatically</a> configure itself using a file named <code>log4j2.xml</code> when it’s present at the root of the application classpath.</p>
+<p>The simplest way to <a class="externalLink" href="https://logging.apache.org/log4j/2.x/manual/configuration.html">configure</a> <code>Log4j 2</code> is via
+a <code>log4j2.xml</code> file. <code>Log4j 2</code>
+will <a class="externalLink" href="https://logging.apache.org/log4j/2.x/manual/configuration.html#AutomaticConfiguration">automatically</a> configure
+itself using a file named <code>log4j2.xml</code> when it's present at the root of the application classpath.</p>
<p>Below are some <code>Log4j</code> configuration examples.</p>
-<p><b>Note:</b> The <code>Log4j 2</code> implementation a.k.a “core” is not included in the <code>HttpClient</code> distribution. You can include it in your project using <a class="externalLink" href="https://logging.apache.org/log4j/2.x/maven-artifacts.html">Maven, Ivy, Gradle, or SBT</a>.</p>
+<p><b>Note:</b> The <code>Log4j 2</code> implementation a.k.a “core” is not included in the <code>HttpClient</code> distribution. You can include it
+in your project using <a class="externalLink" href="https://logging.apache.org/log4j/2.x/maven-artifacts.html">Maven, Ivy, Gradle, or SBT</a>.</p>
<ul>
<li>
<p>Enable header wire + context logging - <b>Best for Debugging</b></p>
-<div class="source">
-<div class="source"><pre class="prettyprint"><Configuration>
+<div class="source"><pre class="prettyprint"><code><Configuration>
<Appenders>
<Console name="Console">
<PatternLayout pattern="%d %-5level [%logger] %msg%n%xThrowable" />
@@ -215,14 +235,13 @@
</Root>
</Loggers>
</Configuration>
-</pre></div></div>
+</code></pre></div>
</li>
<li>
<p>Enable full wire + context logging</p>
-<div class="source">
-<div class="source"><pre class="prettyprint"><Configuration>
+<div class="source"><pre class="prettyprint"><code><Configuration>
<Appenders>
<Console name="Console">
<PatternLayout pattern="%d %-5level [%logger] %msg%n%xThrowable" />
@@ -237,14 +256,13 @@
</Root>
</Loggers>
</Configuration>
-</pre></div></div>
+</code></pre></div>
</li>
<li>
<p>Enable context logging for connection management</p>
-<div class="source">
-<div class="source"><pre class="prettyprint"><Configuration>
+<div class="source"><pre class="prettyprint"><code><Configuration>
<Appenders>
<Console name="Console">
<PatternLayout pattern="%d %-5level [%logger] %msg%n%xThrowable" />
@@ -259,14 +277,13 @@
</Root>
</Loggers>
</Configuration>
-</pre></div></div>
+</code></pre></div>
</li>
<li>
<p>Enable context logging for connection management / request execution</p>
-<div class="source">
-<div class="source"><pre class="prettyprint"><Configuration>
+<div class="source"><pre class="prettyprint"><code><Configuration>
<Appenders>
<Console name="Console">
<PatternLayout pattern="%d %-5level [%logger] %msg%n%xThrowable" />
@@ -287,15 +304,18 @@
</Root>
</Loggers>
</Configuration>
-</pre></div></div>
+</code></pre></div>
</li>
</ul>
-<p>The <code>Log4J 2</code> manual is the best reference for how to configure <code>Log4J 2</code>. It is available at <a class="externalLink" href="https://logging.apache.org/log4j/2.x/manual/">https://logging.apache.org/log4j/2.x/manual/</a>.</p><section>
+<p>The <code>Log4J 2</code> manual is the best reference for how to configure <code>Log4J 2</code>. It is available at
+<a class="externalLink" href="https://logging.apache.org/log4j/2.x/manual/">https://logging.apache.org/log4j/2.x/manual/</a>.</p><section>
<h3><a name="java.util.logging_Examples"></a>java.util.logging Examples</h3>
-<p>Since JDK 1.4 there has been a package <a class="externalLink" href="http://docs.oracle.com/javase/7/docs/api/java/util/logging/package-summary.html">java.util.logging</a> that provides a logging framework similar to <code>Log4J</code>. By default it reads a config file from <code>$JAVA_HOME/jre/lib/logging.properties</code> which looks like this (comments stripped):</p>
+<p>Since JDK 1.4 there has been a package
+<a class="externalLink" href="http://docs.oracle.com/javase/7/docs/api/java/util/logging/package-summary.html">java.util.logging</a> that provides a
+logging framework similar to <code>Log4J</code>. By default it reads a config file from <code>$JAVA_HOME/jre/lib/logging.properties</code>
+which looks like this (comments stripped):</p>
-<div class="source">
-<div class="source"><pre class="prettyprint">handlers=java.util.logging.ConsoleHandler
+<div class="source"><pre class="prettyprint"><code>handlers=java.util.logging.ConsoleHandler
.level=INFO
java.util.logging.FileHandler.pattern = %h/java%u.log
java.util.logging.FileHandler.limit = 50000
@@ -304,23 +324,22 @@ java.util.logging.FileHandler.formatter
java.util.logging.ConsoleHandler.level = INFO
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
com.xyz.foo.level = SEVERE
-</pre></div></div>
+</code></pre></div>
+<p>To customize logging a custom <code>logging.properties</code> file should be created in the project directory. The location of this
+file must be passed to the JVM as a system property. This can be done on the command line like so:</p>
-<p>To customize logging a custom <code>logging.properties</code> file should be created in the project directory. The location of this file must be passed to the JVM as a system property. This can be done on the command line like so:</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint">$JAVA_HOME/java -Djava.util.logging.config.file=$HOME/myapp/logging.properties
+<div class="source"><pre class="prettyprint"><code>$JAVA_HOME/java -Djava.util.logging.config.file=$HOME/myapp/logging.properties
-classpath $HOME/myapp/target/classes com.myapp.Main
-</pre></div></div>
-
-<p>Alternatively <a class="externalLink" href="http://docs.oracle.com/javase/7/docs/api/java/util/logging/LogManager.html#readConfiguration(java.io.InputStream)">LogManager#readConfiguration(InputStream)</a> can be used to pass it the desired configuration.</p>
+</code></pre></div>
+<p>Alternatively <a class="externalLink" href="http://docs.oracle.com/javase/7/docs/api/java/util/logging/LogManager.html#readConfiguration(java.io.InputStream)">LogManager#readConfiguration(InputStream)</a>
+can be used to pass it the desired configuration.</p>
<ul>
-<li>Enable header wire + context logging - <b>Best for Debugging</b></li>
-</ul>
+<li>
+
+<p>Enable header wire + context logging - <b>Best for Debugging</b></p>
-<div class="source">
-<div class="source"><pre class="prettyprint">.level = INFO
+<div class="source"><pre class="prettyprint"><code>.level = INFO
handlers=java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
@@ -328,45 +347,39 @@ java.util.logging.ConsoleHandler.level =
org.apache.http.level = FINEST
org.apache.http.wire.level = SEVERE
-</pre></div></div>
-
-<ul>
+</code></pre></div>
+</li>
+<li>
-<li>Enable full wire + context logging</li>
-</ul>
+<p>Enable full wire + context logging</p>
-<div class="source">
-<div class="source"><pre class="prettyprint">.level = INFO
+<div class="source"><pre class="prettyprint"><code>.level = INFO
handlers=java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.ConsoleHandler.level = ALL
org.apache.http.level = FINEST
-</pre></div></div>
-
-<ul>
+</code></pre></div>
+</li>
+<li>
-<li>Enable context logging for connection management</li>
-</ul>
+<p>Enable context logging for connection management</p>
-<div class="source">
-<div class="source"><pre class="prettyprint">.level = INFO
+<div class="source"><pre class="prettyprint"><code>.level = INFO
handlers=java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.ConsoleHandler.level = ALL
org.apache.http.impl.conn.level = FINEST
-</pre></div></div>
-
-<ul>
+</code></pre></div>
+</li>
+<li>
-<li>Enable context logging for connection management / request execution</li>
-</ul>
+<p>Enable context logging for connection management / request execution</p>
-<div class="source">
-<div class="source"><pre class="prettyprint">.level = INFO
+<div class="source"><pre class="prettyprint"><code>.level = INFO
handlers=java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
@@ -375,9 +388,11 @@ java.util.logging.ConsoleHandler.level =
org.apache.http.impl.conn.level = FINEST
org.apache.http.impl.client.level = FINEST
org.apache.http.client.level = FINEST
-</pre></div></div>
-
-<p>More detailed information is available from the <a class="externalLink" href="http://docs.oracle.com/javase/7/docs/technotes/guides/logging/overview.html">Java Logging documentation</a>.</p></section></section>
+</code></pre></div>
+</li>
+</ul>
+<p>More detailed information is available from the
+<a class="externalLink" href="http://docs.oracle.com/javase/7/docs/technotes/guides/logging/overview.html">Java Logging documentation</a>.</p></section></section>
</main>
</div>
</div>
Modified: httpcomponents/site/httpcomponents-client-4.5.x/ntlm.html
URL: http://svn.apache.org/viewvc/httpcomponents/site/httpcomponents-client-4.5.x/ntlm.html?rev=1905103&r1=1905102&r2=1905103&view=diff
==============================================================================
--- httpcomponents/site/httpcomponents-client-4.5.x/ntlm.html (original)
+++ httpcomponents/site/httpcomponents-client-4.5.x/ntlm.html Sun Nov 6 19:02:24 2022
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<!--
- | Generated by Apache Maven Doxia Site Renderer 1.9.2 from src/site/markdown/httpcomponents-client-4.5.x/ntlm.md
+ | Generated by Apache Maven Doxia Site Renderer 1.11.1 from src/site/markdown/httpcomponents-client-4.5.x/ntlm.md
| Rendered using Apache Maven Fluido Skin 1.9
-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
- <meta name="generator" content="Apache Maven Doxia Site Renderer 1.9.2" />
+ <meta name="generator" content="Apache Maven Doxia Site Renderer 1.11.1" />
<title>Apache HttpComponents – NTLM support in HttpClient</title>
<link rel="stylesheet" href="../css/apache-maven-fluido-1.9.min.css" />
<link rel="stylesheet" href="../css/site.css" />
@@ -25,7 +25,7 @@
<div id="breadcrumbs">
<ul class="breadcrumb">
- <li id="publishDate">Last Published: 2022-10-31<span class="divider">|</span>
+ <li id="publishDate">Last Published: 2022-11-06<span class="divider">|</span>
</li>
<li class=""><a href="http://hc.apache.org/index.html" class="externalLink" title="HttpComponents">HttpComponents</a><span class="divider">/</span></li>
<li class="active ">NTLM support in HttpClient <a href="https://github.com/apache/httpcomponents-website/tree/master/src/site/markdown/httpcomponents-client-4.5.x/ntlm.md"><img src="../images/accessories-text-editor.png" title="Edit" /></a></li>
@@ -51,8 +51,7 @@
<li class="nav-header">Components</li>
<li><a href="../httpcomponents-client-5.2.x/index.html" title="HttpClient 5.2 BETA"><span class="icon-chevron-right"></span>HttpClient 5.2 BETA</a></li>
<li><a href="../httpcomponents-client-5.1.x/index.html" title="HttpClient 5.1"><span class="icon-chevron-right"></span>HttpClient 5.1</a></li>
- <li><a href="../httpcomponents-core-5.2.x/index.html" title="HttpCore 5.2 BETA"><span class="icon-chevron-right"></span>HttpCore 5.2 BETA</a></li>
- <li><a href="../httpcomponents-core-5.1.x/index.html" title="HttpCore 5.1"><span class="icon-chevron-right"></span>HttpCore 5.1</a></li>
+ <li><a href="../httpcomponents-core-5.2.x/index.html" title="HttpCore 5.2"><span class="icon-chevron-right"></span>HttpCore 5.2</a></li>
<li><a href="../httpcomponents-client-4.5.x/index.html" title="HttpClient 4.5"><span class="icon-chevron-down"></span>HttpClient 4.5</a>
<ul class="nav nav-list">
<li><a href="../httpcomponents-client-4.5.x/quickstart.html" title="Quick Start"><span class="none"></span>Quick Start</a></li>
@@ -113,9 +112,21 @@
<h1>NTLM support in HttpClient</h1><section>
<h2><a name="Background"></a>Background</h2>
<p>NTLM is a proprietary authentication scheme developed by Microsoft and optimized for Windows operating system.</p>
-<p>Until year 2008 there was no official, publicly available, complete documentation of the protocol. <a class="externalLink" href="http://davenport.sourceforge.net/ntlm.html">Unofficial</a> 3rd party protocol descriptions existed as a result of reverse-engineering efforts. It was not really known whether the protocol based on the reverse-engineering were complete or even correct.</p>
-<p>Microsoft published <a class="externalLink" href="http://download.microsoft.com/download/a/e/6/ae6e4142-aa58-45c6-8dcf-a657e5900cd3/%5BMS-NLMP%5D.pdf">MS-NLMP</a> and <a class="externalLink" href="http://download.microsoft.com/download/a/e/6/ae6e4142-aa58-45c6-8dcf-a657e5900cd3/%5BMS-NTHT%5D.pdf">MS-NTHT</a> specifications in February 2008 as a part of its <a class="externalLink" href="http://www.microsoft.com/interop/principles/default.mspx">Interoperability Principles initiative</a>.</p>
-<p>HttpClient as of version 4.1 initially supported NTLMv1, NTLMv2, and NTLM2SessionResponse authentication protocols, based on the reverse engineering approach. As of version 4.2.3, HttpClient now supports a more correct implementation, based in large part on Microsoft’s own specifications. This is expected to correct a number of problems, especially since Microsoft (as of Windows Server 2008 R2) began using a new implementation of its protocols. This new Microsoft implementation has led to authentication failures in some cases from some of the older reverse-engineered client implementations of NTLM.</p>
+<p>Until year 2008 there was no official, publicly available, complete documentation of the
+protocol. <a class="externalLink" href="http://davenport.sourceforge.net/ntlm.html">Unofficial</a> 3rd party protocol descriptions existed as a result
+of reverse-engineering efforts. It was not really known whether the protocol based on the reverse-engineering were
+complete or even correct.</p>
+<p>Microsoft
+published <a class="externalLink" href="http://download.microsoft.com/download/a/e/6/ae6e4142-aa58-45c6-8dcf-a657e5900cd3/%5BMS-NLMP%5D.pdf">MS-NLMP</a>
+and <a class="externalLink" href="http://download.microsoft.com/download/a/e/6/ae6e4142-aa58-45c6-8dcf-a657e5900cd3/%5BMS-NTHT%5D.pdf">MS-NTHT</a>
+specifications in February 2008 as a part of its
+<a class="externalLink" href="http://www.microsoft.com/interop/principles/default.mspx">Interoperability Principles initiative</a>.</p>
+<p>HttpClient as of version 4.1 initially supported NTLMv1, NTLMv2, and NTLM2SessionResponse authentication protocols,
+based on the reverse engineering approach. As of version 4.2.3, HttpClient now supports a more correct implementation,
+based in large part on Microsoft's own specifications. This is expected to correct a number of problems, especially
+since Microsoft (as of Windows Server 2008 R2) began using a new implementation of its protocols. This new Microsoft
+implementation has led to authentication failures in some cases from some of the older reverse-engineered client
+implementations of NTLM.</p>
<p>The new HttpClient NTLM implementation is known to have been tried successfully against at least the following systems:</p>
<ul>
@@ -132,10 +143,13 @@
<p>Windows Server 2008 R2 systems, configured to use NTLM2SessionResponse authentication</p>
</li>
</ul>
-<p>If the current HttpClient NTLM implementation should prove problematic in your environment, we’d definitely like to hear about it. You are also welcome to try an alternative NTLM implementation, should it seem necessary. One can also use <a class="externalLink" href="http://jcifs.samba.org/">JCIFS</a>, which includes an NTLM engine developed by members of the Samba project.</p></section><section>
+<p>If the current HttpClient NTLM implementation should prove problematic in your environment, we'd definitely like to hear
+about it. You are also welcome to try an alternative NTLM implementation, should it seem necessary. One can also
+use <a class="externalLink" href="http://jcifs.samba.org/">JCIFS</a>, which includes an NTLM engine developed by members of the Samba project.</p></section><section>
<h2><a name="Using_Samba_JCIFS_as_an_alternative_NTLM_engine"></a>Using Samba JCIFS as an alternative NTLM engine</h2>
<p>Follow these instructions to build an NTLMEngine implementation using JCIFS library</p>
-<p><b><i>Disclaimer: Use code at your own discretion. Do NOT report any issues related to the use of JCIFS library to Apache HttpComponents project</i></b>.</p>
+<p><i><b>Disclaimer: Use code at your own discretion. Do NOT report any issues related to the use of JCIFS library to Apache
+HttpComponents project</b></i>.</p>
<ul>
<li>
@@ -145,11 +159,8 @@
<li>
<p>Implement NTLMEngine interface</p>
-</li>
-</ul>
-<div class="source">
-<div class="source"><pre class="prettyprint">import java.io.IOException;
+<div class="source"><pre class="prettyprint"><code>import java.io.IOException;
import jcifs.ntlmssp.NtlmFlags;
import jcifs.ntlmssp.Type1Message;
@@ -193,29 +204,25 @@ public final class JCIFSEngine implement
}
}
-</pre></div></div>
-
-<ul>
+</code></pre></div>
+</li>
+<li>
-<li>Implement AuthSchemeProvider interface</li>
-</ul>
+<p>Implement AuthSchemeProvider interface</p>
-<div class="source">
-<div class="source"><pre class="prettyprint">public class JCIFSNTLMSchemeFactory implements AuthSchemeProvider {
+<div class="source"><pre class="prettyprint"><code>public class JCIFSNTLMSchemeFactory implements AuthSchemeProvider {
public AuthScheme create(final HttpContext context) {
return new NTLMScheme(new JCIFSEngine());
}
}
-</pre></div></div>
-
-<ul>
+</code></pre></div>
+</li>
+<li>
-<li>Register NTLMSchemeFactory with the HttpClient instance you want to NTLM enable.</li>
-</ul>
+<p>Register NTLMSchemeFactory with the HttpClient instance you want to NTLM enable.</p>
-<div class="source">
-<div class="source"><pre class="prettyprint">Registry<AuthSchemeProvider> authSchemeRegistry = RegistryBuilder.<AuthSchemeProvider>create()
+<div class="source"><pre class="prettyprint"><code>Registry<AuthSchemeProvider> authSchemeRegistry = RegistryBuilder.<AuthSchemeProvider>create()
.register(AuthSchemes.NTLM, new JCIFSNTLMSchemeFactory())
.register(AuthSchemes.BASIC, new BasicSchemeFactory())
.register(AuthSchemes.DIGEST, new DigestSchemeFactory())
@@ -225,11 +232,12 @@ public final class JCIFSEngine implement
CloseableHttpClient httpClient = HttpClients.custom()
.setDefaultAuthSchemeRegistry(authSchemeRegistry)
.build();
-</pre></div></div>
-
-<ul>
+</code></pre></div>
+</li>
+<li>
-<li>Set NTCredentials for the web server you are going to access.</li>
+<p>Set NTCredentials for the web server you are going to access.</p>
+</li>
</ul></section>
</main>
</div>