Http-server: Configure additional mime types

Created on 20 Jun 2013  路  18Comments  路  Source: http-party/http-server

add mime type support to enable streaming of video files with html 5 video tag

mime

Most helpful comment

Just want to chime in that lack of WebAssembly mime is forcing me to look for an alternative local server. http-server has beautifully handled all my needs up to this point and I'd hate to switch if I don't have to.

All 18 comments

Yes, I'd like to be able to configure additional content types as well.

For instance, text/cache-manifest for .manifest files. Seems to work fine in chrome either way, but I imagine there are other use cases for this feature.

+1, would love it for .webapp. Pull requests would be welcome!

+1

Any news on HTML 5 video support?

+1 I'm trying to test m3u8 HLS playlists and need to set the mime type

+1 Resource interpreted as Stylesheet but transferred with MIME type application/octet-stream: "http://localhost:8080/less/main.less".

also .less is not supported +1 for that.

I'll give it a shot. Just got an API implemented in the upstream ecstatic. If it gets accepted and I'm successful here... well, then it's done.

Can someone give me a hand with #152?
I can't figure out how to test the feature with vows. If I start http-server, I can request files with custom mime-types but no matter what I do in http-server-test.js, I get an ECONNREFUSED. I'm pretty sure it's a race condition but I can't figure out how to fix it.

Any ideas?

It'd also be nice if we could map .mpd to application/dash+xml for MPEG-DASH.

I would love to be able to serve SVGs correctly using the MIME type images/svg+xml

152 just needs tests afaict. If anyone wants to right those, I'd be 馃憤 for merging that. Setting media types correctly is rather essential--and ecstatic already supports a way to set the mappings (between extension and media type) properly. So. Who's up for writing tests?! 馃榿

MIME types can be customised in local-web-server, is that the kind of behaviour you're looking for?

+1 for SVG and/or customizable approach similar local-web-server.

+1

Just want to chime in that lack of WebAssembly mime is forcing me to look for an alternative local server. http-server has beautifully handled all my needs up to this point and I'd hate to switch if I don't have to.

@anderspitman Did you find another option? At some point I switched from http-server to serve, but it has the same limitation.

@paulmelnikow I've been using https://crates.io/crates/https. That page includes installation instructions for non Rust developers as well.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jondlm picture jondlm  路  6Comments

ghost picture ghost  路  4Comments

dKab picture dKab  路  7Comments

gerkirill picture gerkirill  路  3Comments

rgladwell picture rgladwell  路  7Comments