php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8116 Raw HTTP_POST-Data access
Submitted: 2000-12-05 06:42 UTC Modified: 2000-12-11 06:13 UTC
From: t dot rogall at jensen-stuart dot de Assigned:
Status: Closed Package: HTTP related
PHP Version: 4.0.3pl1 OS: Windows NT / IIS 4
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: t dot rogall at jensen-stuart dot de
New email:
PHP Version: OS:

 

 [2000-12-05 06:42 UTC] t dot rogall at jensen-stuart dot de
I'm working on an XML-Project. My PHP-Script is called by another script on another server. It is sending a complete XML-File using the HTTP-POST-method.

For some reason it is sending *only* the XML-File, and *not* pairs of 'key and value'. 

So for example the posted data is just '<xmldata>...</xmldata>' and not 'xml_file=<xmldata>...</xmldata>'.

It appears to me, that PHP tries to parse the data, but since it doesn't find any equals-signs ('=') in the data, it cannot divide the data into 'keys and values'.

The problem is that I cannot access the posted data at all. The $HTTP_POST_VARIABLES-array is set, but it is empty. The REQUEST_METHOD and CONTENT_LENGTH variables are correctly set (f.e POST and 2134).

If by accident somewhere in the data would appear a '=', then PHP interpretes the former part as the variable-name (with spaces converted to underscores!), and the latter as the variable-value. This could also become a problem, because a '=' or a '&' *could* be part of the data.

How can I access the posted data directly? This is quite urgent to me.







 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-11 06:13 UTC] stas@php.net
I fear PHP can do nothing about it - where should it put
that information that does not conform to standard
name=value convention?

As for raw POST data access - use non-form content type
(like application/octet-stream) and pick your data from
$HTTP_RAW_POST_DATA.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 23:01:28 2024 UTC