mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-19 11:36:57 +00:00
fixes
This commit is contained in:
parent
81bdbaf261
commit
92c88cff03
3 changed files with 1 additions and 7 deletions
|
@ -130,10 +130,8 @@ func (client *Client) ServeRawContent(targetOwner, targetRepo, ref, resource str
|
|||
return nil, nil, http.StatusInternalServerError, ErrorNotFound
|
||||
}
|
||||
cache.Body = body.([]byte)
|
||||
// TODO: don't grab the content from the cache if the ETag matches?!
|
||||
|
||||
cachedHeader, cachedStatusCode := cache.createHttpResponse(cacheKey)
|
||||
// TODO: check against some timestamp mismatch?!?
|
||||
if cache.Exists {
|
||||
if cache.IsSymlink {
|
||||
linkDest := string(cache.Body)
|
||||
|
@ -147,7 +145,6 @@ func (client *Client) ServeRawContent(targetOwner, targetRepo, ref, resource str
|
|||
return nil, nil, http.StatusNotFound, ErrorNotFound
|
||||
}
|
||||
}
|
||||
// TODO: metadata not written, is close ever called?
|
||||
log.Trace().Msg("file not in cache")
|
||||
// not in cache, open reader via gitea api
|
||||
reader, resp, err := client.sdkClient.GetFileReader(targetOwner, targetRepo, ref, resource, client.supportLFS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue