Skip to content

Commit

Permalink
Add support of http header "HEAD" for PyhtmlTemplate module
Browse files Browse the repository at this point in the history
  • Loading branch information
jczic committed Nov 25, 2019
1 parent 1b36b34 commit aaecf5d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion MicroWebSrv2/mods/PyhtmlTemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ def __init__(self) :
# ------------------------------------------------------------------------

def OnRequest(self, microWebSrv2, request) :
if request.Method == 'GET' and request.Path.lower().endswith('.pyhtml') :
if (request.Method == 'GET' or request.Method == 'HEAD') and \
request.Path.lower().endswith('.pyhtml') :
filepath = microWebSrv2.ResolvePhysicalPath(request.Path)
if filepath :
try :
Expand Down

0 comments on commit aaecf5d

Please sign in to comment.