[ 
https://issues.apache.org/jira/browse/OLINGO-405?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Bolz updated OLINGO-405:
--------------------------------

    Attachment: mibo-405-fix.diff

Hi [~anthony.elliott],

I checked the change and I think there is some rework to do.
Because the {{length = input.available();}} does not deliver the total length. 
It just deliver [number of bytes that can be read \[...\] without 
blocking|http://docs.oracle.com/javase/6/docs/api/java/io/InputStream.html].
If this length is used to create the HttpEntity it is possible that only the 
first xx bytes get read.
Based on that this change also breaks the integration tests.

I changed the implementation in a way which should work and also set the 
content length according your suggestion.
Can you please check if the change really works for your use case and give 
feedback?

Kind regards,
Michael

By the way, I don't know how you created the patch (diff) file. But in my 
environment (Git 2.0.x via CLI) Git complains about the *missing header* -> 
{{fatal: patch fragment without header at line 6:....}}.

> Content-Length not set even when requested
> ------------------------------------------
>
>                 Key: OLINGO-405
>                 URL: https://issues.apache.org/jira/browse/OLINGO-405
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata4-client
>            Reporter: Anthony Elliott
>            Assignee: Michael Bolz
>         Attachments: content-length.diff, mibo-405-fix.diff
>
>
> I noticed a bug where I set useChunked(false) in my client but requests were 
> still sent as chunked. Fixed by specifying the content length.
> My fix is taken from an earlier version (couple weeks ago) of Olingo 4.  
> Might be worth checking to see if another commit already fixed this.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to