Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ type Configuration struct {
WeightDistributionRange float32 `yaml:"WeightDistributionRange"`
DisableOnMissingFile bool `yaml:"DisableOnMissingFile"`
AllowOutdatedFiles []OutdatedFilesConfig `yaml:"AllowOutdatedFiles"`
Fallbacks []fallback `yaml:"Fallbacks"`
Fallbacks []Fallback `yaml:"Fallbacks"`

RedisSentinelMasterName string `yaml:"RedisSentinelMasterName"`
RedisSentinels []sentinels `yaml:"RedisSentinels"`
Expand All @@ -100,7 +100,7 @@ type Configuration struct {
RPCPassword string `yaml:"RPCPassword"`
}

type fallback struct {
type Fallback struct {
URL string `yaml:"URL"`
CountryCode string `yaml:"CountryCode"`
ContinentCode string `yaml:"ContinentCode"`
Expand Down
7 changes: 3 additions & 4 deletions http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,11 @@ func (h *HTTP) mirrorHandler(w http.ResponseWriter, r *http.Request, ctx *Contex
return
}

// Get details about the requested file
// Get details about the requested file. Errors are not fatal, and
// expected when the database is not ready: fallbacks will handle it.
fileInfo, err := h.cache.GetFileInfo(urlPath)
if err != nil {
log.Errorf("Error while fetching Fileinfo: %s", err.Error())
http.Error(w, err.Error(), http.StatusInternalServerError)
return
//log.Debugf("Error while fetching Fileinfo: %s", err.Error())
}

if checkIfModifiedSince(r, fileInfo.ModTime) == condFalse {
Expand Down
Loading