Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
2c76027e
Commit
2c76027e
authored
May 30, 2011
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove examples/httpserver.py
parent
1e03e4b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
20 deletions
+0
-20
examples/httpserver.py
examples/httpserver.py
+0
-20
No files found.
examples/httpserver.py
deleted
100755 → 0
View file @
1e03e4b1
#!/usr/bin/python
"""HTTP server example.
Uses libevent API directly and thus may be dangerous.
WSGI interface is a safer choice, see examples/wsgiserver.py.
"""
from
gevent
import
http
def
callback
(
request
):
print
request
if
request
.
uri
==
'/'
:
request
.
add_output_header
(
'Content-Type'
,
'text/html'
)
request
.
send_reply
(
200
,
"OK"
,
'<b>hello world</b>'
)
else
:
request
.
add_output_header
(
'Content-Type'
,
'text/html'
)
request
.
send_reply
(
404
,
"Not Found"
,
"<h1>Not Found</h1>"
)
print
'Serving on 8088...'
http
.
HTTPServer
((
'0.0.0.0'
,
8088
),
callback
).
serve_forever
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment