cURL / Mailing Lists / curl-library / Single Mail

curl-library

clarifying multipart response with libcurl

From: Aleksandar Lazic <al-curllibrary_at_none.at>
Date: Thu, 29 Nov 2007 15:23:44 +0100

Dear Listmembers,

please can you help me to see if I haven't overseen any new features in
libcurl in the current version ;-).

I need to parse this multipart response.

---
HTTP/1.1 200 OK\r\n
Content-Type: multipart/x-mixed-replace;boundary=myboundary\r\n
--myboundary\r\n
Content-Type: text/xml\r\n
Content-Length: <Length of XMLResponse>\r\n
\r\n
<Response>
--myboundary\r\n
Content-Type: <either text/xml or image/jpeg (JPEG Frame)>\r\n
Content-Length: <Length of XMLResponse or JPEG Frame in-bytes>\r\n
\r\n
<Response or JPEG Frame>
--myboundary\r\n
Content-Type: <either text/xml or image/jpeg (JPEG Frame)>\r\n
Content-Length: <Length of XMLResponse or JPEG Frame in-bytes>\r\n
\r\n
<Response or JPEG Frame>
---
I plan to use the CURLOPT_WRITEFUNCTION from libcurl to parse the
response and get the datas into my program.
Is there a better way to handle multipart response with libcurl?!
Cheers and thanks for help ;-)
Aleks
Received on 2007-11-29