I'm working on a java application that needs to retrieve a url's filename (if there is one).
But how do you get the filename of a url like this,
(I've changed the site's name for privacy but it's a real url).
I know it points to a file because it initiates a filedownload and I can retrieve the file contents easily.
I've tried examining the headers for "Content-Disposition" and "Content-Location" but they're not returned by the server. Do I need to send a particular "User-Agent" header to get these values?
The same question also applies to jsp and asp downloads.