[ https://issues.apache.org/jira/browse/OLINGO-1157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chin Loong Goh updated OLINGO-1157: ----------------------------------- Priority: Major (was: Minor) > Exception When Parsing Batch Response Due To Number In Header > ------------------------------------------------------------- > > Key: OLINGO-1157 > URL: https://issues.apache.org/jira/browse/OLINGO-1157 > Project: Olingo > Issue Type: Question > Reporter: Chin Loong Goh > Labels: beginner, newbie > Attachments: response.txt > > > I am using Olingo OData2 version 2.0.6 and I am getting an error when I parse > a batch response. > The code I ran is as follows: > public static void main(String[] args) throws Exception { > InputStream content = new FileInputStream("response.txt"); > BatchSingleResponse response = getFirstBatchResponse(content, > "multipart/mixed; boundary=5B658D378F65F2078DC2D4E55F8BF5AD0"); > System.out.println(response.getBody()); > } > response.txt (I have attached it to this question) is a valid OData response > and it works when I attempt to parse it. However, when I add a number to any > header, for instance, I change "Content-Length" to "Content-Length2", it > throws the following exception. > Caused by: org.apache.olingo.odata2.api.batch.BatchException: Expected empty > line but was '[None]': line '8' > I've tried the same trick on different variations of gibberish headers and it > seems that adding a number to any of the header name causes this exception. > May I know what is causing this problem and if there is any way around this? > I apologize if I am not following any Open Source protocols when asking this > question. It is my first time and I am still learning on how to get involved. > Thank you! > -- This message was sent by Atlassian JIRA (v6.4.14#64029)