janhommes / o.js

o.js - client side oData lib.
https://janhommes.github.io/o.js/example/
MIT License
241 stars 58 forks source link

Changeset body missing newline #30

Closed cr00maui closed 8 years ago

cr00maui commented 8 years ago

buildBatchBody method, changeset body string concatenation:

body += 'Content-Type: application/json\n'; //body += 'Content-Length:' + stringData.length + '\n\n';

should be:

body += 'Content-Type: application/json\n\n'; //body += 'Content-Length:' + stringData.length + '\n\n';

as long as second line is commented out. I believe the second newline is necessary for the changeset to be parsed properly (it was for me).

IceOnFire commented 8 years ago

Hi cr00maui,

Thanks for your issue. I just added the newline at the beginning of the data section instead for better robustness.

Since this is a minor fix I didn't bother bumping a new version, but please let me know if you need it.

Antony