+1
> -----Original Message-----
> From: Waldhoff, Rodney [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, January 13, 2002 4:32 PM
> To: 'Otis Gospodnetic '; '[EMAIL PROTECTED] '
> Subject: RE: HTTP Client: HttpMethod/HttpMethodBase patches
>
>
> By your own description--"for setting headers such as
> 'User-Agent', which
> most often stay fixed during the whole life of an application
> and do not
> change from request to request", I'd suggest that the "default header"
> aspects should live in HttpClient or some other user-agent
> (browser-like)
> class. That way the agent could apply the headers to every
> HttpMethod it
> executes, rather than having to set up each method
> independently with the
> set of defaults.
>
> -----Original Message-----
> From: Otis Gospodnetic
> To: [EMAIL PROTECTED]
> Sent: 1/13/02 2:33 PM
> Subject: HTTP Client: HttpMethod/HttpMethodBase patches
>
> Hello,
>
> I added the two methods for setting/adding default request
> headers for
> setting headers such as 'User-Agent', which most often stay
> fixed during
>
> the whole life of an application and do not change from request to
> request.
>
> I'm including the patch to HttpMethod (interface) and HttpMethodBase
> (impl of that interface).
>
> Originally I wanted to add the ability to set the default request
> headers for 1) efficiency, and 2) simpler code.
>
> However, now after I added them it seems to me that this is
> actually not
>
> the most efficient way of doing it (checking 2 HashMaps vs. 1
> HashMap in
>
> 5 of those add*RequestHeader methods). It is probably more
> efficient
> to just call setRequestHeader(String, String) over and over, which is
> what I wanted to avoid in the first place, thinking that it's
> inefficient.
>
> On the other hand, the call that uses HTTP Client can be a
> bit simpler
> and cleaner because it won't have to call setRequestHeader(String,
> String) over and over for the non-variable headers, between method
> recycling .
>
> Therefore, a question for all: what do you think, do these patches
> improve things or not?
> Please let me know if they can or cannot be applied to the
> versions in
> the repository. At this point I'm fine either way :)
>
> Thanks,
> Otis
> <<HttpMethod.patch>> <<HttpMethodBase.patch>> <<ATT98116.txt>>
>