2
我收到以下警告:GAE的urlfetch不能與端口10312一起使用?
WARNING 2011-09-21 20:25:32,259 urlfetch_stub.py] urlfetch received https://z_c
l.zzzz.me:10312/zzzz/Data/0 ; port 10312 is not allowed in production!
反正是有使用該端口的生產?
我收到以下警告:GAE的urlfetch不能與端口10312一起使用?
WARNING 2011-09-21 20:25:32,259 urlfetch_stub.py] urlfetch received https://z_c
l.zzzz.me:10312/zzzz/Data/0 ; port 10312 is not allowed in production!
反正是有使用該端口的生產?
更新您的SDK版本!
由於2010年3月(SDK 1.3.2),GAE已經允許更寬範圍的端口:80-90,440-450,1024-65535。
他們交換了來自:
PORTS_ALLOWED_IN_PRODUCTION = (
None, '80', '443', '4443', '8080', '8081', '8082', '8083', '8084', '8085',
'8086', '8087', '8088', '8089', '8188', '8444', '8990')
if port not in PORTS_ALLOWED_IN_PRODUCTION:
logging.warning(
'urlfetch received %s ; port %s is not allowed in production!' %
(url, port))
到:
def _IsAllowedPort(port):
if port is None:
return True
try:
port = int(port)
except ValueError, e:
return False
if ((port >= 80 and port <= 90) or
(port >= 440 and port <= 450) or
port >= 1024):
return True
return False
if not _IsAllowedPort(port):
logging.warning(
'urlfetch received %s ; port %s is not allowed in production!' %
(url, port))