« Return to Thread: Re: svn commit: r787433 - /maven/site/trunk/src/site/apt/guides/mini/guide-http-settings.apt

Re: svn commit: r787433 - /maven/site/trunk/src/site/apt/guides/mini/guide-http-settings.apt

by John Casey-5 :: Rate this Message:

Reply to Author | View in Thread

Brett Porter wrote:

>
> On 23/06/2009, at 8:56 AM, jdcasey@... wrote:
>
>> Author: jdcasey
>> Date: Mon Jun 22 22:56:25 2009
>> New Revision: 787433
>>
>> URL: http://svn.apache.org/viewvc?rev=787433&view=rev
>> Log:
>> Adding documentation for (proposed) new httpclient-based wagon
>> configuration.
>>
>> Added:
>>    maven/site/trunk/src/site/apt/guides/mini/guide-http-settings.apt  
>> (with props)
>>
> [...]
>
> John,
>
> I found the following configuration didn't work with 2.2.0:
>
>   <servers>
>     <server>
>       <id>localhost</id>
>       <configuration>
>         <httpConfiguration>
>           <get>
> <useDefaultHeaders>false</useDefaultHeaders>
>             <headers>
>               <header>
> <name>User-Agent</name>
> <value>Foo-Bar/1.1</value>
>               </header>
>             </headers>
>           </get>
>         </httpConfiguration>
>
> (I also tried without the default headers line, and with "all" instead
> of "get").
>
> <httpHeaders/> continues to work.
>
> What am I doing wrong?

I'm guessing User-Agent needs to be documented as an exception, since we
setup User-Agent through the DefaultWagonManager (IIRC, you and I worked
on that for 2.1.0). I'm sure the logic in DefaultWagonManager overrides
what you setup above.

>
>> +  It's important to understand that the above method didn't allow you
>> to turn off the default HTTP headers; nor
>> +  did it allow you to specify headers on a per-method basis.
>
> That's not quite true, since the only default headers were the caching
> ones, which could be disabled by setting useCache to false. Would it be
> better to phrase this as "under 2.1.0 and earlier"?

I was actually referring to Accept-Encoding, which came up in one of the
WAGON issues for the -beta-6 release. From what I could tell, useCache
== false doesn't/shouldn't turn that header off...

>
>> +  If all you need is a per-server timeout configuration, you still
>> have the option to use the old <<<\<timeout\>>>>
>> +  parameter. If you need to separate timeout preferences according to
>> HTTP method, you can use one more like that
>> +  specified directly above.
>
> Do you think instead of deprecating the old httpHeaders/useCache that it
> could be the same recommendation? Basically - you can keep using the
> direct config, but if you need fine-grained the above is available. This
> also helps avoid issues where the lightweight vs httpclient configs have
> now diverged.

Sure, I don't see what it'd hurt to remove the deprecation on
httpHeaders. Since deprecation of that field isn't evident for most
Maven users (those who are configuring the wagon via settings.xml), I
suppose this could wait until the beta-7 / 1.0 release?

>
> - Brett
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...

 « Return to Thread: Re: svn commit: r787433 - /maven/site/trunk/src/site/apt/guides/mini/guide-http-settings.apt