I recently got a Header value cannot contain or convert into non-ascii characters: content-disposition error after sending an attachment response for a file named café.pdf.
The error is thrown in here because the ASCII code of é is 233 and only codes smaller than 127 are allowed.
This is not coherent with the content-disposition module which allows up to code 255.
I opened the issue here. If you feel hapi is doing the correct thing, I'll open it with content-disposition.
This check was added in this commit. @jefflembeck since it's your commit, could you please have a look?
I recently got a
Header value cannot contain or convert into non-ascii characters: content-dispositionerror after sending an attachment response for a file namedcafé.pdf.The error is thrown in here because the ASCII code of
éis233and only codes smaller than127are allowed.This is not coherent with the content-disposition module which allows up to code
255.I opened the issue here. If you feel hapi is doing the correct thing, I'll open it with content-disposition.
This check was added in this commit. @jefflembeck since it's your commit, could you please have a look?