The source project of this merge request has been removed.
WIP: Adding MIME Types to internal packages
@nick.thomas here is an integrated version to prevent dependencies overhead.
I have not included tests as I don't hold any proper instance to run the daemon (hence why I use gitlab.com in the first place). I would say there is not much to test in the package itself though (just one range over a key/value list), rather one should test serve function against regressions: that being said I don't feel comfortable enough to hook into the whole logic and write proper tests for this.
On the other hand, here is one scenario to test against, and if you show me the path, I'd be glad to complete with actual code:
- test to serve some common extensions like
.html,.json,.svg,.zip,xls, ... and see if we get the correctContent-Typeheader.