Updated to latest Index as well as some minor bug fixes.

This commit is contained in:
flash 2025-03-24 00:20:41 +00:00 committed by flash
parent ad89d45cf0
commit 5ba8b30047
77 changed files with 900 additions and 937 deletions

View file

@ -2,7 +2,8 @@
<?php
namespace Misuzu;
use Index\Http\{HttpHeader,HttpHeaders,HttpRequest};
use Index\Http\{HttpRequest,HttpUri};
use Index\Http\Streams\NullStream;
require_once __DIR__ . '/../misuzu.php';
@ -76,10 +77,7 @@ handleValue:
$hostName ??= 'localhost';
// this should really not be necessary, mostly done to make sure the url registry is available
$msz->createRouting(new HttpRequest('::1', true, 'XX', '1.1', 'GET', '/', [], [], new HttpHeaders([
new HttpHeader('Host', $hostName),
]), null));
$msz->createRouting(new HttpRequest('1.1', ['Host' => [$hostName]], NullStream::instance(), [], 'GET', HttpUri::createUri('/'), [], []));
$msz->startTemplating(false);
$ctx = $msz->templating->load(implode(' ', array_slice($argv, $pathIndex)));