Skip to content

Commit

Permalink
fixed pedosb#5, implemented pedosb#8
Browse files Browse the repository at this point in the history
  • Loading branch information
itelo committed Apr 30, 2015
1 parent f4933d3 commit 75c6848
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion webnote.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

s.bind(('0.0.0.0', 8080))
s.listen(1)

while True:
data = ''
conn, addr = s.accept()
Expand Down Expand Up @@ -56,7 +57,7 @@
note_dict = json.loads(note_file.read())
except IOError:
note_dict = dict()

if resource == '/notes':
response += 'Content-Type: text/plain; charset=utf-8\r\n'
response += '\r\n'
Expand Down Expand Up @@ -101,6 +102,7 @@
response += note_dict[note_match.group(1)]
else:
response += 'Hello World!!!'


conn.sendall(response)

Expand Down

0 comments on commit 75c6848

Please sign in to comment.