How to download multiple files with just one http request

0

I found several links on the subject, but I still could not make it work, examples: link link

I tested with the version of chrome 69, firefox 44, edge 41. I created a TcpListener to generate the responses at hand, and monitored through the fiddler.

Example response:

HTTP / 1.1 200 OK Content-Type: multipart / mixed; boundary = AMZ90RFX875LKMFasdf09DDFF3 Content-Length: 312

- AMZ90RFX875LKMFasdf09DDFF3 Content-Type: text / plain Content-Disposition: attachment; filename="file1.txt"

content1 --AMZ90RFX875LKMFasdf09DDFF3 Content-Type: text / plain Content-Disposition: attachment; filename="file2.txt"

content2 --AMZ90RFX875LKMFasdf09DDFF3 -

I tested various combinations of "multipart / ???", several boundary combinations = AMZ90RFX875LKMFasdf09DDFF3, boundary = - AMZ90RFX875LKMFasdf09DDFF3, boundary="- AMZ90RFX875LKMFasdf09DDFF3".

Apparently this feature is mostly used or was made for the email protocol, but is partially supported by browsers.

The browser always generates a file without extension (or with the .mht extension depending on the multipart), with the final name of the route. The contents of the file are any response without headers, eg:

- AMZ90RFX875LKMFasdf09DDFF3 Content-Type: text / plain Content-Disposition: attachment; filename="file1.txt"

content1 --AMZ90RFX875LKMFasdf09DDFF3 Content-Type: text / plain Content-Disposition: attachment; filename="file2.txt"

content2 --AMZ90RFX875LKMFasdf09DDFF3 -

Any tips on what I might be doing wrong?

    
asked by anonymous 27.08.2018 / 16:16

0 answers