We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Python Version: Python 3.7.5 O.S : Ubuntu 18.04.5
I'm not using vagrant setup. Any help appreciated.
Error :
Error response Error code: 404 Message: File not found.
Error code explanation: HTTPStatus.NOT_FOUND - Nothing matches the given URI.
Webserver file code:
`from http.server import BaseHTTPRequestHandler,SimpleHTTPRequestHandler, HTTPServer class webhandler(SimpleHTTPRequestHandler): def do_Get(self): try: if self.path.endswith('/hello'): self.send_response(200) self.send_header('Content-type','text/html') self.end_headers() output = '' output +=f"<html><body>Hello!</body></html>" self.wfile.write(bytes(output,"utf8")) return except IOError: self.send_error(404,"File not found %s" % self.path) def main(): try: port = 8080 server = HTTPServer(("",port),webhandler) print("Web server running on port %s" % port) server.serve_forever() except KeyboardInterrupt: print("^c entered Stopping webserver...") server.socket.close() if __name__=='__main__': main()`
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Python Version: Python 3.7.5
O.S : Ubuntu 18.04.5
I'm not using vagrant setup. Any help appreciated.
Error :
Error response
Error code: 404
Message: File not found.
Error code explanation: HTTPStatus.NOT_FOUND - Nothing matches the given URI.
Webserver file code:
The text was updated successfully, but these errors were encountered: