rumkin / plant

🌳 JS web server charged with WebAPI and neat HTTP2 support
https://npmjs.com/package/@plant/plant
81 stars 6 forks source link

Headers not sent when pushing streams #23

Closed Francois-Esquire closed 4 years ago

Francois-Esquire commented 4 years ago

When pushing a stream of a <script type="module">/* ... */</script> to the browser, the runtime would error out with:

Failed to load module script: The server responded with a non-JavaScript MIME type of "". Strict MIME type checking is enforced for module scripts per HTML spec.

It came to my attention that the headers were missing (only status was present) because of this, for any content pushed from the server (type="modules" was the only one to complain). The changes here address that.

rumkin commented 4 years ago

Thanks for fixing this.

rumkin commented 4 years ago

@Francois-Esquire, I've published v1.3.1 of http-adapter package with your fix. Now it could be installed.

Francois-Esquire commented 4 years ago

@rumkin Thanks for being very responsive and acting on this quickly!