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.
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
aroundwfile.write
because it was throwing aBrokenPipeError
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.