HTTP POST problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kumar

    HTTP POST problem

    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

  • Steve

    #2
    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

    Comment

    • Manuel Lemos

      #3
      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.




      --

      Regards,
      Manuel Lemos

      Metastorage - Data object relational mapping layer generator
      ✅「官方网站」mk体育拥有各种免费又安全的资源,因为亚洲当中中国玩家人口基数的众多,mk体育创造了中国网络游戏的神话,全球首推免费在线点播体育直播。


      PHP Classes - Free ready to use OOP components written in PHP

      Comment

      Working...