Diff
Differences From Artifact [eff6de2cac]:
- File ahttp.py — part of check-in [6fab0e7170] at 2015-04-03 20:43:42 on branch trunk — Made channel tabs reorderable. Now kept in config/window.json as `tab_order` and current page saved as `tab_current` instead of pageno. Disabled progressbar changes for ahttp, made search_server search run in a thread so status can be shown. (user: mario, size: 2725) [annotate] [blame] [check-ins using]
To Artifact [46b2bffbda]:
- File ahttp.py — part of check-in [9d6c4e81f8] at 2015-04-04 01:48:31 on branch trunk — Catch HTTP errors for reload_categories(). Provide a descriptive .placeholder[] and .empty_stub[] stream list for channels reloading. (user: mario, size: 2801) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# combine headers
headers = {}
if ajax:
headers["X-Requested-With"] = "XMLHttpRequest"
if referer:
headers["Referer"] = (referer if referer else url)
# read
if post:
r = session.post(url, params=params, headers=headers, timeout=7.5)
else:
r = session.get(url, params=params, headers=headers, timeout=9.75)
| > > > > | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# combine headers
headers = {}
if ajax:
headers["X-Requested-With"] = "XMLHttpRequest"
if referer:
headers["Referer"] = (referer if referer else url)
#ifdef BLD_DEBUG
#srcout raise Exception("Simulated HTTP error")
#endif
# read
if post:
r = session.post(url, params=params, headers=headers, timeout=7.5)
else:
r = session.get(url, params=params, headers=headers, timeout=9.75)
|
| ︙ | ︙ |