#10 ✓resolved
Markus

proppatch: arguments are not passed to set_* method

Reported by Markus | June 21st, 2007 @ 11:22 AM

I encountered this problem when I wanted to update the lastModified property. But there was an error since arguments were not passed to the set_* method on the resource object.

I'd suggest the following change to propXMLMethods>proppatch_xml:

xml.D :prop do

xml.D set_property.name.to_sym, set_property.attributes

end

symbol = ("set_" + set_property.name).to_sym

if @resource.respond_to?(symbol)

method = @resource.method(symbol)

if method.arity == 1 and set_property.children and set_property.children.size > 0

xml.D(:status, method.call(set_property.children[0].to_s))

else

xml.D(:status, method.call())

end

else

xml.D :status, "HTTP/1.1 200 OK"

end

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Pages