有段时间发现swift的proxy日志莫名其妙的记录了以下错误:
[2013-09-25 17:35:10,222] ERROR WSGI: code 400, message Bad request syntax (‘\x00\x00\x00\x00\x00\x00\x00%\x00\x00\x00\x06user01\x00\x00\x00\x17nmon_x86_rhel2 - \xe5\x89\xaf\xe6\x9c\xac\x00\x00\x00\x00\x00\x00\x00\x00PUT /v1.0/BB303D46698A4817A8BD42164F95D59D/obj/44EEA9E18EFE47D78FEF8DA1F8620F17-1B1AAA7606D04610A8BCE7D282CE07CB
HTTP/1.1‘) (txn: tx26d387087fe0400bb254d629db558f83) (client_ip: 127.0.0.1)
Sep 28 11:25:09 localhost proxy ERROR WSGI: code 400, message Bad request version (‘\x00\xff\x009\x008\x005\x003\x002\ x00\x04\x00/\xfe\xff\x00‘)
在swift的源码中搜了一下“ERROR WSGI:“关键字,只有在swift/common/wsgi.py中的def run_server(conf, logger, sock):函数里有:
...
Line: 209 # Redirect logging other messages by the underlying WSGI software.
Line: 210 wsgi.HttpProtocol.log_message = \
Line: 211 lambda s, f, *a: logger.error(‘ERROR WSGI: ‘ + f % a)
...
Swift Proxy日志错误:ERROR WSGI: code 400, message Bad request syntax
原文:http://blog.csdn.net/cywosp/article/details/19819039