def sendall(self, content, *args):
        if not self.__httptunnel:
            content = self.__rewriteproxy(content)
        return super(socksocket, self).sendall(content, *args)
override socket.socket.sendall method to rewrite the header
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/httplib2/httplib2/socks.py/socksocket.sendall