mirror of
https://github.com/markqvist/NomadNet.git
synced 2026-10-26 02:48:48 -04:00
Handle invalid page cache time headers
This commit is contained in:
parent
b6d2ebbfc7
commit
8d6cf7bc54
1 changed files with 6 additions and 4 deletions
|
|
@ -1513,10 +1513,12 @@ class Browser:
|
|||
# header tags are added.
|
||||
cache_time = Browser.DEFAULT_CACHE_TIME
|
||||
if self.markup[:4] == "#!c=":
|
||||
endpos = self.markup.find("\n")
|
||||
if endpos == -1:
|
||||
endpos = len(self.markup)
|
||||
cache_time = int(self.markup[4:endpos])
|
||||
try:
|
||||
endpos = self.markup.find("\n")
|
||||
if endpos == -1:
|
||||
endpos = len(self.markup)
|
||||
cache_time = int(self.markup[4:endpos])
|
||||
except Exception as e: RNS.log(f"Invalid page cache time header: {e}", RNS.LOG_DEBUG)
|
||||
|
||||
self.update_display()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue