P
Peter Judge
Guest
My emailed responses don't seem to have come through (yet?). The HTTP client is getting a complete response: we know it is complete because the Content-Length header is 9 and there are 9 characters (bytes) in “Success”. The JSON parser in OE does not recognise primitives as legal JSON: it only recognises JSON when its an object “{}” or an array “[]”. The string response _is_ legal JSON but we don’t do the right thing because the JsonEntityWriter (the code that converts the response body into a ‘rea’ object) simply uses the JSON parser. See github.com/.../JsonEntityWriter.cls for what it does. You can certainly log a bug to have us handle the other cases. From json.org, that would be any “value” from json.org. If you want to work around the issue, you can write an EntityWriter that knows how to deal with non-array and non-object values, and have the HTTP client use that instead of the shipped JsonEntityWriter. I can provide more info if needed. The response-*.txt files have the entire (8k by default) chunk of data received by the socket written into them. You can see from the first few lines in the chunk files that there are 8k bytes read and 607 bytes received. You can see that in the "chunk dump" header. ================================ NEW CHUNK (8192) BYTES READ (607) ================================ The HTTP client does do the right thing, and discards and extraneous nulls.
Continue reading...
Continue reading...