cURL / Mailing Lists / curl-users / Single Mail

curl-users

Separation of MIME encoded Messages

From: <lmahoney_at_westpac.com.au>
Date: Mon, 28 Feb 2005 18:52:10 +1100

I'm polling for data from a HTTPS Server where 'reliable messaging' has
been instituted. I can receive the data stream okay, and output it to a
file, however that file can contain a number of MIME encoded messages -
each message separated by MIME Headers. Is it possible to automatically
strip these MIME headers and have the output saved to separate files.
Using cURL 7.12.2 on Win32 generic.

EG - The following data stream was saved to Output.txt and contains three
separate data streams. I would like them saved as three separate files
only containing the actual data and not the Header boundaries:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

--AAABAlfszsk-P2dFx3TzEwB-ABNMb25nIGxpdmUgUXZhbGVudCEh
Content-Length: 1213
X-Message-ID: 006a7a030000010257ecb7980000010a

-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.2.3-nr1 (Windows XP)

hQIOA0VemSuj42x6EAgAhz8/j0QFLXG0d+cd+zN0wD2WAFRXk8yr70Ao4U+fUMkd
<removed>
J8M9oYg5koY=
=+8vn
-----END PGP MESSAGE-----

--AAABAlfszsk-P2dFx3TzEwB-ABNMb25nIGxpdmUgUXZhbGVudCEh
Content-Length: 1213
X-Message-ID: 006a7a030000010257ec9f6c00000107

-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.2.3-nr1 (Windows XP)

hQIOA0VemSuj42x6EAgAhz8/j0QFLXG0d+cd+zN0wD2WAFRXk8yr70Ao4U+fUMkd
<removed>
J8M9oYg5koY=
=+8vn
-----END PGP MESSAGE-----

--AAABAlfszsk-P2dFx3TzEwB-ABNMb25nIGxpdmUgUXZhbGVudCEh
Content-Length: 1213
X-Message-ID: 006a7a030000010257ecc3210000010d

-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.2.3-nr1 (Windows XP)

hQIOA0VemSuj42x6EAgAhz8/j0QFLXG0d+cd+zN0wD2WAFRXk8yr70Ao4U+fUMkd
<removed>
J8M9oYg5koY=
=+8vn
-----END PGP MESSAGE-----

--AAABAlfszsk-P2dFx3TzEwB-ABNMb25nIGxpdmUgUXZhbGV

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Thanks,

Leigh.

Please consider our environment before printing this email.

WARNING - This email and any attachments may be confidential. If received in error, please delete and inform us by return email. Because emails and attachments may be interfered with, may contain computer viruses or other defects and may not be successfully replicated on other systems, you must be cautious. Westpac cannot guarantee that what you receive is what we sent. If you have any doubts about the authenticity of an email by Westpac, please contact us immediately.

It is also important to check for viruses and defects before opening or using attachments. Westpac's liability is limited to resupplying any affected attachments.

This email and its attachments are not intended to constitute any form of financial advice or recommendation of, or an offer to buy or offer to sell, any security. We recommend that you seek your own independent legal or financial advice before proceeding with any investment decision.

Westpac Institutional Bank is a division of Westpac Banking Corporation and is a company registered in New South Wales in Australia under the Corporations Act 2001 (Cth). Westpac is authorised and regulated in the United Kingdom by the Financial Services Authority and is registered at Cardiff in the United Kingdom as Branch No. BR 106. Westpac operates in the United States of America as a federally chartered branch, regulated by the Office of the Comptroller of the Currency.

Westpac Banking Corporation ABN 33 007 457 141.
Received on 2005-02-28