Issue #93 new

piston.handler.update handling POST data?

klumhru
created an issue

Hi

We're having a problem with the automatic update handler for a resource using piston. After a bit of digging I saw that the piston.handler.BaseHandler.update() method was using the request.POST data when it is dealing with a PUT request. Is this correct behaviour? I ran some tests and the request.POST dict was always empty while the request.data collection had valid entries.

If I replace this line in the update() method: (line 129 in handler.py) {{{

!attrs = self.flatten_dict(request.POST)

}}} with this code: {{{

!attrs = self.flatten_dict(request.data)

}}} Everything works as (I) expected.

Is this an issue, or WOI?

Best regards Hogni

Comments (0)

  1. Log in to comment