Skip to content

Commit

Permalink
v0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
purplelemons-dev committed Jan 17, 2024
1 parent e11a462 commit 1a64333
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 8 deletions.
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ Dates are in YYYY/MM/DD format, time is in America/Chicago (CDT/CST), UTC-0500/-
## Pre-release (0.X.X)
2023/07/17-...

### v0.2.1 (2024/01/16 21:25)
Fixes:
* Really weird code that doesnt serve HTML files from `{ page_dir }` properly.
* The return of the mysterious AttributeError.

### v0.2.0 (2023/07/22 00:10)
Features:
* Async with `AsyncServer()` from `http_plus.asyncServer`.
Expand Down
Binary file not shown.
Binary file added dist/http_plus_purplelemons_dev-0.2.0.tar.gz
Binary file not shown.
Binary file not shown.
Binary file added dist/http_plus_purplelemons_dev-0.2.1.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "http_plus_purplelemons_dev"
version = "0.2.0"
version = "0.2.1"
authors = [
{name = "PurpleLemons", email = "[email protected]"}
]
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ hi welcome to http plus. It's a high-level, dynamic HTTP server for Python. Quic
high-performance ones.

## Version
Pre-release version 0.2.0
Pre-release version 0.2.1

(go check the [changelog](./changelog.md) for more info on versions plz i worked hard on it thx)

Expand Down
6 changes: 3 additions & 3 deletions src/http_plus_purplelemons_dev.egg-info/PKG-INFO
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: http-plus-purplelemons-dev
Version: 0.1.3
Name: http_plus_purplelemons_dev
Version: 0.2.1
Summary: A high-level, dynamic HTTP server for Python. Quickly deploy simple servers, or customize complex, high-performance ones.
Author-email: PurpleLemons <[email protected]>
License: GLPv3
Expand All @@ -27,7 +27,7 @@ hi welcome to http plus. It's a high-level, dynamic HTTP server for Python. Quic
high-performance ones.

## Version
Pre-release version 0.1.3
Pre-release version 0.2.1

(go check the [changelog](./changelog.md) for more info on versions plz i worked hard on it thx)

Expand Down
1 change: 1 addition & 0 deletions src/http_plus_purplelemons_dev.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ LICENSE
pyproject.toml
readme.md
src/http_plus_purplelemons_dev/__init__.py
src/http_plus_purplelemons_dev/asyncServer.py
src/http_plus_purplelemons_dev/auth.py
src/http_plus_purplelemons_dev/communications.py
src/http_plus_purplelemons_dev/content_types.py
Expand Down
2 changes: 1 addition & 1 deletion src/http_plus_purplelemons_dev/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
You can customize error pages by creating a folder in `./errors` with the name of the error code.
"""

__version__ = "0.2.0"
__version__ = "0.2.1"
NAME = "http_plus_purplelemons_dev"

from http.server import HTTPServer, ThreadingHTTPServer
Expand Down
11 changes: 9 additions & 2 deletions src/http_plus_purplelemons_dev/communications.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,13 @@ def method(self: "Handler"):
# otherwise, assume html
extension = "html"

if extension == "html" and self.brython:
if extension == "html" and not os.path.exists(f"{self.page_dir}{path}.py"):
filename = self.serve_filename(path, extension)
if filename is not None:
self.respond_file(200, filename)
return

elif extension == "html" and self.brython:
# check if python script in directory
py_files = []
for file in os.listdir(f"{self.page_dir}{path}"):
Expand Down Expand Up @@ -606,7 +612,8 @@ def get_auth(self, default=None) -> "str|None":
try:
return self.headers["Authorization"].split(" ", 1)
except (
KeyError
KeyError,
AttributeError,
): # note on commit 77290f6: i have no idea why the fuck it was AttributeError and furthermore have less of a clue as to why it was working fine
return default

Expand Down

0 comments on commit 1a64333

Please sign in to comment.