public function invalidProtocolRequestsUnsupported()
 {
     $req = $this->newRequest('GET', new URL('http://localhost/'));
     $req->env['SERVER_PROTOCOL'] = 'INVALID/1.0';
     $res = new HttpScriptletResponse();
     $s = new HttpScriptlet();
     $s->service($req, $res);
 }
 public function forwardedHosts()
 {
     $req = $this->newRequest('GET', new URL('http://localhost/'));
     $req->addHeader('X-Forwarded-Host', 'balance.example.com, proxy.example.com');
     $res = new HttpScriptletResponse();
     $s = new HttpScriptlet();
     $s->service($req, $res);
     $this->assertEquals('balance.example.com', $req->getURL()->getHost());
 }