Skip to content

Commit

Permalink
Merge branch 'ssl-help-40'
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Zorn committed Sep 27, 2013
2 parents 7e5af4c + 3069e6e commit 0a1b277
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 22 deletions.
1 change: 0 additions & 1 deletion punjab/httpb.py
Expand Up @@ -441,7 +441,6 @@ def return_session(self, data, session, request):
b['secure'] = 'true'

b['inactivity'] = str(session.inactivity)
##b['polling'] = '15' # TODO: make this configurable
b['polling'] = str(self.polling)
b['requests'] = str(session.hold + 1)
b['window'] = str(session.window)
Expand Down
15 changes: 3 additions & 12 deletions tests/test_basic.py
Expand Up @@ -140,7 +140,6 @@ def connect(self, b):
d.addCallback(self._storeSID)
return d



def _error(self, e):
# self.fail(e)
Expand All @@ -154,21 +153,14 @@ def _cleanPending(self):
p.cancel()

def _cleanSelectables(self):
removedSelectables = reactor.removeAll()
# Below is commented out to remind us how to see what selectable is sticking around
#if removedSelectables:
# for sel in removedSelectables:
# # del sel
# print sel.__class__
# print dir(sel)

reactor.removeAll()

def tearDown(self):
def cbStopListening(result=None):

self.root = None
self.site = None
self.proxy.factory.stopFactory()
self.server_factory.stopFactory()
self.server_factory.stopFactory()
self.server = None
self._cleanPending()
self._cleanSelectables()
Expand All @@ -184,7 +176,6 @@ def cbStopListening(result=None):
if hasattr(self.proxy.factory,'client'):
self.proxy.factory.client.transport.stopConnecting()
self.server_factory.protocol.delay_features = 0


d = defer.maybeDeferred(self.server.stopListening)
d.addCallback(cbStopListening)
Expand Down
18 changes: 9 additions & 9 deletions twisted/plugins/punjab_plugin.py
Expand Up @@ -10,14 +10,14 @@

class Options(usage.Options):
optParameters = [
('host', None, 'localhost'),
('port', None, 5280),
('httpb', 'b', "http-bind"),
('polling', None, '15'),
('html_dir', None, "./html"),
('ssl', None, None),
('ssl_privkey', None, "ssl.key"),
('ssl_cert', None, "ssl.crt"),
('host', None, 'localhost', "The hostname sent in the HTTP header of BOSH requests"),
('port', None, 5280, "HTTP Port for BOSH connections"),
('httpb', 'b', "http-bind", "URL path for BOSH resource."),
('polling', None, '15', "Seconds allowed between client polling requests"),
('html_dir', None, "./html", "The path were static html files are served."),
('ssl', None, None, "A flag to turn on ssl for BOSH requests"),
('ssl_privkey', None, "ssl.key", "SSL private key location"),
('ssl_cert', None, "ssl.crt", "SSL certificate location"),
('white_list', None, None,
'Comma separated list of domains to allow connections to. \
Begin an entry with a period to allow connections to subdomains. \
Expand All @@ -29,7 +29,7 @@ class Options(usage.Options):
]

optFlags = [
('verbose', 'v', 'Show traffic'),
('verbose', 'v', 'Show traffic and verbose logging.'),
]

class ServiceFactory(object):
Expand Down

0 comments on commit 0a1b277

Please sign in to comment.