Griffin.WebServer
Griffin.WebServer copied to clipboard
Links From File Listing Leads To Nowhere
I'm trying to set it up to serve some files from my drive, it does list the files correctly
But the links lead to nowhere, it just brings up an empty page and it doesn't even throw any exceptions.
Whenever i click on the link it redirects me to:
http://localhost:8080/HugeFile.zip/HugeFile.zip
However the file is located under drive E:\HugeFile.zip
and this is what i get in the headers of the response:
Request URL: http://localhost:8080/HugeFile.zip/HugeFile.zip
Request Method: GET
Status Code: 200 OK
Remote Address: 127.0.0.1:8080
Referrer Policy: no-referrer-when-downgrade
Response Headers:
Content-Length: 0
X-Pipeline-Index: 1
X-Powered-By: Griffin.Framework (http://github.com/jgauffin/griffin.framework)
Request Headers:
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,fa-IR;q=0.8,fa;q=0.6,en;q=0.4
Cache-Control: no-cache
Connection: keep-alive
Cookie: PHPSESSID=g0k6ffthmmcfmoleojp2st84i5
DNT: 1
Host: localhost:8080
Pragma: no-cache
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
I tested the sample code provided in project files and got the same results, anyway here's the snippet i currently use (From: blog.gauffin.org):
var moduleManager = new ModuleManager();
var fileService = new DiskFileService("/", "E:");
var module = new FileModule(fileService) { AllowFileListing = true };
moduleManager.Add(module);
var server = new HttpServer(moduleManager);
server.Start(IPAddress.Any, 8080);
Console.ReadLine();
cannot reproduce. Can you try again? (a bit late reply, but... ;))
@thebitbrine Hi, I know a bit old here, but maybe this is the same issue I had, I also got only a white page if I had a dot in the path name.
You can have a look here: https://github.com/jgauffin/Griffin.WebServer/issues/42