File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1313except ImportError :
1414 from StringIO import StringIO as BytesIO
1515
16+ # Use a buffer just to discard it.
1617buffer = BytesIO ()
1718
1819parser = argparse .ArgumentParser (description = 'Check Page Speed' )
2526
2627c = pycurl .Curl ()
2728
29+ # Junk to allow testing on Windows. Don't use this on Windows.
2830if os .name == 'nt' :
2931 c .setopt (c .SSL_VERIFYPEER , False );
3032
3133c .setopt (c .URL , args .url )
34+ #
3235c .setopt (c .WRITEFUNCTION , buffer .write )
33-
3436c .setopt (c .TIMEOUT , args .timeout )
3537c .setopt (c .VERBOSE , False )
3638c .setopt (c .HEADER , True );
3739c .setopt (c .ENCODING , "gzip" );
38- c .setopt (c .FOLLOWLOCATION , False );
3940c .setopt (c .USERAGENT , "Page Speed Checker v1.0" );
41+ # TODO: Make this optional.
42+ c .setopt (c .FOLLOWLOCATION , False );
4043
4144try :
4245 c .perform ()
You can’t perform that action at this time.
0 commit comments