Noticed Brook this morning and got interested by its features

Played around with the version that's part of CodeTyphon 4.70, but that was too old, so I downloaded the latest and installed that.
Both versions needed one change (applied in two locations) in
BrookRouter.pas to be able to identify actions:
if MatchPattern(PRoute^.Pattern, ARequest.PathInfo, VRedirect,
VNames, VValues) then
if MatchPattern(PRoute^.Pattern, ARequest.URI, VRedirect,
VNames, VValues) then
When debugging, ARequest.Pathinfo always was set
'127.0.0.1' (or
'localhost') when browsing
http://localhost/info - comparing
127.0.0.1 e.g. to
/info obviously fails. Passing ARquest.URI instead, it gets compared correctly. Difficult to debug deeper to the TRequest being outside of the Brook code, within the FCL I think.
That's Lazarus as Typhon IDE 4.7, using FPC 2.7.1, svn-rev 43727, with the Brook download from an hour ago.
My second issue that I wasn't able to fix yet is that Files is empty:
{ TSubmitAction }
TSubmitAction = class(TBrookAction)
public
procedure Post; override;
end;
implementation
{ TSubmitAction }
procedure TSubmitAction.Post;
var
cID: Int64;
fUploaded: TBrookUploadedFile;
begin
Write('<html>');
Write('<head>');
Write('<title>submission</title>');
Write('</head>');
Write('<body>');
try
cID := StrToInt64Def(Self.Params.Values['id'], 0);
if Self.Files.Count = 0 then begin
Write('<p>' + IntToStr(cID) + ' - no attached file found.' + '</p>');
end else begin
fUploaded := Files.First;
Write('<p>' + IntToStr(cID) + ' - filesize: ' + IntToStr(fUploaded.Size) + '</p>');
end;
Write('<a href="/info">back</a>');
except
on E: Exception do begin
Write('[-] error handling is work in progress');
end;
end;
Write('</body>');
Write('</html>');
end;I do upload the file using form output of another action
{ TInfoAction }
procedure TInfoAction.Get;
begin
Write('<html>');
Write('<head>');
Write('<title>info</title>');
Write('</head>');
Write('<body>');
Write('<form method="POST" action="/submit?id=10" enctype="multipart/form-data">');
Write('<input type="file" />');
Write('<input type="submit" />');
Write('</form>');
Write('</body>');
Write('</html>');
end; Both registered this way:
initialization
TSubmitAction.Register('/submit', rmPost);
TInfoAction.Register('/info?id', rmGet, True);
end.I always get Files.Count = 0. What am I doing wrong?