mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-25 14:26:58 +00:00
Merge branch 'std-http' into refactor_split-long-funcs
This commit is contained in:
commit
3d9ffcf8d7
9 changed files with 73 additions and 72 deletions
|
@ -20,7 +20,7 @@ func GetBranchTimestamp(giteaClient *gitea.Client, owner, repo, branch string) *
|
|||
log.Err(err).Msg("Could't fetch default branch from repository")
|
||||
return nil
|
||||
}
|
||||
log.Debug().Msgf("Succesfully fetched default branch '%s' from Gitea", defaultBranch)
|
||||
log.Debug().Msgf("Succesfully fetched default branch %q from Gitea", defaultBranch)
|
||||
branch = defaultBranch
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ func (o *Options) Upstream(ctx *context.Context, giteaClient *gitea.Client) (fin
|
|||
|
||||
if branch == nil || branch.Branch == "" {
|
||||
html.ReturnErrorPage(ctx,
|
||||
fmt.Sprintf("could not get timestamp of branch '%s'", o.TargetBranch),
|
||||
fmt.Sprintf("could not get timestamp of branch %q", o.TargetBranch),
|
||||
http.StatusFailedDependency)
|
||||
return true
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ func (o *Options) Upstream(ctx *context.Context, giteaClient *gitea.Client) (fin
|
|||
if reader != nil {
|
||||
_, err := io.Copy(ctx.RespWriter, reader)
|
||||
if err != nil {
|
||||
log.Printf("Couldn't write body: %s\n", err)
|
||||
log.Error().Err(err).Msgf("Couldn't write body for %q", o.TargetPath)
|
||||
html.ReturnErrorPage(ctx, "", http.StatusInternalServerError)
|
||||
return true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue