且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在python中的BaseHTTPServer中获取请求的文件名?

更新时间:2021-11-25 15:22:44

当我运行您的代码时,它看起来运行良好.

When I run your codes, it looks work well.

当我输入localhost:8080/test.html时,服务器已打印

When I entered localhost:8080/test.html, server printed

127.0.0.1--[2014年11月28日16:55:36]"GET/ test.html HTTP/1.1" 200-

127.0.0.1 - - [28/Nov/2014 16:55:36] "GET /test.html HTTP/1.1" 200 -

这不是你想要的吗?