as3httpclient icon indicating copy to clipboard operation
as3httpclient copied to clipboard

POST fails with ByteArray body with position != 0

Open petergeneric opened this issue 12 years ago • 0 comments

When making a POST request, if the request.body is a ByteArray and the array is not at position 0 the request fails.

This looks to be because the Content-Length header is set based on the .length of the body, however during transport it expects there to be .length bytes of data after the current position. It would at least be worth a warning in the documentation for HttpRequest (or possibly changing the code to generate Content-Length using .bytesAvailable instead of .length?)

petergeneric avatar Aug 22 '12 15:08 petergeneric