Skip to content

Commit e46c9d6

Browse files
committed
Final
1 parent e82b016 commit e46c9d6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

check_pagespeed.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
except ImportError:
1414
from StringIO import StringIO as BytesIO
1515

16+
# Use a buffer just to discard it.
1617
buffer = BytesIO()
1718

1819
parser = argparse.ArgumentParser(description='Check Page Speed')
@@ -25,18 +26,20 @@
2526

2627
c = pycurl.Curl()
2728

29+
# Junk to allow testing on Windows. Don't use this on Windows.
2830
if os.name == 'nt':
2931
c.setopt(c.SSL_VERIFYPEER, False);
3032

3133
c.setopt(c.URL, args.url)
34+
#
3235
c.setopt(c.WRITEFUNCTION, buffer.write)
33-
3436
c.setopt(c.TIMEOUT, args.timeout)
3537
c.setopt(c.VERBOSE, False)
3638
c.setopt(c.HEADER, True);
3739
c.setopt(c.ENCODING, "gzip");
38-
c.setopt(c.FOLLOWLOCATION, False);
3940
c.setopt(c.USERAGENT, "Page Speed Checker v1.0");
41+
# TODO: Make this optional.
42+
c.setopt(c.FOLLOWLOCATION, False);
4043

4144
try:
4245
c.perform()

0 commit comments

Comments
 (0)