jamesnicolas / yomichan-forvo-server

An audio server for yomichan that scrapes forvo for audio files
33 stars 16 forks source link

Add Content-Length Header to Response #6

Closed ripose-jp closed 2 years ago

ripose-jp commented 2 years ago

I want to add support for this plugin in one of my projects, but the library I'm using to handle HTTP requests gets tripped up when the Content-Length header is missing and assumes there's no data.

I also added a try around wfile.write because it was throwing a BrokenPipeError when I used the back button in my browser. It's not likely to be relevant in most cases, but having Anki propagate the error isn't the best thing.