RPCServerHandler.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:py_web_gui 作者: ilebedev 项目源码 文件源码
def do_GET(self):
    path = self.path.lstrip('/').split('?')[0]
    print("GET: ", path)
    # is the file in the redirects table?
    if path in self.redirects:
      path_to = self.redirects[path]
      print("REDIRECT TO ", path_to)
      self.send_response(301)
      self.send_header('location', path_to)
      self.end_headers()
      return True
    else:
      # serve the file!
      self.path = path
      return SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号