By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,483 Members | 1,001 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,483 IT Pros & Developers. It's quick & easy.

C++ with Libcurl to Microsoft Azure

P: 1
Hi,

I use libcurl library (v7.45.0) statically with my C++ application. Using curl APIs, we want to upload & download files to/from the Microsoft Azure Storage Blob service using https. I have no problem to get container list. But I can't upload a single file by using Put Block operation.

This it the PUT method: (blockId=1)

"PUT\n\n\n262144\n\n\n\n\n\n\n\n\nx-ms-date:Sat, 05 Nov 2016 00:35:38 GMT\nx-ms-version:2014-02-14\n/devazurestorage2016/blobcontainer1/azurerepository/950083514/000/002/2176\nblockid:MTAwMA==\ncomp:block"

I got http 400 error.

<?xml version="1.0" encoding="utf-8"?><Error><Code>InvalidHeaderValue</Code><Message>The value for one of the HTTP headers is not in the correct format.
RequestId:398559da-0001-007b-04fc-3694ba000000
Time:2016-11-05T00:36:45.0971626Z</Message><HeaderName>Content-Length</HeaderName><HeaderValue>-1</HeaderValue></Error>

Any idea to solve this issue.

Regards,
Jonathan
Nov 5 '16 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.