mirror of
https://github.com/openziti/zrok.git
synced 2024-11-22 08:03:49 +01:00
remove timestamp header experiment (#438)
This commit is contained in:
parent
ba3d1b5032
commit
31dc90afda
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user