Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > de.comp.lang.php > #3931 > unrolled thread
| Started by | Gerome Muent <kontakt@bmservices.de> |
|---|---|
| First post | 2016-08-15 13:17 +0200 |
| Last post | 2016-08-16 09:35 +0200 |
| Articles | 8 — 4 participants |
Back to article view | Back to de.comp.lang.php
Wie komme ich bei HTTP-Post-Request mit Content-Type: multipart/form-data; boundary=cbd60835-f15e-49e4-b0a2-6c569cea3a01 an den POST-Body Gerome Muent <kontakt@bmservices.de> - 2016-08-15 13:17 +0200
Re: Wie komme ich bei HTTP-Post-Request mit Content-Type: multipart/form-data; boundary=cbd60835-f15e-49e4-b0a2-6c569cea3a01 an den POST-Body Martin Wohlert <martin@b-root-force.de> - 2016-08-15 13:28 +0200
Re: Wie komme ich bei HTTP-Post-Request mit Content-Type: multipart/form-data; boundary=cbd60835-f15e-49e4-b0a2-6c569cea3a01 an den POST-Body Gerome Muent <kontakt@bmservices.de> - 2016-08-16 09:18 +0200
Re: Wie komme ich bei HTTP-Post-Request mit Content-Type: multipart/form-data; boundary=cbd60835-f15e-49e4-b0a2-6c569cea3a01 an den POST-Body "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-08-15 16:21 +0200
Re: Wie komme ich bei HTTP-Post-Request mit Content-Type: multipart/form-data; boundary=cbd60835-f15e-49e4-b0a2-6c569cea3a01 an den POST-Body Gerome Muent <kontakt@bmservices.de> - 2016-08-16 09:17 +0200
Re: Wie komme ich bei HTTP-Post-Request mit Content-Type: multipart/form-data; boundary=cbd60835-f15e-49e4-b0a2-6c569cea3a01 an den POST-Body Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-08-16 11:09 +0200
Re: Wie komme ich bei HTTP-Post-Request mit Content-Type: multipart/form-data; boundary=cbd60835-f15e-49e4-b0a2-6c569cea3a01 an den POST-Body "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-08-16 11:21 +0200
Re: Wie komme ich bei HTTP-Post-Request mit Content-Type: multipart/form-data; boundary=cbd60835-f15e-49e4-b0a2-6c569cea3a01 an den POST-Body Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-08-16 09:35 +0200
| From | Gerome Muent <kontakt@bmservices.de> |
|---|---|
| Date | 2016-08-15 13:17 +0200 |
| Subject | Wie komme ich bei HTTP-Post-Request mit Content-Type: multipart/form-data; boundary=cbd60835-f15e-49e4-b0a2-6c569cea3a01 an den POST-Body |
| Message-ID | <nos8cv$fci$1@news.albasani.net> |
Hallo zusammen,
in dem Fall ist bei mir leer:
$requestBody = file_get_contents("php://input");
$requestBody = file_get_contents("php://stdin");
$requestBody = $HTTP_RAW_POST_DATA;
Ich finde:
http://www.php.net/manual/en/ini.core.php#ini.always-populate-raw-post-data
Regardless of the setting, $HTTP_RAW_POST_DATA is not available with
enctype="multipart/form-data".
Ähnlich für die anderen.
Nur wie komme ich an meinen POST-Body?
Danke für Tips, Gérôme
[toc] | [next] | [standalone]
| From | Martin Wohlert <martin@b-root-force.de> |
|---|---|
| Date | 2016-08-15 13:28 +0200 |
| Message-ID | <nos90m$4d0$1@solani.org> |
| In reply to | #3931 |
Hallo Gerome,
eigentlich sollte doch das globale Array $_POST entsprechend deine Daten
enthalten.
Was bringt denn ein "var_dump($_POST);" ?
LG
Martin
Am 15.08.2016 um 13:17 schrieb Gerome Muent:
> Hallo zusammen,
> in dem Fall ist bei mir leer:
> $requestBody = file_get_contents("php://input");
> $requestBody = file_get_contents("php://stdin");
> $requestBody = $HTTP_RAW_POST_DATA;
>
> Ich finde:
> http://www.php.net/manual/en/ini.core.php#ini.always-populate-raw-post-data
> Regardless of the setting, $HTTP_RAW_POST_DATA is not available with
> enctype="multipart/form-data".
>
> Ähnlich für die anderen.
>
> Nur wie komme ich an meinen POST-Body?
>
> Danke für Tips, Gérôme
[toc] | [prev] | [next] | [standalone]
| From | Gerome Muent <kontakt@bmservices.de> |
|---|---|
| Date | 2016-08-16 09:18 +0200 |
| Message-ID | <nouenn$vj8$2@news.albasani.net> |
| In reply to | #3932 |
Am 15.08.2016 um 13:28 schrieb Martin Wohlert:
> eigentlich sollte doch das globale Array $_POST entsprechend deine Daten
> enthalten.
>
> Was bringt denn ein "var_dump($_POST);" ?
Leider nix. Die Daten waren irgendwie nicht standardkonform.
Die Lösung für den konkreten Fall war dieser Hack in einer .htaccess:
SetEnvIf Content-Type ^(multipart/form-data)(.*)
NEW_CONTENT_TYPE=application/mquest$2 OLD_CONTENT_TYPE=$1$2
RequestHeader set Content-Type %{NEW_CONTENT_TYPE}e env=NEW_CONTENT_TYPE
Sprich, wenn multipart/form-data kommt, dann einfach auf einen eigenen
Content-Type verbiegen und dann komme ich wieder ganz normal über
file_get_contents("php://input"); ran.
Grüße, Gérôme
[toc] | [prev] | [next] | [standalone]
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Date | 2016-08-15 16:21 +0200 |
| Message-ID | <nosj5h$b50$1@solani.org> |
| In reply to | #3931 |
Am 15.08.2016 um 13:17 schrieb Gerome Muent:
> in dem Fall ist bei mir leer:
> $requestBody = file_get_contents("php://input");
> $requestBody = file_get_contents("php://stdin");
> $requestBody = $HTTP_RAW_POST_DATA;
>
> Ich finde:
> http://www.php.net/manual/en/ini.core.php#ini.always-populate-raw-post-data
> Regardless of the setting, $HTTP_RAW_POST_DATA is not available with
> enctype="multipart/form-data".
>
> Ähnlich für die anderen.
>
> Nur wie komme ich an meinen POST-Body?
Probiers mal mit
<http://www.php.net/manual/en/ini.core.php#ini.enable-post-data-reading>.
--
Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | Gerome Muent <kontakt@bmservices.de> |
|---|---|
| Date | 2016-08-16 09:17 +0200 |
| Message-ID | <nouem6$vj8$1@news.albasani.net> |
| In reply to | #3933 |
Am 15.08.2016 um 16:21 schrieb Christoph M. Becker:
> <http://www.php.net/manual/en/ini.core.php#ini.enable-post-data-reading>.
Hat leider nichts gebracht.
Die Lösung für den konkreten Fall war dieser Hack in einer .htaccess:
SetEnvIf Content-Type ^(multipart/form-data)(.*)
NEW_CONTENT_TYPE=application/mquest$2 OLD_CONTENT_TYPE=$1$2
RequestHeader set Content-Type %{NEW_CONTENT_TYPE}e env=NEW_CONTENT_TYPE
Sprich, wenn multipart/form-data kommt, dann einfach auf einen eigenen
Content-Typ verbiegen und dann komme ich wieder ganz normal über
file_get_contents("php://input"); ran.
Grüße, Gérôme
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2016-08-16 11:09 +0200 |
| Message-ID | <7111183.N28Cn9JBL0@PointedEars.de> |
| In reply to | #3934 |
Gerome Muent wrote:
if ($security === 0)
{
> Die Lösung für den konkreten Fall war dieser Hack in einer .htaccess:
> SetEnvIf Content-Type ^(multipart/form-data)(.*)
> NEW_CONTENT_TYPE=application/mquest$2 OLD_CONTENT_TYPE=$1$2
> RequestHeader set Content-Type %{NEW_CONTENT_TYPE}e env=NEW_CONTENT_TYPE
>
> Sprich, wenn multipart/form-data kommt, dann einfach auf einen eigenen
> Content-Typ verbiegen und dann komme ich wieder ganz normal über
> file_get_contents("php://input"); ran.
}
--
PointedEars
Zend Certified PHP Engineer
<http://www.zend.com/en/yellow-pages/ZEND024953> | Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Date | 2016-08-16 11:21 +0200 |
| Message-ID | <noulul$k9r$1@solani.org> |
| In reply to | #3934 |
Am 16.08.2016 um 09:17 schrieb Gerome Muent: > Am 15.08.2016 um 16:21 schrieb Christoph M. Becker: > >> <http://www.php.net/manual/en/ini.core.php#ini.enable-post-data-reading>. > > Hat leider nichts gebracht. Bei mir funktioniert es wie im PHP-Handbuch beschrieben (getestet unter PHP 5.6.15 und 7.0.2). -- Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2016-08-16 09:35 +0200 |
| Message-ID | <2439249.hd35daYeMm@PointedEars.de> |
| In reply to | #3931 |
Gerome Muent wrote:
> in dem Fall ist bei mir leer:
> $requestBody = file_get_contents("php://input");
> $requestBody = file_get_contents("php://stdin");
> $requestBody = $HTTP_RAW_POST_DATA;
>
> Ich finde:
> http://www.php.net/manual/en/ini.core.php#ini.always-populate-raw-post-> data
> Regardless of the setting, $HTTP_RAW_POST_DATA is not available with
> enctype="multipart/form-data".
>
> Ähnlich für die anderen.
>
> Nur wie komme ich an meinen POST-Body?
Eher gar nicht, aber *genau* das willst Du auch nicht, oder?
<https://www.google.com/search?q=php+read+multipart%2Fform-data>
<http://php.net/manual/de/features.file-upload.post-method.php>
--
PointedEars
Zend Certified PHP Engineer
<http://www.zend.com/en/yellow-pages/ZEND024953> | Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [standalone]
Back to top | Article view | de.comp.lang.php
csiph-web