mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-22 20:01:49 +00:00
Added mg_send_file() to python binding
This commit is contained in:
1 parent
29a38875ff
commit
81a5e3f342
2 files changed
+6
No files matched your search
@@ -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