kazu2012 / persevere-framework

Automatically exported from code.google.com/p/persevere-framework
0 stars 0 forks source link

partial PUT destroys unPUT fields #234

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. create object in /example/
{name: {type:"string"}, extra: {type:"integer", optional:true}}
POST /example/
name:"foo"
extra:1
2. PUT /example/1
name:"bar"

What is the expected output? What do you see instead?
'extra' field is no longer there.  
additionally, it is not possible to PUT only changes and keep all other
fields at the current values (same problem, almost)

What version of the product are you using? On what operating system?
nightly build from last night (2009-Aug-18), linux

Please provide any additional information below.
partial PUT is not currently supported - all fields must be defined.  does
not default to existing values.  this is probably more of a feature
enhancement than a bug per se, but it is somewhat annoying.

Original issue reported on code.google.com by elf...@gmail.com on 20 Aug 2009 at 6:20

GoogleCodeExporter commented 8 years ago
Doing partial updates would violate the semantics of PUT as defined by RFC 
2616. You 
can now use a POST to do partial updates like you want:
2. POST /example/1
name:"bar"

Original comment by kris...@gmail.com on 20 Aug 2009 at 8:15

GoogleCodeExporter commented 8 years ago
if i may ask, to which section of 2616 are you referring? i'm curious for my own
edification as i did not find that meaning anywhere.  thanks!

Original comment by elf...@gmail.com on 24 Aug 2009 at 7:39