http_request bug?

I have a simple LWRP based on the code from the wiki:
http://wiki.opscode.com/display/chef/Resources#Resources-HTTPRequest
for doing a head request with if-modified-since to conditionally
trigger a remote_file. This now triggers every time since upgrading
to 10.14. Is this a known issue?

Sample simplified LWRP provider code:

action :create do
remote_file new_resource.path do
owner new_resource.owner
group new_resource.group
mode new_resource.mode
source new_resource.source
action :nothing
end

http_request “HEAD #{new_resource.source}” do
message ""
url new_resource.source
action :head
if ::File.exists?(new_resource.path)
headers “If-Modified-Since” => ::File.mtime(new_resource.path).httpdate
end
notifies :create, resources(:remote_file => new_resource.path), :immediately
end
end

On Mon, Sep 24, 2012 at 11:48 PM, Brian Akins brian@akins.org wrote:

I have a simple LWRP based on the code from the wiki:
http://wiki.opscode.com/display/chef/Resources#Resources-HTTPRequest
for doing a head request with if-modified-since to conditionally
trigger a remote_file. This now triggers every time since upgrading
to 10.14. Is this a known issue?

Yes, http://tickets.opscode.com/browse/CHEF-3454.

This should be fixed in 10.14.4.rc.0 if you want to give it a try. It
will ship soon.

Bryan

On Mon, Sep 24, 2012 at 11:54 PM, Bryan McLellan btm@loftninjas.org wrote:

Yes, http://tickets.opscode.com/browse/CHEF-3454.

I guess I should look at the tickets before complaining :wink:

Confirmed that this seems to work in 10.14.4.rc.0

Thanks!

--bakins