mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 01:43:47 +00:00
swarm/api: Rename X-Encrypted response header to X-Decrypted
This commit is contained in:
parent
a0ae2a37dd
commit
a565e892f4
2 changed files with 3 additions and 3 deletions
|
|
@ -94,7 +94,7 @@ func (c *Client) DownloadRaw(hash string) (io.ReadCloser, bool, error) {
|
|||
res.Body.Close()
|
||||
return nil, false, fmt.Errorf("unexpected HTTP status: %s", res.Status)
|
||||
}
|
||||
isEncrypted := (res.Header.Get("X-Encrypted") == "true")
|
||||
isEncrypted := (res.Header.Get("X-Decrypted") == "true")
|
||||
return res.Body, isEncrypted, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -563,7 +563,7 @@ func (s *Server) HandleGet(w http.ResponseWriter, r *Request) {
|
|||
return
|
||||
}
|
||||
|
||||
w.Header().Set("X-Encrypted", fmt.Sprintf("%v", isEncrypted))
|
||||
w.Header().Set("X-Decrypted", fmt.Sprintf("%v", isEncrypted))
|
||||
|
||||
switch {
|
||||
case r.uri.Raw() || r.uri.DeprecatedRaw():
|
||||
|
|
@ -626,7 +626,7 @@ func (s *Server) HandleGetFiles(w http.ResponseWriter, r *Request) {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
w.Header().Set("X-Encrypted", fmt.Sprintf("%v", isEncrypted))
|
||||
w.Header().Set("X-Decrypted", fmt.Sprintf("%v", isEncrypted))
|
||||
|
||||
// write a tar header for the entry
|
||||
hdr := &tar.Header{
|
||||
|
|
|
|||
Loading…
Reference in a new issue