mirror of
https://github.com/lammertb/libhttp.git
synced 2025-08-22 08:12:46 +03:00
Added mg_send_file() to python binding
This commit is contained in:
@@ -39,6 +39,9 @@ def EventHandler(event, conn, info):
|
||||
'<input type="submit"/>'
|
||||
'</form>')
|
||||
return True
|
||||
elif event == mongoose.NEW_REQUEST and info.uri == '/secret':
|
||||
conn.send_file('/etc/passwd')
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
|
Reference in New Issue
Block a user