mirror of
https://github.com/openziti/zrok.git
synced 2025-06-22 10:41:40 +02: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 (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
@ -288,10 +287,6 @@ func (h *Handler) handlePut(w http.ResponseWriter, r *http.Request) (status int,
|
|||||||
return http.StatusInternalServerError, err
|
return http.StatusInternalServerError, err
|
||||||
}
|
}
|
||||||
w.Header().Set("ETag", etag)
|
w.Header().Set("ETag", etag)
|
||||||
ts := r.Header.Get("zrok-timestamp")
|
|
||||||
if ts != "" {
|
|
||||||
logrus.Infof("zrok-timestamp = %v", ts)
|
|
||||||
}
|
|
||||||
return http.StatusCreated, nil
|
return http.StatusCreated, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"github.com/openziti/zrok/util/sync/webdavClient"
|
"github.com/openziti/zrok/util/sync/webdavClient"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"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 {
|
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)
|
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>" +
|
"<propertyupdate xmlns=\"DAV:\" xmlns:z=\"zrok:\"><set><prop><z:lastmodified>" +
|
||||||
fmt.Sprintf("%d", modtimeUnix) +
|
fmt.Sprintf("%d", modtimeUnix) +
|
||||||
"</z:lastmodified></prop></set></propertyupdate>"
|
"</z:lastmodified></prop></set></propertyupdate>"
|
||||||
logrus.Infof("sending '%v'", body)
|
|
||||||
if err := t.c.Proppatch(path, body, nil, nil); err != nil {
|
if err := t.c.Proppatch(path, body, nil, nil); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user