Issue #13475 has been updated by David K.

Status changed from Accepted to Closed

Closing - as indicated in my previous note this seems fixed in the 3.x branch.

----------------------------------------
Bug #13475: Filebucket HEAD returns 404
https://projects.puppetlabs.com/issues/13475#change-101005

* Author: David K
* Status: Closed
* Priority: Normal
* Assignee: 
* Category: filebucket
* Target version: 3.x
* Affected Puppet version: 2.7.12
* Keywords: 
* Branch: 
----------------------------------------
Using mongrel 1.2.0-pre2 with puppet 2.7.12 the filebucket HEAD requests do not 
work as intended.

This gives a 404 even on files which exist with the proper checksum and path, 
as a result files are re-bucketed many times across our clients (not a big deal 
as 2.6.x did this anyways).

I believe the issue is because in network/http/handler.rb the do_head method 
does not set a status response code. It looks as if this defaults to 404 in 
mongrel unless otherwise set. It looks like if the indirection request is true, 
we should just return a 200 status code, and if it's not, the do_exception 
throwing an 404 will handle the errors.

Something like this maybe?

    def do_head(indirection_name, key, params, request, response)
    result =  self.model(indirection_name).indirection.head(key, params)
    unless result
      Puppet.info("Could not find #{indirection_name} for '#{key}'")
      return do_exception(response, "Could not find #{indirection_name} 
#{key}", 404)
    end

    set_response(response, result)
    end



-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to