You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Oleg Kalnichevski <ol...@apache.org> on 2010/12/08 21:12:47 UTC
Re: svn commit: r1043518
sebb@apache.org wrote:
>Author: sebb
>Date: Wed Dec 8 16:53:46 2010
>New Revision: 1043518
>
>URL: http://svn.apache.org/viewvc?rev=1043518&view=rev
>Log:
>Clarify URI content in Execution Context
>
>Modified:
> httpcomponents/httpclient/trunk/src/docbkx/fundamentals.xml
> httpcomponents/httpclient/trunk/src/docbkx/httpagent.xml
>
>Modified: httpcomponents/httpclient/trunk/src/docbkx/fundamentals.xml
>URL:
>http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/src/docbkx/fundamentals.xml?rev=1043518&r1=1043517&r2=1043518&view=diff
>==============================================================================
>--- httpcomponents/httpclient/trunk/src/docbkx/fundamentals.xml
>(original)
>+++ httpcomponents/httpclient/trunk/src/docbkx/fundamentals.xml Wed Dec
> 8 16:53:46 2010
>@@ -543,7 +543,11 @@ byte[] response = httpclient.execute(htt
> <formalpara>
><title><constant>ExecutionContext.HTTP_REQUEST</constant>='http.request':</title>
><para><interfacename>HttpRequest</interfacename> instance representing
>the
>- actual HTTP request.</para>
>+ actual HTTP request.
>+ The final HttpRequest object in the execution
>context always represents
>+ the state of the message _exactly_ as it was
>sent to the target server.
>+ Per default HTTP/1.0 and HTTP/1.1 use relative
>request URIs.
>+ </para>
> </formalpara>
> </listitem>
> <listitem>
>
>Modified: httpcomponents/httpclient/trunk/src/docbkx/httpagent.xml
>URL:
>http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/src/docbkx/httpagent.xml?rev=1043518&r1=1043517&r2=1043518&view=diff
>==============================================================================
>--- httpcomponents/httpclient/trunk/src/docbkx/httpagent.xml (original)
>+++ httpcomponents/httpclient/trunk/src/docbkx/httpagent.xml Wed Dec 8
>16:53:46 2010
>@@ -185,6 +185,9 @@ httpclient.getConnectionManager().shutdo
>updated depending on the execution context. Therefore the final request
>properties such
>as the target host and request URI can be determined by examining the
>content of the
> local HTTP context after the request has been executed.</para>
>+ <para>The final HttpRequest object in the execution context
>always represents
>+ the state of the message _exactly_ as it was sent to the
>target server.
>+ Per default HTTP/1.0 and HTTP/1.1 use relative request
>URIs.</para>
> <programlisting><![CDATA[
> DefaultHttpClient httpclient = new DefaultHttpClient();
>
>@@ -197,7 +200,7 @@ HttpUriRequest req = (HttpUriRequest) lo
> ExecutionContext.HTTP_REQUEST);
>
> System.out.println("Target host: " + target);
>-System.out.println("Final request URI: " + req.getURI());
>+System.out.println("Final request URI: " + req.getURI()); // relative
>URI
Sebastian,
The trouble is the uri can also be absolute, if the request has been sent via a proxy without creating a tunnel (direct proxy mode). Basically the uri can either relative or absolute depending on the route.
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
Re: svn commit: r1043518
Posted by sebb <se...@gmail.com>.
On 8 December 2010 20:12, Oleg Kalnichevski <ol...@apache.org> wrote:
> sebb@apache.org wrote:
>
>>Author: sebb
>>Date: Wed Dec 8 16:53:46 2010
>>New Revision: 1043518
>>
>>URL: http://svn.apache.org/viewvc?rev=1043518&view=rev
>>Log:
>>Clarify URI content in Execution Context
>>
>>Modified:
>> httpcomponents/httpclient/trunk/src/docbkx/fundamentals.xml
>> httpcomponents/httpclient/trunk/src/docbkx/httpagent.xml
>>
>>Modified: httpcomponents/httpclient/trunk/src/docbkx/fundamentals.xml
>>URL:
>>http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/src/docbkx/fundamentals.xml?rev=1043518&r1=1043517&r2=1043518&view=diff
>>==============================================================================
>>--- httpcomponents/httpclient/trunk/src/docbkx/fundamentals.xml
>>(original)
>>+++ httpcomponents/httpclient/trunk/src/docbkx/fundamentals.xml Wed Dec
>> 8 16:53:46 2010
>>@@ -543,7 +543,11 @@ byte[] response = httpclient.execute(htt
>> <formalpara>
>><title><constant>ExecutionContext.HTTP_REQUEST</constant>='http.request':</title>
>><para><interfacename>HttpRequest</interfacename> instance representing
>>the
>>- actual HTTP request.</para>
>>+ actual HTTP request.
>>+ The final HttpRequest object in the execution
>>context always represents
>>+ the state of the message _exactly_ as it was
>>sent to the target server.
>>+ Per default HTTP/1.0 and HTTP/1.1 use relative
>>request URIs.
>>+ </para>
>> </formalpara>
>> </listitem>
>> <listitem>
>>
>>Modified: httpcomponents/httpclient/trunk/src/docbkx/httpagent.xml
>>URL:
>>http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/src/docbkx/httpagent.xml?rev=1043518&r1=1043517&r2=1043518&view=diff
>>==============================================================================
>>--- httpcomponents/httpclient/trunk/src/docbkx/httpagent.xml (original)
>>+++ httpcomponents/httpclient/trunk/src/docbkx/httpagent.xml Wed Dec 8
>>16:53:46 2010
>>@@ -185,6 +185,9 @@ httpclient.getConnectionManager().shutdo
>>updated depending on the execution context. Therefore the final request
>>properties such
>>as the target host and request URI can be determined by examining the
>>content of the
>> local HTTP context after the request has been executed.</para>
>>+ <para>The final HttpRequest object in the execution context
>>always represents
>>+ the state of the message _exactly_ as it was sent to the
>>target server.
>>+ Per default HTTP/1.0 and HTTP/1.1 use relative request
>>URIs.</para>
>> <programlisting><![CDATA[
>> DefaultHttpClient httpclient = new DefaultHttpClient();
>>
>>@@ -197,7 +200,7 @@ HttpUriRequest req = (HttpUriRequest) lo
>> ExecutionContext.HTTP_REQUEST);
>>
>> System.out.println("Target host: " + target);
>>-System.out.println("Final request URI: " + req.getURI());
>>+System.out.println("Final request URI: " + req.getURI()); // relative
>>URI
>
> Sebastian,
>
> The trouble is the uri can also be absolute, if the request has been sent via a proxy without creating a tunnel (direct proxy mode). Basically the uri can either relative or absolute depending on the route.
OK, I'll update the docs.
> Oleg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org