Apache Http Client multipart/form-data with chunking

2019-01-19 Thread Mojgan
We have implemented chunked upload for large files on our server. Client
sends a multipart/form-data request with chunking.  It works fine using
Java Jersey and curl clients as the chunks come in the format specified per
HTTP Spec; however, the Apache HttpClient sends chunks not per HTTP Spec:
chunks sizes are not at the start of the chunks but rather at the end of
the last chunk, the last zero byte chunk is send with the other chunks,
etc.
Anyone else has seen this issue where Apache HTTPClient does not send
chunks per HTTP Spec?


Re: HttpClient 4.5 - make NTLM highest precedence authenticator when using HttpClientBuilder

2019-01-19 Thread Oleg Kalnichevski
On Sat, 2019-01-19 at 11:29 +1100, Chris Mugdan wrote:
> Hi,
> 
> I am using HttpClientBuilder to create an HttpClient with NTLM 
> authentication, but looking at the logs it tries SPNEGO first then
> NTLM. 
> Since I am only interested in NTLM, to increase the efficiency of 
> requests I want it to be the first authenticator tried. How do I do
> this 
> when I am using the following code to set up the HttpClient?
> 

See `targetPreferredAuthSchemes` and `proxyPreferredAuthSchemes`
attributes of the `RequestConfig` class.

Oleg



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



HttpClient 4.5 - make NTLM highest precedence authenticator when using HttpClientBuilder

2019-01-19 Thread Chris Mugdan

Hi,

I am using HttpClientBuilder to create an HttpClient with NTLM 
authentication, but looking at the logs it tries SPNEGO first then NTLM. 
Since I am only interested in NTLM, to increase the efficiency of 
requests I want it to be the first authenticator tried. How do I do this 
when I am using the following code to set up the HttpClient?


{

...

  HttpClientBuilder clientBuilder = HttpClients.custom()
    .useSystemProperties()
    .setUserAgent("Mozilla/5.0");

  // authentication/credentials...

  if (credsProvider == null)
  {
 credsProvider = new BasicCredentialsProvider();
 final NTCredentials credentials =
   new NTCredentials(username, password, workstation, domain);
 credsProvider.setCredentials(AuthScope.ANY, credentials);
  }

  clientBuilder = 
clientBuilder.setDefaultCredentialsProvider(credsProvider);


  return Executor.newInstance(clientBuilder.build());
}

--
Untitled Document

*Christopher Mugdan *
Senior Software Developer
Phone: +61 (0)2 9045 3391
Mobile: +61 (0)412 398 104
Email: chr...@integeo.com 
Skype: chrismugdan
www.integeo.com