vmichalak / Hermes.Net

Fast & Minimalist Web Server Framework for Microsoft Universal Platform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong route retrieved

orel91 opened this issue · comments

Hello,

When I create 2 routes in this order:

server.AddGetRoute("/", new SampleMiddleWare());
server.AddTransparentFolderRoute("/style", storageFolder);

and try to access to a file in the second route with the url '/style/style.css', I always get the content of the first route.
However, if I write these 2 lines in this order:

server.AddTransparentFolderRoute("/style", storageFolder);
server.AddGetRoute("/", new SampleMiddleWare());

everything seems to work fine.

Is this a bug or am I using it wrong ?

For information, the bug seems to be located in the FilterMiddlewares method of the MiddlewareManager class.

Kind Regards,

Aurelien

Hi orel91,
Thanks you for your feedback, it's really a bug in hermes.net.
I correct it in the new build, you can download it directly on NuGet if you want.
Kind Regards,
Valentin Michalak