remove timestamp header experiment (#438)

This commit is contained in:
Michael Quigley 2023-12-01 13:56:22 -05:00
parent ba3d1b5032
commit 31dc90afda
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
2 changed files with 0 additions and 8 deletions

View File

@ -8,7 +8,6 @@ package webdav // import "golang.org/x/net/webdav"
import (
"errors"
"fmt"
"github.com/sirupsen/logrus"
"io"
"net/http"
"net/url"
@ -288,10 +287,6 @@ func (h *Handler) handlePut(w http.ResponseWriter, r *http.Request) (status int,
return http.StatusInternalServerError, err
}
w.Header().Set("ETag", etag)
ts := r.Header.Get("zrok-timestamp")
if ts != "" {
logrus.Infof("zrok-timestamp = %v", ts)
}
return http.StatusCreated, nil
}

View File

@ -4,7 +4,6 @@ import (
"fmt"
"github.com/openziti/zrok/util/sync/webdavClient"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"io"
"os"
"path/filepath"
@ -68,7 +67,6 @@ func (t *WebDAVTarget) ReadStream(path string) (io.ReadCloser, error) {
}
func (t *WebDAVTarget) WriteStream(path string, stream io.Reader, mode os.FileMode) error {
t.c.SetHeader("zrok-timestamp", fmt.Sprintf("%d", time.Now().UnixNano()))
return t.c.WriteStream(path, stream, mode)
}
@ -78,7 +76,6 @@ func (t *WebDAVTarget) SetModificationTime(path string, mtime time.Time) error {
"<propertyupdate xmlns=\"DAV:\" xmlns:z=\"zrok:\"><set><prop><z:lastmodified>" +
fmt.Sprintf("%d", modtimeUnix) +
"</z:lastmodified></prop></set></propertyupdate>"
logrus.Infof("sending '%v'", body)
if err := t.c.Proppatch(path, body, nil, nil); err != nil {
return err
}