You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
XDM is currently being re-written to be more user friendly and performant, please refer to (#768) for more information
PLEASE DO NOT JUST SAY "It does not work, or something not working etc." Provide enough relevent details so that the issue can be analyzed and reproduced easily
publicstaticstring?GetContentDispositionFileName(stringcontentDisposition){try{varr1=newRegex(@"\s*filename\*\s*=\s*[^']*\'\s*\'(.*)");varr2=newRegex("\\s*filename\\s*=\\s*\"([^\"]*)\"");varr3=newRegex("filename\\s*=\\s*([^\"]+)");//var contentDisposition = response.Headers.Get("Content-Disposition");if(contentDisposition!=null){Log.Debug("Trying to get filename from: "+contentDisposition);foreach(varrinnewRegex[]{r1,r2,r3}){varm=r.Match(contentDisposition);if(m.Success&&m.Groups.Count>=2){returnFileHelper.SanitizeFileName(Uri.UnescapeDataString(m.Groups[1].Value));}}}}catch(Exceptionex){Log.Debug(ex,ex.Message);}returnnull;}
XDM is currently being re-written to be more user friendly and performant, please refer to (#768) for more information
PLEASE DO NOT JUST SAY "It does not work, or something not working etc." Provide enough relevent details so that the issue can be analyzed and reproduced easily
Describe the bug
can not handle filename correctly like:
Content-Disposition: attachment;filename*=utf-8''aaaa.rar; filename="aaaa.rar"
the final saved filename by xdm is
aaaa.rar; filename="aaaa.rar"
is wrong.To Reproduce
Steps to reproduce the behavior:
you will get header like
Content-Disposition: attachment;filename*=utf-8''xxxx%2Erar;filename="xxxx.rar"
Expected behavior
filename should be
aaaa.rar
, notaaaa.rar; filename="aaaa.rar"
please complete the following information:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: