结合python的simplehttpserver源码来解析socket通信