Connecting Tech Pros Worldwide Help | Site Map

HTTP POST problem

  #1  
Old March 6th, 2006, 02:15 PM
kumar
Guest
 
Posts: n/a
Hi friends,

I am using PHP version 4.2 in RHEL4 system.

I am sending multipart binary data using libcurl from client
application and a php script at the server side recieves it. But
unfortunately the data received through $_POST variable is truncated at
the first instance of NULL character.
-> I cannot use base64 encoding as this is performance intensive and
client application is lightweight. We cannot afford this.
-> there seem to be no way access raw http data since client is
sending multipart data.

Is there any way I can be able to access http raw data or correct
binary data..?

Any help in this regards are ihighly appreciated.

Thanks.
~Kuamar

  #2  
Old March 6th, 2006, 03:05 PM
Steve
Guest
 
Posts: n/a

re: HTTP POST problem


[color=blue]
> I am using PHP version 4.2 in RHEL4 system.[/color]
[color=blue]
> I am sending multipart binary data using libcurl from client
> application and a php script at the server side recieves it. But
> unfortunately the data received through $_POST variable is truncated at
> the first instance of NULL character.
> -> I cannot use base64 encoding as this is performance intensive and
> client application is lightweight. We cannot afford this.
> -> there seem to be no way access raw http data since client is
> sending multipart data.[/color]
[color=blue]
> Is there any way I can be able to access http raw data or correct
> binary data..?[/color]

Try recoding to use PUT instead of POST:

<http://www.php.net/manual/en/features.file-upload.put-method.php>

---
Steve

  #3  
Old March 10th, 2006, 04:05 AM
Manuel Lemos
Guest
 
Posts: n/a

re: HTTP POST problem


Hello,

on 03/06/2006 11:02 AM kumar said the following:[color=blue]
> I am sending multipart binary data using libcurl from client
> application and a php script at the server side recieves it. But
> unfortunately the data received through $_POST variable is truncated at
> the first instance of NULL character.
> -> I cannot use base64 encoding as this is performance intensive and
> client application is lightweight. We cannot afford this.
> -> there seem to be no way access raw http data since client is
> sending multipart data.
>
> Is there any way I can be able to access http raw data or correct
> binary data..?[/color]

You may want to try this HTTP client class that supports uploading
binary files.

http://www.phpclasses.org/httpclient


--

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Http Post Problem rohandnaik answers 1 December 31st, 2007 05:21 PM
HTTP Post and HttpWebRequest object JansenH answers 3 May 31st, 2006 09:45 PM
HTTP Post Problem in Pocket PC Hitchkas answers 0 December 13th, 2005 12:55 AM
HTTP POST + Webrequest WIWA answers 0 November 21st, 2005 10:44 PM