![]() ![]() ![]() The value of filename*, though, is yet a bit more complicated than the one of filename.Īlso, the RFC seems to allow for additional whitespace around the =. When both "filename" and "filename*" are present in a single header field value, SHOULD pick "filename*" and ignore "filename". "the report.pdf") and escape sequences (the latter are discouraged, though, thus their handling isn't a hard requirement for me). the_report.pdf) or a quoted string that can also contain whitespace (e.g. ' dialog.Įasy, right? I can just get it from the Content-Disposition HTTP header, accessible on the response object: import reīut looking more closely at this topic, it isn't that easy:Īccording to RFC 6266 section 4.3, and the grammar in the section 4.1, the value can be an unquoted token (e.g. For storing the file, I'd like to determine the filename they way a web browser would for its 'save' or 'save as. I download a file using the get function of Python requests library.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |