mirror of
https://github.com/markqvist/NomadNet.git
synced 2026-12-03 13:20:05 -05:00
Support pages served directly as file-based resources
Some checks are pending
Create and publish a Docker image / build-and-push-image (push) Waiting to run
Some checks are pending
Create and publish a Docker image / build-and-push-image (push) Waiting to run
This commit is contained in:
parent
8404ce521e
commit
098f6c76d1
1 changed files with 6 additions and 4 deletions
|
|
@ -1811,10 +1811,8 @@ class Browser:
|
|||
pass
|
||||
|
||||
def load_page(self):
|
||||
if self.request_data == None:
|
||||
cached = self.get_cached(self.current_url())
|
||||
else:
|
||||
cached = None
|
||||
if self.request_data == None: cached = self.get_cached(self.current_url())
|
||||
else: cached = None
|
||||
|
||||
if cached:
|
||||
self.status = Browser.DONE
|
||||
|
|
@ -2062,6 +2060,10 @@ class Browser:
|
|||
try:
|
||||
self.status = Browser.DONE
|
||||
self.page_data = request_receipt.response
|
||||
|
||||
if hasattr(self.page_data, "read"):
|
||||
self.page_data = self.page_data.read()
|
||||
|
||||
self.markup = self.page_data.decode("utf-8")
|
||||
|
||||
self.page_background_color = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue