--TEST--
env request body
--SKIPIF--
-<? include "skipif.inc";
+<?php include "skipif.inc"; ?>
--PUT--
Content-Type: skip/me
foo
--FILE--
-<?
+<?php
var_dump((string) \http\Env::getRequestBody());
?>
DONE
--TEST--
env request body
--SKIPIF--
-<? include "skipif.inc";
+<?php include "skipif.inc"; ?>
--PUT--
Content-Type: application/x-www-form-urlencoded
foo=bar&baz=buh
--FILE--
-<?
+<?php
var_dump($_POST);
?>
DONE
--TEST--
env request body
--SKIPIF--
-<? include "skipif.inc";
+<?php include "skipif.inc"; ?>
--PUT--
Content-Type: multipart/form-data;boundary=123
--123
foo=bar&baz=buh
--123--
--FILE--
-<?
+<?php
var_dump($_POST);
var_dump($_FILES);
?>
--TEST--
env request header
--SKIPIF--
-<? include "skipif.inc";
+<?php include "skipif.inc"; ?>
--POST--
a=b
--ENV--
HTTP_HOST=foo.bar
HTTP_ACCEPT=*/*
--FILE--
-<?
+<?php
var_dump(http\Env::getRequestHeader("nono"));
var_dump(http\Env::getRequestHeader("Host"));
var_dump(http\Env::getRequestHeader("content-type"));
var_dump(http\Env::getRequestHeader());
+?>
--EXPECTF--
NULL
string(%d) "foo.bar"
--COOKIE--
foo=bar
--FILE--
-<?
+<?php
echo "Test\n";
use http\env\Request as HttpEnvRequest;
echo "stream\n";
var_dump(file_get_contents("php://input"));
-
-echo "Done\n";
+?>
+Done
--EXPECTF--
Test
object(%s)#%d (12) {
--TEST--
multipart message
--SKIPIF--
-<? include "skipif.inc";
+<?php include "skipif.inc"; ?>
--FILE--
-<?
+<?php
$m = new http\Message(fopen(__DIR__."/data/message_r_multipart_put.txt","rb"));
if ($m->isMultipart($boundary)) {
var_dump($boundary);
CUSTOM
-<?
+<?php
$cc = http\Env::negotiate("a, a.b;q=0.9, c.d;q=0, *.* ; q=0.1",
array("a.x", "c.d", "c.e", "a.b"), ".", $ccr);
echo "$cc: "; print_r($ccr);