File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -363,13 +363,19 @@ def default(self):
363363
364364 if stype is None and self .app .pargs .proxy :
365365 stype , cache = 'proxy' , ''
366- proxyinfo = self .app .pargs .proxy [0 ].split (':' )
367- host = proxyinfo [0 ]
368- port = '80' if len (proxyinfo ) < 2 else proxyinfo [1 ]
366+ proxyinfo = self .app .pargs .proxy [0 ].strip ()
367+ if not proxyinfo :
368+ Log .error (self , "Please provide proxy server host information" )
369+ proxyinfo = proxyinfo .split (':' )
370+ host = proxyinfo [0 ].strip ()
371+ port = '80' if len (proxyinfo ) < 2 else proxyinfo [1 ].strip ()
369372 elif stype is None and not self .app .pargs .proxy :
370373 stype , cache = 'html' , 'basic'
371374 elif stype and self .app .pargs .proxy :
372- Log .error ("proxy should not be used with other site types" )
375+ Log .error (self , "proxy should not be used with other site types" )
376+ if (self .app .pargs .proxy and (self .app .pargs .pagespeed
377+ or self .app .pargs .hhvm )):
378+ Log .error (self , "Proxy site can not run on pagespeed or hhvm" )
373379
374380 if not self .app .pargs .site_name :
375381 try :
You can’t perform that action at this time.
0 commit comments