1.当我通过需要接受get或post参数交给python脚本处理的时候。
如果发送的是中文数据
比如 "http://localhost:8081/myapp?key=内容"
就会发生500错误。
2.如果发送英文数据,如
"http://localhost:8081/myapp?key=value"
则没这个问题,可以通过以下方式输出。
class myHandler(webapp.RequestHandler)
def get(self):
print self.request.get('key')
但是输出内容为:
value
Status: 200 OK
Content-Type: text/html; charset=utf-8
Cache-Control: no-cache
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Content-Length: 0
这种格式。
我不需要后面的状态信息,该怎么办呢?
谢谢大家!
如果发送的是中文数据
比如 "http://localhost:8081/myapp?key=内容"
就会发生500错误。
2.如果发送英文数据,如
"http://localhost:8081/myapp?key=value"
则没这个问题,可以通过以下方式输出。
class myHandler(webapp.RequestHandler)
def get(self):
print self.request.get('key')
但是输出内容为:
value
Status: 200 OK
Content-Type: text/html; charset=utf-8
Cache-Control: no-cache
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Content-Length: 0
这种格式。
我不需要后面的状态信息,该怎么办呢?
谢谢大家!
