fix to support multiple headers and check input type
fix to support multiple headers and check input type

guidow/pyfarm-agent,guidow/pyfarm-agent,pyfarm/pyfarm-agent,pyfarm/pyfarm-agent,pyfarm/pyfarm-agent,guidow/pyfarm-agent