hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Manually Setting up Authorization Header.
Date Sun, 11 Apr 2010 19:25:43 GMT
On Sun, 2010-04-11 at 13:19 -0400, rangeli nepal wrote:
> Good Evening Everybody,
> 
> I am trying to seup Authorization header in GET method like this.
> 
> Header authHeader=new Header();
>       authHeader.setName("Authorization");
> 
>               <get deflated and base64 encoded String >
> 
> 
>       StringBuffer prefix=new StringBuffer(" Custom CustomToken=");
> 
>             //Put based 64 encoded string here.
>              prefix.append(encodedString);//.append("\"");
> 
> 
>               authHeader.setValue(prefix.toString());
>       method.setRequestHeader(authHeader);
> 
> However when it goes to the server. I get following on server log:
> 
> request failed: error reading the headers
> 
> I tried to do tcpdump. It seems Authorization Header is received in two
> parts ( makes sense as it's size is 2.5K) . But server sends error after
> receiving first part.

Why on earth are you trying to use an HTTP header to send 2.5K of data?

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message