Finish the prop set feature.
This commit is contained in:
@ -593,7 +593,7 @@ func (h *Handler) handleProppatch(w http.ResponseWriter, r *http.Request) (statu
|
||||
}
|
||||
return http.StatusMethodNotAllowed, err
|
||||
}
|
||||
patches, status, err := readProppatch(r.Body)
|
||||
patches, status, err := ReadProppatch(r.Body)
|
||||
if err != nil {
|
||||
return status, err
|
||||
}
|
||||
|
@ -493,7 +493,7 @@ type propertyupdate struct {
|
||||
SetRemove []setRemove `xml:",any"`
|
||||
}
|
||||
|
||||
func readProppatch(r io.Reader) (patches []Proppatch, status int, err error) {
|
||||
func ReadProppatch(r io.Reader) (patches []Proppatch, status int, err error) {
|
||||
var pu propertyupdate
|
||||
if err = ixml.NewDecoder(r).Decode(&pu); err != nil {
|
||||
return nil, http.StatusBadRequest, err
|
||||
|
@ -705,7 +705,7 @@ func TestReadProppatch(t *testing.T) {
|
||||
}}
|
||||
|
||||
for _, tc := range testCases {
|
||||
pp, status, err := readProppatch(strings.NewReader(tc.input))
|
||||
pp, status, err := ReadProppatch(strings.NewReader(tc.input))
|
||||
if tc.wantStatus != 0 {
|
||||
if err == nil {
|
||||
t.Errorf("%s: got nil error, want non-nil", tc.desc)
|
||||
|
Reference in New Issue
Block a user