ansible/ansible — pull request #2630 by sergevanginderachter (2013-04-10 00:13:14+00:00)
Title: When saving to dest, check if we get redirected, and use the new

... location header to set the dest file name if we only provided a
target dir. Only save if dest not modified.

Use case: we download artifacts from a Nexus repository through a HTTP url of the form
```
${nexus_url_base}r=${nexus_url_release}&g=${javap p_groupid}&a=${javapp_artefactid}&v=${javapp_version}&c=${javapp_classifier}&e=${javapp_extension}
```
Which doesnt allow to know the filename of the file we download beforehand.

Also implements the If-Modified-Since header, yeilding in a changed: false return when the file is nog newer.

TODO: implement a force parameter to download the file either way