karlseguin / http.zig

An HTTP/1.1 server for zig
MIT License
454 stars 31 forks source link

Support MIME type `application/wasm` #18

Closed jmrico01 closed 11 months ago

jmrico01 commented 11 months ago

I can probably open a PR for this later today when I have some more time, but just wanted to write it down in case I forget. The ContentType enum in https://github.com/karlseguin/http.zig/blob/master/src/httpz.zig should have a WASM option, and the forExtension and other APIs should be enhanced to handle it.

Of course I can get around this now by adding the Content-Type header manually. Let me know if there is some specific criteria for which things should be in ContentType, or if it's just a convenience for common types.

karlseguin commented 11 months ago

Sure: https://github.com/karlseguin/http.zig/commit/aace345f43c1e20c29c35304f7806b87181a07a0

jmrico01 commented 11 months ago

Thank you!