mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2024-11-05 14:07:01 +00:00
more debug log
This commit is contained in:
parent
3ccaa17707
commit
7a7cbac171
1 changed files with 4 additions and 1 deletions
|
@ -7,6 +7,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/valyala/fasthttp"
|
||||
"github.com/valyala/fastjson"
|
||||
)
|
||||
|
@ -79,7 +80,9 @@ func (client *Client) ServeRawContent(targetOwner, targetRepo, ref, resource str
|
|||
switch resp.StatusCode() {
|
||||
case fasthttp.StatusOK:
|
||||
if client.followSymlinks && string(resp.Header.Peek(giteaObjectTypeHeader)) == "symlink" {
|
||||
return client.ServeRawContent(targetOwner, targetRepo, ref, strings.TrimSpace(string(resp.Body())))
|
||||
linkDest := strings.TrimSpace(string(resp.Body()))
|
||||
log.Debug().Msgf("follow symlink from '%s' to '%s'", resource, linkDest)
|
||||
return client.ServeRawContent(targetOwner, targetRepo, ref, linkDest)
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
|
|
Loading…
Reference in a new issue