I'm using libcurl to access an HTTPS "page" (the output is binary which the app understands rather than a page as such). The app also sends binary data to the page (a PHP script) via post. This all works fine (using curl_formadd with CURLFORM_PTRCONTENTS and CONTENTSLENGTH), except when the binary data to be transmitted contains NULL bytes. Even with the length specified, CURL is treating these as string delimiters. Is there a way to override this? since I can't even change all 0x00 to 0xFF or any similar substitution as any 8bit value is valid for some of the bytes. I realise that inserting escape values etc. would be an option, but am keen to avoid this for efficiency reasons.
Thanks in advance,