more logging ...

This commit is contained in:
6543 2022-08-12 05:36:24 +02:00
parent b9ac62bdae
commit 672df11466
No known key found for this signature in database
GPG key ID: C99B82E40B027BAE
2 changed files with 5 additions and 1 deletions

View file

@ -86,7 +86,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" {
objType := string(resp.Header.Peek(giteaObjectTypeHeader))
log.Trace().Msgf("server raw content object: %s", objType)
if client.followSymlinks && objType == "symlink" {
linkDest := strings.TrimSpace(string(resp.Body()))
log.Debug().Msgf("follow symlink from '%s' to '%s'", resource, linkDest)
return client.ServeRawContent(targetOwner, targetRepo, ref, linkDest)