1
0
mirror of https://github.com/makew0rld/amfora.git synced 2024-12-04 14:46:29 -05:00

Disable cache for redirects - fixes #114

This commit is contained in:
makeworld 2020-11-04 21:11:33 -05:00
parent 277cc91881
commit b05885e710
2 changed files with 9 additions and 5 deletions

View File

@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- The web browser code doesn't check for Xorg anymore, just display variables (#93) - The web browser code doesn't check for Xorg anymore, just display variables (#93)
- Bookmarks can be made to non-gemini URLs (#94) - Bookmarks can be made to non-gemini URLs (#94)
- Remove pointless directory fallbacks (#101) - Remove pointless directory fallbacks (#101)
- Don't load page from cache when redirected to it (#114)
### Fixed ### Fixed
- XDG user dir file is parsed instead of looking for XDG env vars (#97, #100) - XDG user dir file is parsed instead of looking for XDG env vars (#97, #100)

View File

@ -383,11 +383,14 @@ func handleURL(t *tab, u string, numRedirects int) (string, bool) {
// Gemini URL, or one with a Gemini proxy available // Gemini URL, or one with a Gemini proxy available
// Load page from cache if possible // Load page from cache if it exists,
page, ok := cache.GetPage(u) // and this isn't a page that was redirected to by the server (indicates dynamic content)
if ok { if numRedirects == 0 {
setPage(t, page) page, ok := cache.GetPage(u)
return ret(u, true) if ok {
setPage(t, page)
return ret(u, true)
}
} }
// Otherwise download it // Otherwise download it
bottomBar.SetText("Loading...") bottomBar.SetText("Loading...")