psyomn / ash

Ash is an Ada Simple HTTP Server
Apache License 2.0
10 stars 3 forks source link

Return index.html if path is directory #5

Closed jklmnn closed 5 years ago

jklmnn commented 5 years ago

Currently if the path points to a directory the server answers with resource not found as it cannot open the file. This change checks if the path is a directory and appends /index.html if so.

psyomn commented 5 years ago

Hey there, just a heads up, I'm planning to re-license under Apache v2. I'll probably do that tonight and go over your PR. Would that be ok?

Also out of curiosity, where did you hear about Ash? Thanks for the interest!

jklmnn commented 5 years ago

Apache v2 is fine for me, is there anything specific you prefer over MIT in Apache? (I usually use GPL for my code).

I discovered it because I follow @Fabien-Chouteau who digs up many Ada projects on GitHub ;) Also I like your code style and will probably fork it to build a SPARK HTTP server library.

psyomn commented 5 years ago

I prefer the verbosity of Apache, along with the requirement that the former copyright notice must be maintained, as well as the clauses of attribution. MIT kind of feels permissive to a fault. I don't mind if said software can be used in closed source, but another nice thing is that I believe you need to leave a not on any source file you decide to modify.

Thank you very much for the kind words, and glad you're digging Ada!

I've updated the license btw, if this is cool with you still, I will merge your patch! Perhaps a fun thing in the future is to do directory listings in the directory path :D!

jklmnn commented 5 years ago

Yes, you can merge it, I'm totally fine with Apache :) If I find some free time I'll probably do the directory listings, too ;)

psyomn commented 5 years ago

Many thanks! Cheers!