[ 
https://issues.apache.org/jira/browse/OLINGO-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17188255#comment-17188255
 ] 

Jan Ypma commented on OLINGO-272:
---------------------------------

This is not fixed in 4.7.1, when using OLingo with NTLM authentication. NTLM 
requires every request to be sent at least 2 times (3 if discovering NTLM is 
used). The first request always yields an NTLM challenge from the server, which 
must be hashed into the authentication token of the second request.

That's very unfortunate for PUT, PATCH and POST of course, since it requires to 
send the body twice. I actually don't know if the first request could be sent 
without body, though.

Either way, with NTLM, a quick fix in OLINGO could be to wrap the created http 
entity in a {{BufferedHttpEntity}}, so it can be sent twice.

 

> https authentication request results in NonRepeatableRequestException
> ---------------------------------------------------------------------
>
>                 Key: OLINGO-272
>                 URL: https://issues.apache.org/jira/browse/OLINGO-272
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata4-client
>    Affects Versions: (Java) V4 4.0.0-beta-01
>            Reporter: Challen He
>            Assignee: Challen He
>            Priority: Major
>             Fix For: (Java) V4 4.0.0-beta-01
>
>
> step1, 
> client.getConfiguration().setHttpClientFactory( new 
> BasicAuthHttpClientFactory("xxxusername ", "xxxxpassword"));
> step2, 
> final ODataEntityCreateRequest<ODataEntity> createDraftReq = 
> client.getCUDRequestFactory().getEntityCreateRequest(createDraftUriBuilder.build(),
>  draft);
> final ODataEntityCreateResponse<ODataEntity> createDraftRes = 
> createDraftReq.setFormat(format);
> createDraftReq.execute();
> Actual: NonRepeatableRequestException (guess it is because of login retry).
> Expected: no exception.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to