You need to get the value of the Content-Disposition header from QNetworkReply .

 reply->header(QNetworkRequest::ContentDispositionHeader) // QVariant(invalid) reply->rawHeader("Content-Disposition") // "attachment; filename=\"securitywidget.o\"" 

I can not understand what's the catch. How can you normally get the file name without maximizing parsing?

  • "Date" "Tue, 10 Oct 2017 14:09:59 GMT" zzz"Server" "Apache/2.2.22 (Debian)" zzz"Expires" "Thu, 19 Nov 1981 08:52:00 GMT" zzz"Cache-Control" "no-store, no-cache, must-revalidate, post-check=0, pre-check=0" zzz"Pragma" "no-cache" zzz"Content-Length" "1519314" zzz"Content-Disposition" "attachment; filename=\"securitywidget.o\"" zzz"Keep-Alive" "timeout=5, max=100" zzz"Connection" "Keep-Alive" zzz"Content-Type" "application/binary" zzz output reply->rawHeaderList() with a separator zzz - sm4ll_3gg
  • one
    I don’t know, I’ll just say that it’s probably not only that you came up with stackoverflow.com/questions/1208821/… - Alex
  • @Alex yes, I saw it, but I thought that since 2009 this problem was solved. So far, he pulled out the name of the regular, but it's just interesting what kind of magic is going on in Qt ) - sm4ll_3gg
  • so what's wrong? does rawHeader not return anything? - Xplatforms

0