Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webserver.py not working. #129

Open
aditiabhang opened this issue Mar 17, 2020 · 2 comments
Open

webserver.py not working. #129

aditiabhang opened this issue Mar 17, 2020 · 2 comments

Comments

@aditiabhang
Copy link

Used 8000 localhost.
Screen Shot 2020-03-17 at 11 11 36 AMScreen Shot 2020-03-17 at 11 11 42 AM

Vagrant is up and running.
Screen Shot 2020-03-17 at 11 14 26 AM

CLI:
Screen Shot 2020-03-17 at 11 11 52 AM

And yet webserver.py is not working.
Please help. Am I missing here something?

@momongah
Copy link

In do_GET method inside wfile.write you have to do message.encode() because it needs to be in bytes.

output += "<html><body>Hello World!</body></html>"
self.wfile.write(output.encode())

@navinkumar0118
Copy link

Aslo close the vagrant machine and try.. it will work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants