Re: $HTTP_RAW_POST_DATA
| From: | Jason Cox | Date: | Sun, 23 Jul 2000 23:33:17 +0000 |
| Subject: | Re: $HTTP_RAW_POST_DATA | ||
| References: | 1 | Groups: | php.dev php.general |
| Request: | Send a blank email to php-dev+get-25626@lists.php.net to get a copy of this message | ||
Here's the original message and response:
Jason
From: Rasmus Lerdorf (rasmus@php.net)
Date: 07/21/00
Look at $HTTP_RAW_POST_DATA
On Fri, 21 Jul 2000, Jason wrote:
> I realize you guys get too much mail to this list already, but nobody
seems
> to know much about this. Do you guys have any ideas?
>
> Jason
>
> > I'm asking this question on behalf of someone else and am quite
> > ignorant to what he's talking about. Does anyone have a clue?
> >
> > ---snip---
> > The data in HTML form POSTs is packaged into name value pairs. But when
> > IE 5 exports its favorites file to a server (an HTML file), it sends a
> > raw HTTP POST of the data (there are no names and values, just a raw
> > text stream).
> >
> > PHP's HTTP_POST_VARS does a good job of exposing the variables found in
> > HTML form posts. But it doesn't allow access to the raw HTTP
> > POST data (HTTP_POST_VARS contains a brave but corrupted attempt to
> > parse the 'variables').
> >
> > Perl CGI stdin has a similar problem to PHP. But someone did an
> > experiment for me and found that mod_perl's read command works
> > perfectly.
> > ---snip---
> >
> > jason
>
> Why would you want to use $HTTP_RAW_POST_DATA anyway? What data could you
be
> trying to send to PHP to need it in a raw format? I can't find the
origional
> message from this one so I don't know what the real problem is. Can you
let
> me know?
>
> John
>
>
> -----Original Message-----
> From: Jason Cox [mailto:jasonc@webpipe.net]
> Sent: Sunday, July 23, 2000 2:47 PM
> To: php-general@lists.php.net; php-dev@lists.php.net
> Subject: [PHP] $HTTP_RAW_POST_DATA
>
>
> Anyone have any ideas on this one??
>
> Jason
>
>
>
> > In php, use the variable $HTTP_RAW_POST_DATA, it should have what
> > you're looking for.
>
> $HTTP_RAW_POST_DATA is empty. www.faqts.com seems to have the answer to
> why:
>
> > To do this you must set the content type in the request header to
> > something PHP doesn't recognize. For example, "Content-Type: xyz".
> > If php3 doesn't recognize the content type it will assign the
> > posted data to: $HTTP_RAW_POST_DATA which is then readily available
> > in the script.
>
> Unfortunately I have no control of the Content-Type. Internet Explorer
> sets it to "application/x-www-form-urlencoded". That's the same as an
> HTML Form Post (which of course it isn't). User-Agent is set to
> "PostFavorites".
_______________________________________________________
Site Design, Hosting, and E-Commerce at www.webpipe.net