1
Vote

fDoesn't support downloading from all sites

description

I put an upgrade package on dropbox, and there was an error because the Content-Disposition header was in an unexpected format. I changed the code to use a regular expression to be more robust in finding the file name from that header.
                Dim contentDisposition = response.Headers("Content-Disposition")
                fileName = Regex.Match(contentDisposition, ";\s*filename=""?(.*?)""?(?:;|$)").Groups(1).Value
Hope it helps!

comments