mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2024-11-05 14:07:01 +00:00
'%s' -> %q
This commit is contained in:
parent
ae610d301a
commit
81bc8fec08
2 changed files with 3 additions and 3 deletions
|
@ -28,7 +28,7 @@ func (p tmpDB) Put(name string, cert *certificate.Resource) error {
|
||||||
func (p tmpDB) Get(name string) (*certificate.Resource, error) {
|
func (p tmpDB) Get(name string) (*certificate.Resource, error) {
|
||||||
cert, has := p.intern.Get(name)
|
cert, has := p.intern.Get(name)
|
||||||
if !has {
|
if !has {
|
||||||
return nil, fmt.Errorf("cert for '%s' not found", name)
|
return nil, fmt.Errorf("cert for %q not found", name)
|
||||||
}
|
}
|
||||||
return cert.(*certificate.Resource), nil
|
return cert.(*certificate.Resource), nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,7 @@ func (client *Client) ServeRawContent(targetOwner, targetRepo, ref, resource str
|
||||||
if cache.Exists {
|
if cache.Exists {
|
||||||
if cache.IsSymlink {
|
if cache.IsSymlink {
|
||||||
linkDest := string(cache.Body)
|
linkDest := string(cache.Body)
|
||||||
log.Debug().Msgf("[cache] follow symlink from'%s' to '%s'", resource, linkDest)
|
log.Debug().Msgf("[cache] follow symlink from %q to %q", resource, linkDest)
|
||||||
return client.ServeRawContent(targetOwner, targetRepo, ref, linkDest)
|
return client.ServeRawContent(targetOwner, targetRepo, ref, linkDest)
|
||||||
} else {
|
} else {
|
||||||
log.Debug().Msg("[cache] return bytes")
|
log.Debug().Msg("[cache] return bytes")
|
||||||
|
@ -127,7 +127,7 @@ func (client *Client) ServeRawContent(targetOwner, targetRepo, ref, resource str
|
||||||
// first handle symlinks
|
// first handle symlinks
|
||||||
{
|
{
|
||||||
objType := resp.Header.Get(giteaObjectTypeHeader)
|
objType := resp.Header.Get(giteaObjectTypeHeader)
|
||||||
log.Trace().Msgf("server raw content object: %s", objType)
|
log.Trace().Msgf("server raw content object %q", objType)
|
||||||
if client.followSymlinks && objType == objTypeSymlink {
|
if client.followSymlinks && objType == objTypeSymlink {
|
||||||
// limit to 1000 chars
|
// limit to 1000 chars
|
||||||
defer reader.Close()
|
defer reader.Close()
|
||||||
|
|
Loading…
Reference in a new issue