Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4c20766

Browse files
Ajout de la gestion du type de requete dans les handlers static / 404 / 500
1 parent 6464ca5 commit 4c20766

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎extended_BaseHTTPServer.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def do_routing(s, o, arguments, action):
5151
# Fichier static ?
5252
try:
5353
if "static" in handler_method:
54-
retour = handler_method['static'](o, arguments)
54+
retour = handler_method['static'](o, arguments, action)
5555
build_response(s, retour, 200)
5656
else:
5757
with open(os.path.join("."+o.path)) as f:
@@ -65,14 +65,14 @@ def do_routing(s, o, arguments, action):
6565
if "404" not in handler_method:
6666
build_response(s, "404 - Not Found", 404)
6767
else:
68-
retour = handler_method['404'](o, arguments)
68+
retour = handler_method['404'](o, arguments, action)
6969
build_response(s, retour, 404)
7070
except:
7171
# Gestion des erreurs
7272
if "500" not in handler_method:
7373
build_response(s, "Internal Server Error", 500)
7474
else:
75-
retour = handler_method['500'](o, arguments)
75+
retour = handler_method['500'](o, arguments, action)
7676
build_response(s, retour, 500)
7777

7878

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /