cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Data lost by multipart/form-data

From: ZAN14211 <ZAN14211_at_nifty.ne.jp>
Date: Wed, 14 Nov 2001 20:55:41 +0900

Hello.

        I tried to post some data with multipart/form-data.
        Then '\n' code was contained, data was missing bordering on it.

        like this:

                $ch = curl_init( "http://myserver.co.jp/request_dump.cgi" );

                curl_setopt( $ch, CURLOPT_HEADER, 1 );
                curl_setopt( $ch, CURLOPT_VERBOSE, 1 );

                $values = array( "field1"=>"value1-1\nvalue1-2",
                                 "field2"=>"value2" );
                curl_setopt( $ch, CURLOPT_POSTFIELDS, $values );

                curl_exec( $ch );
                curl_close( $ch );

        <-- Sent data
                --curlSjgZe/MVqb4R23kNCTQJOv8FaLo
                Content-Disposition: form-data; name="field1"

                value1-1

                --curlSjgZe/MVqb4R23kNCTQJOv8FaLo
                Content-Disposition: form-data; name="field2"

                value2
                --curlSjgZe/MVqb4R23kNCTQJOv8FaLo--

        Does this phenomenon usually happen?

 [environment]
        apache_1.3.22, php-4.0.6, openssl-0.9.6b, curl-7.9.1

--
/***************************************************/
  Name:		Tsutomu Ichino
  ReplyTo:	ichino_at_actress.tec.toyota.co.jp
/***************************************************/
Received on 2001-11-14