Ticket #679 (closed defect: fixed)
[patch] slave: Make URL parsing more robust
| Reported by: | anatoly techtonik <techtonik@…> | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 0.6.1 |
| Component: | Build slave | Version: | 0.6 |
| Keywords: | patch easy | Cc: | |
| Operating System: | BSD |
Description
Currently, if you've mistaken build and supply invalid http://bitten.edgewall.org/build URL, bitten-slave will timeout instead of failing.
>>> url = 'http://bitten.edgewall.org/build' >>> url[:-7] 'http://bitten.edgewall.or' >>> url.rsplit('/', 1)[0] 'http://bitten.edgewall.org' >>>
The patch fixes this behaviour:
-
bitten/slave.py
306 306 try: 307 307 try: 308 308 if self.username and not self.auth_map.get(url): 309 login_url = '%s/login?referer=%s' % ( url[:-7],310 urllib.quote_plus(url))309 login_url = '%s/login?referer=%s' % ( 310 url.rsplit('/', 1)[0], urllib.quote_plus(url)) 311 311 # First request to url, authentication needed 312 312 if self.form_auth: 313 313 log.debug('Performing http form authentication')
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

