|
|
@ -599,12 +599,11 @@ def main():
|
|
|
|
dict_headers, socket_timeout)
|
|
|
|
dict_headers, socket_timeout)
|
|
|
|
resp['elapsed'] = (datetime.datetime.utcnow() - start).seconds
|
|
|
|
resp['elapsed'] = (datetime.datetime.utcnow() - start).seconds
|
|
|
|
resp['status'] = int(resp['status'])
|
|
|
|
resp['status'] = int(resp['status'])
|
|
|
|
|
|
|
|
resp['changed'] = False
|
|
|
|
|
|
|
|
|
|
|
|
# Write the file out if requested
|
|
|
|
# Write the file out if requested
|
|
|
|
if dest is not None:
|
|
|
|
if dest is not None:
|
|
|
|
if resp['status'] == 304:
|
|
|
|
if resp['status'] in status_code and resp['status'] != 304:
|
|
|
|
resp['changed'] = False
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
write_file(module, url, dest, content, resp)
|
|
|
|
write_file(module, url, dest, content, resp)
|
|
|
|
# allow file attribute changes
|
|
|
|
# allow file attribute changes
|
|
|
|
resp['changed'] = True
|
|
|
|
resp['changed'] = True
|
|
|
@ -613,8 +612,6 @@ def main():
|
|
|
|
file_args['path'] = dest
|
|
|
|
file_args['path'] = dest
|
|
|
|
resp['changed'] = module.set_fs_attributes_if_different(file_args, resp['changed'])
|
|
|
|
resp['changed'] = module.set_fs_attributes_if_different(file_args, resp['changed'])
|
|
|
|
resp['path'] = dest
|
|
|
|
resp['path'] = dest
|
|
|
|
else:
|
|
|
|
|
|
|
|
resp['changed'] = False
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Transmogrify the headers, replacing '-' with '_', since variables don't
|
|
|
|
# Transmogrify the headers, replacing '-' with '_', since variables don't
|
|
|
|
# work with dashes.
|
|
|
|
# work with dashes.
|
|
|
|