Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Clean up: Trims trailing spaces.

git-svn-id: svn://cherokee-project.com/cherokee/trunk@3993 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information...
commit 72f64441347fbfff94243d866fe4b2e4dc9fa75d 1 parent 4b21ec6
@alobbs alobbs authored
Showing with 2,941 additions and 2,941 deletions.
  1. +1 −1  admin/GraphManager.py
  2. +6 −6 admin/LogViewer.py
  3. +1 −1  admin/ModuleAuth.py
  4. +1 −1  admin/ModuleBind.py
  5. +1 −1  admin/ModuleCommon.py
  6. +1 −1  admin/ModuleDbslayer.py
  7. +1 −1  admin/ModuleDefault.py
  8. +2 −2 admin/ModuleDirlist.py
  9. +1 −1  admin/ModuleEmptyGif.py
  10. +1 −1  admin/ModuleErrorNn.py
  11. +1 −1  admin/ModuleExists.py
  12. +1 −1  admin/ModuleFrom.py
  13. +1 −1  admin/ModuleFullpath.py
  14. +1 −1  admin/ModuleHeader.py
  15. +1 −1  admin/ModuleMysql.py
  16. +4 −4 admin/ModuleProxy.py
  17. +1 −1  admin/ModuleScgi.py
  18. +1 −1  admin/ModuleSecdownload.py
  19. +2 −2 admin/ModuleStreaming.py
  20. +1 −1  admin/ModuleUwsgi.py
  21. +3 −3 admin/PageAdvanced.py
  22. +1 −1  admin/PageEntry.py
  23. +2 −2 admin/PageIcon.py
  24. +4 −4 admin/PageVServers.py
  25. +6 −6 admin/Post.py
  26. +3 −3 admin/RuleList.py
  27. +3 −3 admin/Wizard.py
  28. +1 −1  admin/Wizard_Mailman.py
  29. +1 −1  admin/Wizard_rTorrent.py
  30. +1 −1  admin/config.py
  31. +2 −2 admin/config_version.py
  32. +2 −2 admin/flags.py
  33. +1 −1  admin/pyscgi.py
  34. +1 −1  admin/upgrade_config.py
  35. +3 −3 admin/validations.py
  36. +38 −38 cherokee/access.c
  37. +1 −1  cherokee/access.h
  38. +48 −48 cherokee/admin_client.c
  39. +1 −1  cherokee/admin_client.h
  40. +5 −5 cherokee/admin_request.c
  41. +1 −1  cherokee/admin_request.h
  42. +25 −25 cherokee/admin_server.c
  43. +1 −1  cherokee/admin_server.h
  44. +60 −60 cherokee/avl.c
  45. +1 −1  cherokee/avl.h
  46. +5 −5 cherokee/avl_r.c
  47. +1 −1  cherokee/avl_r.h
  48. +19 −19 cherokee/balancer.c
  49. +6 −6 cherokee/balancer.h
  50. +18 −18 cherokee/balancer_ip_hash.c
  51. +3 −3 cherokee/balancer_ip_hash.h
  52. +14 −14 cherokee/balancer_round_robin.c
  53. +2 −2 cherokee/balancer_round_robin.h
  54. +11 −11 cherokee/bind.c
  55. +6 −6 cherokee/bind.h
  56. +3 −3 cherokee/bogotime.c
  57. +2 −2 cherokee/bogotime.h
  58. +20 −20 cherokee/cache.c
  59. +7 −7 cherokee/cache.h
  60. +9 −9 cherokee/cacheline.c
  61. +1 −1  cherokee/cacheline.h
  62. +1 −1  cherokee/cherokee.h
  63. +8 −8 cherokee/cherokee_show.c
  64. +2 −2 cherokee/collector.c
  65. +1 −1  cherokee/collector.h
  66. +10 −10 cherokee/collector_rrd.c
  67. +3 −3 cherokee/collector_rrd.h
  68. +11 −11 cherokee/common-internal.h
  69. +4 −4 cherokee/common.h
  70. +19 −19 cherokee/config_entry.c
  71. +5 −5 cherokee/config_entry.h
  72. +28 −28 cherokee/config_node.c
  73. +2 −2 cherokee/config_node.h
  74. +29 −29 cherokee/config_reader.c
  75. +1 −1  cherokee/config_reader.h
  76. +1 −1  cherokee/connection.h
  77. +30 −30 cherokee/connection_info.c
  78. +1 −1  cherokee/connection_info.h
  79. +1 −1  cherokee/crc32.h
  80. +5 −5 cherokee/cryptor.c
  81. +3 −3 cherokee/cryptor.h
  82. +10 −10 cherokee/cryptor_libssl.c
  83. +1 −1  cherokee/cryptor_libssl.h
  84. +1 −1  cherokee/downloader-protected.h
  85. +42 −42 cherokee/downloader.c
  86. +1 −1  cherokee/downloader.h
  87. +10 −10 cherokee/downloader_async.c
  88. +1 −1  cherokee/downloader_async.h
  89. +2 −2 cherokee/dtm.c
  90. +1 −1  cherokee/dtm.h
  91. +19 −19 cherokee/dwriter.c
  92. +2 −2 cherokee/dwriter.h
  93. +12 −12 cherokee/encoder.c
  94. +2 −2 cherokee/encoder.h
  95. +25 −25 cherokee/encoder_deflate.c
  96. +1 −1  cherokee/encoder_deflate.h
  97. +33 −33 cherokee/encoder_gzip.c
  98. +1 −1  cherokee/encoder_gzip.h
  99. +1 −1  cherokee/error_log.h
  100. +6 −6 cherokee/errors.py
  101. +2 −2 cherokee/fastcgi.h
  102. +16 −16 cherokee/fcgi_dispatcher.c
  103. +2 −2 cherokee/fcgi_dispatcher.h
  104. +46 −46 cherokee/fcgi_manager.c
  105. +3 −3 cherokee/fcgi_manager.h
  106. +12 −12 cherokee/fdpoll-epoll.c
  107. +8 −8 cherokee/fdpoll-kqueue.c
  108. +9 −9 cherokee/fdpoll-poll.c
  109. +13 −13 cherokee/fdpoll-port.c
  110. +1 −1  cherokee/fdpoll-protected.h
  111. +13 −13 cherokee/fdpoll-select.c
  112. +14 −14 cherokee/fdpoll-win32.c
  113. +39 −39 cherokee/fdpoll.c
  114. +1 −1  cherokee/fdpoll.h
  115. +7 −7 cherokee/gen_evhost.c
  116. +1 −1  cherokee/gen_evhost.h
  117. +10 −10 cherokee/handler.c
  118. +2 −2 cherokee/handler.h
  119. +14 −14 cherokee/handler_admin.c
  120. +2 −2 cherokee/handler_admin.h
  121. +50 −50 cherokee/handler_cgi.c
  122. +2 −2 cherokee/handler_cgi.h
  123. +91 −91 cherokee/handler_cgi_base.c
  124. +10 −10 cherokee/handler_cgi_base.h
  125. +18 −18 cherokee/handler_common.c
  126. +1 −1  cherokee/handler_common.h
  127. +9 −9 cherokee/handler_custom_error.c
  128. +1 −1  cherokee/handler_custom_error.h
  129. +37 −37 cherokee/handler_dbslayer.c
  130. +1 −1  cherokee/handler_dbslayer.h
  131. +3 −3 cherokee/handler_dirlist.h
  132. +6 −6 cherokee/handler_empty_gif.c
  133. +2 −2 cherokee/handler_empty_gif.h
  134. +16 −16 cherokee/handler_error.c
  135. +1 −1  cherokee/handler_error.h
  136. +15 −15 cherokee/handler_error_nn.c
  137. +1 −1  cherokee/handler_error_nn.h
  138. +1 −1  cherokee/handler_error_redir.h
  139. +39 −39 cherokee/handler_fastcgi.c
  140. +4 −4 cherokee/handler_fastcgi.h
  141. +53 −53 cherokee/handler_fcgi.c
  142. +2 −2 cherokee/handler_fcgi.h
  143. +50 −50 cherokee/handler_file.c
  144. +4 −4 cherokee/handler_file.h
  145. +66 −66 cherokee/handler_proxy.c
  146. +2 −2 cherokee/handler_proxy.h
  147. +38 −38 cherokee/handler_redir.c
  148. +1 −1  cherokee/handler_redir.h
  149. +23 −23 cherokee/handler_render_rrd.c
  150. +2 −2 cherokee/handler_render_rrd.h
  151. +33 −33 cherokee/handler_scgi.c
  152. +2 −2 cherokee/handler_scgi.h
  153. +4 −4 cherokee/handler_secdownload.c
  154. +1 −1  cherokee/handler_secdownload.h
  155. +36 −36 cherokee/handler_server_info.c
  156. +2 −2 cherokee/handler_server_info.h
  157. +18 −18 cherokee/handler_ssi.c
  158. +4 −4 cherokee/handler_ssi.h
  159. +11 −11 cherokee/handler_streaming.c
  160. +2 −2 cherokee/handler_streaming.h
  161. +31 −31 cherokee/handler_uwsgi.c
  162. +2 −2 cherokee/handler_uwsgi.h
  163. +3 −3 cherokee/header-protected.h
  164. +2 −2 cherokee/header.h
  165. +25 −25 cherokee/http.c
  166. +1 −1  cherokee/http.h
  167. +7 −7 cherokee/human_strcmp.c
  168. +1 −1  cherokee/human_strcmp.h
  169. +24 −24 cherokee/icons.c
  170. +2 −2 cherokee/icons.h
  171. +2 −2 cherokee/info.c
  172. +1 −1  cherokee/info.h
  173. +3 −3 cherokee/init.c
  174. +1 −1  cherokee/init.h
  175. +26 −26 cherokee/iocache.c
  176. +2 −2 cherokee/iocache.h
  177. +1 −1  cherokee/levenshtein_distance.c
  178. +4 −4 cherokee/limiter.c
  179. +1 −1  cherokee/limiter.h
  180. +24 −24 cherokee/list.c
  181. +7 −7 cherokee/list.h
  182. +1 −1  cherokee/logger-protected.h
  183. +10 −10 cherokee/logger.c
  184. +1 −1  cherokee/logger.h
  185. +6 −6 cherokee/logger_combined.c
  186. +1 −1  cherokee/logger_combined.h
  187. +16 −16 cherokee/logger_custom.c
  188. +1 −1  cherokee/logger_custom.h
  189. +18 −18 cherokee/logger_ncsa.c
  190. +1 −1  cherokee/logger_ncsa.h
  191. +9 −9 cherokee/macros.h
  192. +33 −33 cherokee/main.c
  193. +19 −19 cherokee/main_admin.c
  194. +27 −27 cherokee/main_tweak.c
  195. +13 −13 cherokee/main_worker.c
  196. +3 −3 cherokee/match.c
  197. +1 −1  cherokee/match.h
  198. +1 −1  cherokee/md5.c
  199. +5 −5 cherokee/md5crypt.c
  200. +1 −1  cherokee/mime-protected.h
  201. +14 −14 cherokee/mime.c
  202. +1 −1  cherokee/mime.h
  203. +6 −6 cherokee/mime_entry.c
  204. +1 −1  cherokee/mime_entry.h
  205. +7 −7 cherokee/module.c
  206. +2 −2 cherokee/module.h
  207. +4 −4 cherokee/ncpus.c
  208. +1 −1  cherokee/ncpus.h
  209. +9 −9 cherokee/nonce.c
  210. +1 −1  cherokee/nonce.h
  211. +1 −1  cherokee/nullable.h
  212. +2 −2 cherokee/plugin.h
  213. +44 −44 cherokee/plugin_loader.c
  214. +1 −1  cherokee/plugin_loader.h
  215. +31 −31 cherokee/post.c
  216. +1 −1  cherokee/post.h
  217. +7 −7 cherokee/proxy_hosts.c
  218. +3 −3 cherokee/proxy_hosts.h
  219. +16 −16 cherokee/regex.c
  220. +2 −2 cherokee/regex.h
  221. +17 −17 cherokee/request.c
  222. +1 −1  cherokee/request.h
  223. +13 −13 cherokee/resolv_cache.c
  224. +1 −1  cherokee/resolv_cache.h
  225. +9 −9 cherokee/rrd_tools.c
  226. +1 −1  cherokee/rrd_tools.h
  227. +7 −7 cherokee/rule.c
  228. +1 −1  cherokee/rule.h
  229. +16 −16 cherokee/rule_and.c
  230. +1 −1  cherokee/rule_and.h
  231. +12 −12 cherokee/rule_bind.c
  232. +1 −1  cherokee/rule_bind.h
  233. +8 −8 cherokee/rule_default.c
  234. +1 −1  cherokee/rule_default.h
  235. +4 −4 cherokee/rule_directory.c
  236. +1 −1  cherokee/rule_directory.h
  237. +20 −20 cherokee/rule_exists.c
  238. +1 −1  cherokee/rule_exists.h
  239. +1 −1  cherokee/rule_extensions.c
  240. +1 −1  cherokee/rule_extensions.h
  241. +10 −10 cherokee/rule_from.c
  242. +1 −1  cherokee/rule_from.h
  243. +8 −8 cherokee/rule_fullpath.c
  244. +1 −1  cherokee/rule_fullpath.h
  245. +9 −9 cherokee/rule_geoip.c
  246. +1 −1  cherokee/rule_geoip.h
  247. +16 −16 cherokee/rule_header.c
  248. +1 −1  cherokee/rule_header.h
  249. +8 −8 cherokee/rule_list.c
  250. +2 −2 cherokee/rule_list.h
  251. +6 −6 cherokee/rule_method.c
  252. +1 −1  cherokee/rule_method.h
  253. +9 −9 cherokee/rule_not.c
  254. +1 −1  cherokee/rule_not.h
  255. +16 −16 cherokee/rule_or.c
  256. +1 −1  cherokee/rule_or.h
  257. +16 −16 cherokee/rule_request.c
  258. +1 −1  cherokee/rule_request.h
  259. +14 −14 cherokee/rule_url_arg.c
  260. +1 −1  cherokee/rule_url_arg.h
  261. +3 −3 cherokee/server-protected.h
  262. +1 −1  cherokee/server.h
  263. +3 −3 cherokee/sha1.c
  264. +6 −6 cherokee/shm.c
  265. +1 −1  cherokee/shm.h
  266. +95 −95 cherokee/socket.c
  267. +3 −3 cherokee/socket.h
  268. +18 −18 cherokee/source.c
  269. +2 −2 cherokee/source.h
  270. +33 −33 cherokee/source_interpreter.c
  271. +2 −2 cherokee/source_interpreter.h
  272. +11 −11 cherokee/spawner.c
  273. +1 −1  cherokee/spawner.h
  274. +26 −26 cherokee/table.c
  275. +1 −1  cherokee/table.h
  276. +10 −10 cherokee/template.c
  277. +1 −1  cherokee/template.h
  278. +124 −124 cherokee/thread.c
  279. +9 −9 cherokee/thread.h
  280. +1 −1  cherokee/threading.c
  281. +2 −2 cherokee/threading.h
  282. +11 −11 cherokee/trace.c
  283. +1 −1  cherokee/trace.h
  284. +1 −1  cherokee/unix4win32.c
  285. +1 −1  cherokee/unix4win32.h
  286. +16 −16 cherokee/url.c
  287. +3 −3 cherokee/url.h
  288. +107 −107 cherokee/util.c
  289. +9 −9 cherokee/util.h
  290. +40 −40 cherokee/validator.c
  291. +7 −7 cherokee/validator.h
  292. +13 −13 cherokee/validator_authlist.c
  293. +1 −1  cherokee/validator_authlist.h
  294. +3 −3 cherokee/validator_file.c
  295. +2 −2 cherokee/validator_file.h
  296. +15 −15 cherokee/validator_htdigest.c
  297. +1 −1  cherokee/validator_htdigest.h
  298. +21 −21 cherokee/validator_htpasswd.c
  299. +1 −1  cherokee/validator_htpasswd.h
  300. +19 −19 cherokee/validator_ldap.c
Sorry, we could not display the entire diff because too many files (408) changed.
View
2  admin/GraphManager.py
@@ -9,7 +9,7 @@ def graphs_are_active (cfg):
def graphs_get_images (cfg, filter):
rrd_dir = cfg.get_val("server!collector!database_dir", CHEROKEE_RRD_DIR)
img_dir = os.path.join (rrd_dir, "images")
-
+
files = []
if os.path.exists (img_dir):
for f in os.listdir(img_dir):
View
12 admin/LogViewer.py
@@ -27,7 +27,7 @@
$("#log_vsrv_%(vserver)s").load("/monitor/content/%(vserver)s");
}
- window.setInterval (function(){
+ window.setInterval (function(){
log_%(vserver)s_reload();
}, 1000 );
@@ -41,7 +41,7 @@ def __init__ (self, filename):
# Create the thread
threading.Thread.__init__ (self)
self.setDaemon (1)
-
+
# File
self.file = None
self.filename = filename
@@ -59,7 +59,7 @@ def __open_file (self):
self.file = open (self.filename, 'r')
except IOError:
return True
-
+
# Seek
try:
filesize = os.path.getsize (self.filename)
@@ -147,7 +147,7 @@ def init_log_readers (cfg):
# Launch them
for reader in widget_objs:
reader.start()
-
+
class PageMonitor (PageMenu, FormHelper):
def __init__ (self, cfg=None):
@@ -174,7 +174,7 @@ def _op_handler (self, uri, post):
return render
else:
self._op_render()
-
+
def _op_render (self):
content = SINGLE_TIME_HTML
@@ -188,7 +188,7 @@ def _op_render (self):
'log_file': widget.filename,
'vserver': vsrv})
content += entry
-
+
self.AddMacroContent ('title', _('Cherokee Web Server Monitor'))
self.AddMacroContent ('content', content)
return Page.Render(self)
View
2  admin/ModuleAuth.py
@@ -1,4 +1,4 @@
-import validations
+import validations
from Form import *
from Table import *
View
2  admin/ModuleBind.py
@@ -88,7 +88,7 @@ def _op_render (self):
if self._prefix.startswith('tmp!'):
return self._render_new_entry()
return self._render_modify_entry()
-
+
def _op_apply_changes (self, uri, post):
self.ApplyChangesPrefix (self._prefix, None, post)
View
2  admin/ModuleCommon.py
@@ -37,7 +37,7 @@ def _op_render (self):
txt = '<h2>%s</h2>' % (_('Parsing'))
txt += self.Indent(table)
- # Copy errors to the modules,
+ # Copy errors to the modules,
# they may need to print them
self._copy_errors (self, self._file)
self._copy_errors (self, self._dirlist)
View
2  admin/ModuleDbslayer.py
@@ -49,7 +49,7 @@ def _op_render (self):
txt += '<h2>%s</h2>' % (_('Data base balancing'))
table = TableProps()
prefix = "%s!balancer" % (self._prefix)
- e = self.AddPropOptions_Reload_Module (table, _("Balancer"), prefix,
+ e = self.AddPropOptions_Reload_Module (table, _("Balancer"), prefix,
modules_available(BALANCERS), _(NOTE_BALANCER))
txt += self.Indent(str(table) + e)
return txt
View
2  admin/ModuleDefault.py
@@ -11,7 +11,7 @@ def __init__ (self, cfg, prefix, submit_url):
def _op_render (self):
return ""
-
+
def apply_cfg (self, values):
None
View
4 admin/ModuleDirlist.py
@@ -1,5 +1,5 @@
import os
-import validations
+import validations
from Form import *
from Table import *
@@ -32,7 +32,7 @@ class ModuleDirlist (ModuleHandler):
'user', 'group',
'theme', 'icon_dir',
'notice_files', 'symlinks',
- 'redir_symlinks', 'hidden',
+ 'redir_symlinks', 'hidden',
'backup'
]
View
2  admin/ModuleEmptyGif.py
@@ -15,7 +15,7 @@ def __init__ (self, cfg, prefix, submit_url):
def _op_render (self):
return ''
-
+
def _op_apply_changes (self, uri, post):
None
View
2  admin/ModuleErrorNn.py
@@ -11,7 +11,7 @@ class ModuleErrorNn (Module, FormHelper):
def __init__ (self, cfg, prefix, submit_url):
FormHelper.__init__ (self, 'error_nn', cfg)
Module.__init__ (self, 'error_nn', cfg, prefix, submit_url)
-
+
def _op_render (self):
return ''
View
2  admin/ModuleExists.py
@@ -22,7 +22,7 @@ def __init__ (self, cfg, prefix, submit_url):
# Special case: there is a check in the rule
self.checks = ['%s!iocache'%(self._prefix),
- '%s!match_any'%(self._prefix),
+ '%s!match_any'%(self._prefix),
'%s!match_only_files'%(self._prefix),
'%s!match_index_files'%(self._prefix)]
View
2  admin/ModuleFrom.py
@@ -44,7 +44,7 @@ def _op_render_modify (self):
link_del = ''
table += (ip, link_del)
n = max(int(k), n)
-
+
if n > -1:
txt += '<h2>IPs and SubNets</h2>'
txt += self.Indent(table)
View
2  admin/ModuleFullpath.py
@@ -24,7 +24,7 @@ def _op_render (self):
txt = ""
pre = '%s!fullpath'%(self._prefix)
-
+
table = Table (2)
first = True
for k in self._cfg.keys(pre):
View
2  admin/ModuleHeader.py
@@ -37,7 +37,7 @@ def _op_render (self):
self.AddPropOptions_Reload_Plain (table, _('Header'), '%s!header'%(self._prefix), HEADERS, _(NOTE_HEADER))
self.AddPropEntry (table, _('Regular Expression'), '%s!match'%(self._prefix), _(NOTE_MATCH))
return str(table)
-
+
def apply_cfg (self, values):
if values.has_key('value'):
header = values['value']
View
2  admin/ModuleMysql.py
@@ -48,7 +48,7 @@ def _op_render (self):
self.AddPropEntry (table, _("DB Password"), "%s!passwd"%(self._prefix), _(NOTE_PASSWD))
self.AddPropEntry (table, _("Database"), "%s!database"%(self._prefix), _(NOTE_DB))
self.AddPropEntry (table, _("SQL Query"), "%s!query"%(self._prefix), _(NOTE_SQL))
-
+
if not is_basic:
self.AddPropOptions (table, _('Password Hash'), "%s!hash"%(self._prefix), HASHES, _(NOTE_HASH), disabled=1)
else:
View
8 admin/ModuleProxy.py
@@ -21,7 +21,7 @@
class ModuleProxy (ModuleHandler):
PROPERTIES = [
- 'balancer',
+ 'balancer',
'in_allow_keepalive',
'in_preserve_host',
'out_preserve_server',
@@ -70,7 +70,7 @@ def _render_request (self):
_("URL Rewriting"))
txt += self._render_generic_header_list ("in_header_add",
- "tmp!in_header_add",
+ "tmp!in_header_add",
_("Header Addition"),
_("Add New Header"))
@@ -85,7 +85,7 @@ def _render_reply (self):
_("URL Rewriting"))
txt += self._render_generic_header_list ("out_header_add",
- "tmp!out_header_add",
+ "tmp!out_header_add",
_("Header addition"),
_("Add New Header"))
@@ -209,6 +209,6 @@ def _op_apply_changes (self, uri, post):
props._op_apply_changes (uri, post)
# And CGI changes
- self.ApplyChangesPrefix (self._prefix,
+ self.ApplyChangesPrefix (self._prefix,
['in_allow_keepalive', 'in_preserve_host',
'out_preserve_server'], post)
View
2  admin/ModuleScgi.py
@@ -33,7 +33,7 @@ def _op_render (self):
table = TableProps()
prefix = "%s!balancer" % (self._prefix)
- e = self.AddPropOptions_Reload_Module (table, _("Balancer"), prefix,
+ e = self.AddPropOptions_Reload_Module (table, _("Balancer"), prefix,
modules_available(BALANCERS), _(NOTE_BALANCER))
txt += self.Indent(str(table) + e)
return txt
View
2  admin/ModuleSecdownload.py
@@ -41,7 +41,7 @@ def _op_render (self):
txt = '<h2>%s</h2>' % (_('Covering parameters'))
txt += self.Indent(table)
- # Copy errors to the modules,
+ # Copy errors to the modules,
# they may need to print them
self._copy_errors (self, self._file)
View
4 admin/ModuleStreaming.py
@@ -1,4 +1,4 @@
-import validations
+import validations
from Form import *
from Table import *
@@ -45,7 +45,7 @@ def _op_render (self):
txt += '<h2>%s</h2>' % (_('Audio/Video Streaming'))
txt += self.Indent(table)
- # Copy errors to the modules,
+ # Copy errors to the modules,
# they may need to print them
self._copy_errors (self, self._file)
View
2  admin/ModuleUwsgi.py
@@ -33,7 +33,7 @@ def _op_render (self):
table = TableProps()
prefix = "%s!balancer" % (self._prefix)
- e = self.AddPropOptions_Reload_Module (table, _("Balancer"), prefix,
+ e = self.AddPropOptions_Reload_Module (table, _("Balancer"), prefix,
modules_available(BALANCERS), _(NOTE_BALANCER))
txt += self.Indent(str(table) + e)
return txt
View
6 admin/PageAdvanced.py
@@ -143,8 +143,8 @@ def _render_tls (self):
return self.Indent(table)
def _op_apply_changes (self, uri, post):
- self.ApplyChanges (['server!keepalive',
- 'server!chunked_encoding',
- 'server!iocache'],
+ self.ApplyChanges (['server!keepalive',
+ 'server!chunked_encoding',
+ 'server!iocache'],
post, validation = DATA_VALIDATION)
View
2  admin/PageEntry.py
@@ -30,7 +30,7 @@
("vserver!(\d+)!rule!(\d+)!allow_from", validations.is_ip_or_netmask_list),
("vserver!(\d+)!rule!(\d+)!rate", validations.is_number_gt_0),
("vserver!(\d+)!rule!(\d+)!timeout", validations.is_number_gt_0),
- ("vserver!(\d+)!rule!(\d+)!expiration!time", validations.is_time)
+ ("vserver!(\d+)!rule!(\d+)!expiration!time", validations.is_time)
]
HELPS = [
View
4 admin/PageIcon.py
@@ -80,8 +80,8 @@ def _get_options_icons (self, cfg_key, file_filter=None, selected=None):
# Build the options
if selected:
- options = EntryOptions (cfg_key, file_options,
- onChange='return option_icons_update(\'%s\');'%(cfg_key),
+ options = EntryOptions (cfg_key, file_options,
+ onChange='return option_icons_update(\'%s\');'%(cfg_key),
selected=selected)
else:
options = EntryOptions (cfg_key, file_options,
View
8 admin/PageVServers.py
@@ -248,7 +248,7 @@ def sort_vservers(x,y):
}
});
- function openSection(section)
+ function openSection(section)
{
document.cookie = "open_vssec=" + section;
if (prevSection != '') {
@@ -309,7 +309,7 @@ def sort_vservers(x,y):
txt += '<div class="rulesbutton"><a id="clonesection_b">%s</a></div>' % (_('Clone Virtual Server'))
txt += '<div class="rulesbutton"><a id="wizardsection_b">%s</a></div>' % (_('Wizards'))
txt += '</div>'
-
+
return txt
def _render_wizards (self):
@@ -320,7 +320,7 @@ def _render_wizards (self):
table = '<table id="wizSel" class="rulestable"><tr><th>Category</th><th>Wizard</th></tr>'
table += '<tr><td id="wizG"></td><td id="wizL"></td></table>'
- if txt:
+ if txt:
txt = _("<h2>Wizards</h2>") + table + txt
return txt
@@ -356,7 +356,7 @@ def _op_clone_vserver (self, post):
return
# Clone it
- error = self._cfg.clone('vserver!%s'%(prio_source),
+ error = self._cfg.clone('vserver!%s'%(prio_source),
'vserver!%s'%(prio_target))
if not error:
self._cfg['vserver!%s!nick'%(prio_target)] = nick_target
View
12 admin/Post.py
@@ -9,9 +9,9 @@ def __init__ (self, raw=''):
for key in tmp:
self._vars[key] = []
for n in range(len(tmp[key])):
- value = tmp[key][n]
+ value = tmp[key][n]
self._vars[key] += [unquote (value)]
-
+
def _smart_chooser (self, key):
if not key in self._vars:
return None
@@ -24,13 +24,13 @@ def _smart_chooser (self, key):
def get_val (self, key, not_found=None):
tmp = self._smart_chooser(key)
- if not tmp:
+ if not tmp:
return not_found
return tmp
def pop (self, key, not_found=None):
val = self._smart_chooser(key)
- if not val:
+ if not val:
return not_found
if key in self._vars:
del(self[key])
@@ -43,10 +43,10 @@ def __getitem__ (self, key):
def __setitem__ (self, key, val):
self._vars[key] = val
-
+
def __delitem__ (self, key):
del (self._vars[key])
-
+
def __len__ (self):
return len(self._vars)
View
6 admin/RuleList.py
@@ -7,7 +7,7 @@ def __init__ (self, cfg, prefix):
def _normalize (self):
if not self._cfg[self._cfg_pre]:
- return
+ return
# Build the new list
child = []
@@ -72,7 +72,7 @@ def change_prios (self, changes):
p_entry = int(entry)
if p_entry not in relocated.keys():
relocated[p_entry] = self[entry]
-
+
# Reassign childs
for p in self.keys():
del (self._cfg["%s!%s" % (self._cfg_pre, p)])
@@ -80,4 +80,4 @@ def change_prios (self, changes):
for item in relocated.keys():
pre = '%s!%d' % (self._cfg_pre, item)
self._cfg.set_sub_node (pre, relocated[item])
-
+
View
6 admin/Wizard.py
@@ -99,13 +99,13 @@ def _render_group (self, url_pre, wizards_all, group):
show = wizard.show()
img = "/static/images/wizards/%s" % (wizard.ICON)
- txt += 'cherokeeWizards["%s"]["%s"] = {"title": "%s", "desc": "%s", "img": "%s", ' % (group, name, name, wizard.DESC, img)
+ txt += 'cherokeeWizards["%s"]["%s"] = {"title": "%s", "desc": "%s", "img": "%s", ' % (group, name, name, wizard.DESC, img)
if not show:
- txt += '"show": false, "no_show": "%s" }\n' % (wizard.no_show)
+ txt += '"show": false, "no_show": "%s" }\n' % (wizard.no_show)
else:
url = "%s/wizard/%s" % (url_pre, name)
- txt += '"show": true, "url": "%s" }\n' % (url)
+ txt += '"show": true, "url": "%s" }\n' % (url)
return txt
View
2  admin/Wizard_Mailman.py
@@ -73,7 +73,7 @@ def is_mailman_data_dir (path, cfg, nochroot):
if not os.path.exists (file):
raise ValueError, _("It doesn't look like a Mailman data directory.")
return path
-
+
def is_mailman_cgi_dir (path, cfg, nochroot):
path = validations.is_local_dir_exists (path, cfg, nochroot)
file = os.path.join (path, "listinfo")
View
2  admin/Wizard_rTorrent.py
@@ -30,7 +30,7 @@ class Wizard_Rules_rTorrent (WizardPage):
DESC = "Configures rTorrent XMLRPC."
def __init__ (self, cfg, pre):
- WizardPage.__init__ (self, cfg, pre,
+ WizardPage.__init__ (self, cfg, pre,
submit = '/vserver/%s/wizard/rTorrent'%(pre.split('!')[1]),
id = "rTorrent_Page1",
title = _("rTorrent Wizard"),
View
2  admin/config.py
@@ -276,7 +276,7 @@ def sorter(x,y):
return -1
# Sort rules: reverse
- if ((len(a) > 3) and
+ if ((len(a) > 3) and
(a[0] == b[0] == 'vserver') and
(a[1] == b[1]) and
(a[2] == b[2] == 'rule')):
View
4 admin/config_version.py
@@ -47,7 +47,7 @@ def config_version_cfg_is_up_to_date (cfg):
elif int(ver_config) == int(ver_cherokee):
return True
-
+
else:
return False
@@ -69,7 +69,7 @@ def config_version_update_cfg (cfg):
if ver_config_i < 99031:
upgrade_to_0_99_31 (cfg)
- # Update to.. 0.99.xx
+ # Update to.. 0.99.xx
cfg["config!version"] = ver_release_s
return True
View
4 admin/flags.py
@@ -279,7 +279,7 @@
if (cfg_key_value.indexOf(selected) >= 0)
return;
- jQuery.post (url, post,
+ jQuery.post (url, post,
function (data, textStatus) {
window.location = window.location;
}
@@ -293,7 +293,7 @@ class OptionFlags:
def __init__ (self, name, *args, **kwargs):
self._name = name
self._kwargs = kwargs
-
+
def _render_option (self, code, name, icon):
if icon:
style = 'style="background-image:url(/static/images/flags/%s); background-repeat:no-repeat; background-position:bottom right;" ' % (icon)
View
2  admin/pyscgi.py
@@ -54,7 +54,7 @@ def __init__ (self, request, client_address, server):
SocketServer.StreamRequestHandler.__init__ (self, request, client_address, server)
def __safe_read (self, lenght):
- while True:
+ while True:
chunk = None
try:
chunk = self.rfile.read(lenght)
View
2  admin/upgrade_config.py
@@ -31,7 +31,7 @@ def main():
ver_release = int (config_version_get_current())
print "Upgrading '%s' from %d to %d.." % (cfg_file, ver_config, ver_release),
-
+
# Convert it
updated = config_version_update_cfg (cfg)
print ["Not upgraded.", "Upgraded."][updated]
View
6 admin/validations.py
@@ -121,12 +121,12 @@ def is_ipv4 (value):
def is_ipv6 (value):
from socket import inet_pton, AF_INET6
- try:
+ try:
tmp = inet_pton(AF_INET6, value)
except:
raise ValueError, _('Malformed IPv6')
return value
-
+
def is_local_dir_exists (value, cfg, nochroot=False):
value = is_path (value)
@@ -318,4 +318,4 @@ def is_new_host (value, cfg, nochroot):
raise ValueError, _('Virtual host nick is already being used.')
return value
-
+
View
76 cherokee/access.c
@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
- */
+ */
#include "common-internal.h"
#include "access.h"
@@ -40,7 +40,7 @@
#endif
#ifdef HAVE_ARPA_INET_H
-# include <arpa/inet.h>
+# include <arpa/inet.h>
#endif
#include "util.h"
@@ -53,7 +53,7 @@
# define AF_INET6 10
#endif
-typedef enum {
+typedef enum {
ipv4 = AF_INET,
ipv6 = AF_INET6
} ip_type_t;
@@ -68,7 +68,7 @@ typedef union {
typedef struct {
cherokee_list_t node;
-
+
ip_type_t type;
ip_t ip;
} ip_item_t;
@@ -83,7 +83,7 @@ typedef struct {
static ip_item_t *
-new_ip (void)
+new_ip (void)
{
ip_item_t *n = (ip_item_t *) malloc (sizeof(ip_item_t));
if (n == NULL) return NULL;
@@ -102,7 +102,7 @@ free_ip (ip_item_t *ip)
}
static subnet_item_t *
-new_subnet (void)
+new_subnet (void)
{
subnet_item_t *n = (subnet_item_t *) malloc (sizeof(subnet_item_t));
if (n == NULL) return NULL;
@@ -115,7 +115,7 @@ new_subnet (void)
}
-ret_t
+ret_t
cherokee_access_init (cherokee_access_t *entry)
{
INIT_LIST_HEAD(&entry->list_ips);
@@ -123,11 +123,11 @@ cherokee_access_init (cherokee_access_t *entry)
return ret_ok;
}
-ret_t
+ret_t
cherokee_access_mrproper (cherokee_access_t *entry)
{
cherokee_list_t *i, *tmp;
-
+
/* Free the IP list items
*/
list_for_each_safe (i, tmp, LIST(&entry->list_ips)) {
@@ -178,9 +178,9 @@ parse_ip (char *ip, ip_item_t *n)
/* Test if it is a IPv4 or IPv6 connection
*/
- n->type = ((strchr (ip, ':') != NULL) ||
+ n->type = ((strchr (ip, ':') != NULL) ||
(strlen(ip) > 15)) ? ipv6 : ipv4;
-
+
#ifndef HAVE_IPV6
if (n->type == ipv6) {
return ret_error;
@@ -207,7 +207,7 @@ parse_ip (char *ip, ip_item_t *n)
return (ok) ? ret_ok : ret_error;
}
-
+
static ret_t
parse_netmask (char *netmask, subnet_item_t *n)
@@ -226,7 +226,7 @@ parse_netmask (char *netmask, subnet_item_t *n)
ok = (inet_pton (IP_NODE(n)->type, netmask, &n->mask) > 0);
#else
ok = (inet_aton (netmask, &n->mask) != 0);
-#endif
+#endif
return (ok) ? ret_ok : ret_error;
}
@@ -239,15 +239,15 @@ parse_netmask (char *netmask, subnet_item_t *n)
}
num = strtol(netmask, NULL, 10);
- if (num < 0)
+ if (num < 0)
return ret_error;
/* Sanity checks
*/
- if ((IP_NODE(n)->type == ipv4) && (num > 32))
+ if ((IP_NODE(n)->type == ipv4) && (num > 32))
return ret_error;
- if ((IP_NODE(n)->type == ipv6) && (num > 128))
+ if ((IP_NODE(n)->type == ipv6) && (num > 128))
return ret_error;
#ifdef HAVE_IPV6
@@ -342,7 +342,7 @@ cherokee_access_add_domain (cherokee_access_t *entry, char *domain)
}
-static ret_t
+static ret_t
cherokee_access_add_subnet (cherokee_access_t *entry, char *subnet)
{
ret_t ret;
@@ -358,7 +358,7 @@ cherokee_access_add_subnet (cherokee_access_t *entry, char *subnet)
mask = slash +1;
cherokee_buffer_add (&ip, subnet, mask-subnet-1);
-
+
/* Create the new list object
*/
n = new_subnet();
@@ -379,7 +379,7 @@ cherokee_access_add_subnet (cherokee_access_t *entry, char *subnet)
ret = parse_netmask (mask, n);
if (ret < ret_ok) {
LOG_ERROR (CHEROKEE_ERROR_ACCESS_INVALID_MASK, mask);
- goto error;
+ goto error;
}
TRACE (ENTRIES, "Access: subnet IP '%s', mask '%s'\n", ip.buf, mask);
@@ -393,7 +393,7 @@ cherokee_access_add_subnet (cherokee_access_t *entry, char *subnet)
}
-ret_t
+ret_t
cherokee_access_add (cherokee_access_t *entry, char *ip_or_subnet)
{
ret_t ret;
@@ -421,7 +421,7 @@ cherokee_access_add (cherokee_access_t *entry, char *ip_or_subnet)
else
return cherokee_access_add_ip (entry, ip_or_subnet);
}
-
+
/* Special cases of subnets
*/
mask = atoi(slash+1);
@@ -437,18 +437,18 @@ cherokee_access_add (cherokee_access_t *entry, char *ip_or_subnet)
if ((strchr(ip_or_subnet, '.') != NULL) && (mask == 32)) {
sep = *slash;
*slash = '\0';
- ret = cherokee_access_add_ip (entry, ip_or_subnet);
+ ret = cherokee_access_add_ip (entry, ip_or_subnet);
*slash = sep;
return ret;
}
/* Add a subnet
*/
- return cherokee_access_add_subnet (entry, ip_or_subnet);
+ return cherokee_access_add_subnet (entry, ip_or_subnet);
}
-ret_t
+ret_t
cherokee_access_print_debug (cherokee_access_t *entry)
{
cherokee_list_t *i;
@@ -473,7 +473,7 @@ cherokee_access_print_debug (cherokee_access_t *entry)
}
-ret_t
+ret_t
cherokee_access_ip_match (cherokee_access_t *entry, cherokee_socket_t *sock)
{
int re;
@@ -484,7 +484,7 @@ cherokee_access_ip_match (cherokee_access_t *entry, cherokee_socket_t *sock)
/* Check in the IP list
*/
list_for_each (i, LIST(&entry->list_ips)) {
-
+
#ifdef HAVE_IPV6
/* This is a special case:
* The socket is IPv6 with a mapped IPv4 address
@@ -492,7 +492,7 @@ cherokee_access_ip_match (cherokee_access_t *entry, cherokee_socket_t *sock)
if ((SOCKET_AF(sock) == ipv6) &&
(IP_NODE(i)->type == ipv4) &&
(IN6_IS_ADDR_V4MAPPED (&SOCKET_ADDR_IPv6(sock)->sin6_addr)) &&
- (!memcmp (&SOCKET_ADDR_IPv6(sock)->sin6_addr.s6_addr[12], &IP_NODE(i)->ip, 4)))
+ (!memcmp (&SOCKET_ADDR_IPv6(sock)->sin6_addr.s6_addr[12], &IP_NODE(i)->ip, 4)))
{
TRACE (ENTRIES, "IPv4 mapped in IPv6 address: %s\n", "matched");
return ret_ok;
@@ -507,9 +507,9 @@ cherokee_access_ip_match (cherokee_access_t *entry, cherokee_socket_t *sock)
printf ("4 remote "); print_ip(ipv4, &SOCKET_ADDRESS_IPv4(sock)); printf ("\n");
printf ("4 list "); print_ip(ipv4, &IP_NODE(i)->ip); printf ("\n");
*/
- TRACE (ENTRIES, "IPv4 address (%x)%s matched (ip=%x)\n",
+ TRACE (ENTRIES, "IPv4 address (%x)%s matched (ip=%x)\n",
IP_NODE(i)->ip.ip4,
- re ? " haven't" : "",
+ re ? " haven't" : "",
SOCKET_ADDR_IPv4(sock)->sin_addr);
break;
#ifdef HAVE_IPV6
@@ -548,7 +548,7 @@ cherokee_access_ip_match (cherokee_access_t *entry, cherokee_socket_t *sock)
#ifdef HAVE_IPV6
if ((SOCKET_AF(sock) == ipv6) &&
(IP_NODE(i)->type == ipv4) &&
- IN6_IS_ADDR_V4MAPPED (&SOCKET_ADDR_IPv6(sock)->sin6_addr))
+ IN6_IS_ADDR_V4MAPPED (&SOCKET_ADDR_IPv6(sock)->sin6_addr))
{
cuint_t ip4_sock;
@@ -558,24 +558,24 @@ cherokee_access_ip_match (cherokee_access_t *entry, cherokee_socket_t *sock)
SUBNET_NODE(i)->mask.ip4.s_addr);
masqued_remote.ip4.s_addr = (ip4_sock &
SUBNET_NODE(i)->mask.ip4.s_addr);
-
+
if (masqued_remote.ip4.s_addr == masqued_list.ip4.s_addr) {
return ret_ok;
}
}
#endif
-
+
if (SOCKET_AF(sock) == IP_NODE(i)->type) {
switch (IP_NODE(i)->type) {
case ipv4:
masqued_list.ip4.s_addr = (IP_NODE(i)->ip.ip4.s_addr &
SUBNET_NODE(i)->mask.ip4.s_addr);
- masqued_remote.ip4.s_addr = (SOCKET_ADDR_IPv4(sock)->sin_addr.s_addr &
+ masqued_remote.ip4.s_addr = (SOCKET_ADDR_IPv4(sock)->sin_addr.s_addr &
SUBNET_NODE(i)->mask.ip4.s_addr);
-
+
TRACE (ENTRIES, "Checking IPv4 net: (mask=%x) %x == %x ?\n",
- SUBNET_NODE(i)->mask.ip4.s_addr,
- masqued_remote.ip4.s_addr,
+ SUBNET_NODE(i)->mask.ip4.s_addr,
+ masqued_remote.ip4.s_addr,
masqued_list.ip4.s_addr);
if (masqued_remote.ip4.s_addr == masqued_list.ip4.s_addr) {
@@ -605,8 +605,8 @@ cherokee_access_ip_match (cherokee_access_t *entry, cherokee_socket_t *sock)
}
TRACE (ENTRIES, "Checking IPv6 net: (mask=%x) %x == %x ?\n",
- SUBNET_NODE(i)->mask.ip6.s6_addr,
- masqued_remote.ip6.s6_addr,
+ SUBNET_NODE(i)->mask.ip6.s6_addr,
+ masqued_remote.ip6.s6_addr,
masqued_list.ip6.s6_addr);
View
2  cherokee/access.h
@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
- */
+ */
#ifndef CHEROKEE_ACCESS_H
#define CHEROKEE_ACCESS_H
View
96 cherokee/admin_client.c
@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
- */
+ */
#include "common-internal.h"
@@ -50,7 +50,7 @@ struct cherokee_admin_client {
#define strcmp_begin_const(line,sub) strncmp(line, sub, sizeof(sub))
-ret_t
+ret_t
cherokee_admin_client_new (cherokee_admin_client_t **admin)
{
CHEROKEE_NEW_STRUCT(n,admin_client);
@@ -72,7 +72,7 @@ cherokee_admin_client_new (cherokee_admin_client_t **admin)
}
-ret_t
+ret_t
cherokee_admin_client_free (cherokee_admin_client_t *admin)
{
cherokee_buffer_mrproper (&admin->request);
@@ -85,8 +85,8 @@ cherokee_admin_client_free (cherokee_admin_client_t *admin)
}
-ret_t
-cherokee_admin_client_prepare (cherokee_admin_client_t *admin,
+ret_t
+cherokee_admin_client_prepare (cherokee_admin_client_t *admin,
cherokee_fdpoll_t *poll,
cherokee_buffer_t *url,
cherokee_buffer_t *user,
@@ -103,20 +103,20 @@ cherokee_admin_client_prepare (cherokee_admin_client_t *admin,
/* Sanity check
*/
- if ((admin->url_ref == NULL) ||
+ if ((admin->url_ref == NULL) ||
(admin->poll_ref == NULL))
{
LOG_CRITICAL_S (CHEROKEE_ERROR_ADMIN_CLIENT_INTERNAL);
return ret_error;
}
-
+
/* Set up the downloader object properties
*/
ret = cherokee_downloader_async_set_fdpoll (DOWNLOADER_ASYNC(downloader), admin->poll_ref);
if (unlikely (ret != ret_ok))
return ret;
-
- ret = cherokee_downloader_set_url (downloader, admin->url_ref);
+
+ ret = cherokee_downloader_set_url (downloader, admin->url_ref);
if (unlikely (ret != ret_ok))
return ret;
@@ -132,26 +132,26 @@ cherokee_admin_client_prepare (cherokee_admin_client_t *admin,
*/
ret = cherokee_downloader_set_auth (downloader, user, pass);
if (unlikely (ret != ret_ok))
- return ret;
+ return ret;
TRACE(ENTRIES, "Exists obj=%p\n", admin);
return ret_ok;
}
-ret_t
+ret_t
cherokee_admin_client_connect (cherokee_admin_client_t *admin)
{
return cherokee_downloader_async_connect (admin->downloader);
}
-ret_t
+ret_t
cherokee_admin_client_get_reply_code (cherokee_admin_client_t *admin, cherokee_http_t *code)
{
return cherokee_downloader_get_reply_code (DOWNLOADER(admin->downloader), code);
}
-ret_t
+ret_t
cherokee_admin_client_reuse (cherokee_admin_client_t *admin)
{
cherokee_downloader_reuse (DOWNLOADER(admin->downloader));
@@ -200,15 +200,15 @@ prepare_and_set_post (cherokee_admin_client_t *admin, const char *str, cuint_t s
cherokee_downloader_t *downloader = DOWNLOADER(admin->downloader);
- cherokee_downloader_set_url (downloader, admin->url_ref);
- cherokee_buffer_add (&admin->request, str, str_len);
+ cherokee_downloader_set_url (downloader, admin->url_ref);
+ cherokee_buffer_add (&admin->request, str, str_len);
/* Build and set the post object
*/
cherokee_post_init (&admin->post);
cherokee_post_set_len (&admin->post, str_len);
cherokee_post_append (&admin->post, str, str_len, &written);
- cherokee_downloader_post_set (downloader, &admin->post);
+ cherokee_downloader_post_set (downloader, &admin->post);
}
#define SET_POST(admin,str) \
@@ -227,11 +227,11 @@ prepare_and_set_post (cherokee_admin_client_t *admin, const char *str, cuint_t s
static ret_t
-check_and_skip_literal (cherokee_buffer_t *buf, const char *literal)
+check_and_skip_literal (cherokee_buffer_t *buf, const char *literal)
{
cint_t re;
cuint_t len;
-
+
len = strlen(literal);
cherokee_buffer_trim (buf);
@@ -250,9 +250,9 @@ check_and_skip_literal (cherokee_buffer_t *buf, const char *literal)
static ret_t
-common_processing (cherokee_admin_client_t *admin,
+common_processing (cherokee_admin_client_t *admin,
void (*conf_request_func) (cherokee_admin_client_t *admin, void *argument),
- void *argument)
+ void *argument)
{
ret_t ret;
cherokee_downloader_t *downloader = DOWNLOADER(admin->downloader);
@@ -268,7 +268,7 @@ common_processing (cherokee_admin_client_t *admin,
return ret_eagain;
}
- /* Finished
+ /* Finished
*/
if (downloader->phase == downloader_phase_finished)
return ret_ok;
@@ -301,7 +301,7 @@ parse_reply_get_port (cherokee_buffer_t *reply, cuint_t *port)
return ret_ok;
}
-ret_t
+ret_t
cherokee_admin_client_ask_port (cherokee_admin_client_t *admin, cuint_t *port)
{
ret_t ret;
@@ -334,7 +334,7 @@ parse_reply_get_port_tls (cherokee_buffer_t *reply, cuint_t *port)
return ret_ok;
}
-ret_t
+ret_t
cherokee_admin_client_ask_port_tls (cherokee_admin_client_t *admin, cuint_t *port)
{
ret_t ret;
@@ -346,7 +346,7 @@ cherokee_admin_client_ask_port_tls (cherokee_admin_client_t *admin, cuint_t *por
}
-/* RX
+/* RX
*/
static void
ask_get_rx (cherokee_admin_client_t *admin, void *arg)
@@ -367,7 +367,7 @@ parse_reply_get_rx (cherokee_buffer_t *reply, cherokee_buffer_t *rx)
return ret_ok;
}
-ret_t
+ret_t
cherokee_admin_client_ask_rx (cherokee_admin_client_t *admin, cherokee_buffer_t *rx)
{
ret_t ret;
@@ -375,11 +375,11 @@ cherokee_admin_client_ask_rx (cherokee_admin_client_t *admin, cherokee_buffer_t
ret = common_processing (admin, ask_get_rx, NULL);
if (ret != ret_ok) return ret;
- return parse_reply_get_rx (&DOWNLOADER(admin->downloader)->body, rx);
+ return parse_reply_get_rx (&DOWNLOADER(admin->downloader)->body, rx);
}
-/* TX
+/* TX
*/
static void
ask_get_tx (cherokee_admin_client_t *admin, void *arg)
@@ -400,7 +400,7 @@ parse_reply_get_tx (cherokee_buffer_t *reply, cherokee_buffer_t *tx)
return ret_ok;
}
-ret_t
+ret_t
cherokee_admin_client_ask_tx (cherokee_admin_client_t *admin, cherokee_buffer_t *tx)
{
ret_t ret;
@@ -408,7 +408,7 @@ cherokee_admin_client_ask_tx (cherokee_admin_client_t *admin, cherokee_buffer_t
ret = common_processing (admin, ask_get_tx, NULL);
if (ret != ret_ok) return ret;
- return parse_reply_get_tx (&DOWNLOADER(admin->downloader)->body, tx);
+ return parse_reply_get_tx (&DOWNLOADER(admin->downloader)->body, tx);
}
@@ -429,7 +429,7 @@ parse_reply_get_connections (char *reply, cherokee_list_t *conns_list)
cherokee_buffer_t info_str = CHEROKEE_BUF_INIT;
char *p = reply;
-
+
CHECK_AND_SKIP_LITERAL (reply, "server.connections are ");
for (;;) {
@@ -439,7 +439,7 @@ parse_reply_get_connections (char *reply, cherokee_list_t *conns_list)
begin = strchr (p, '[');
end = strchr (p, ']');
-
+
if ((begin == NULL) || (end == NULL) || (end < begin))
return ret_ok;
@@ -467,18 +467,18 @@ parse_reply_get_connections (char *reply, cherokee_list_t *conns_list)
else if (!strncmp (token, "rx=", 3))
cherokee_buffer_add (&conn_info->rx, equal, strlen(equal));
else if (!strncmp (token, "tx=", 3))
- cherokee_buffer_add (&conn_info->tx, equal, strlen(equal));
+ cherokee_buffer_add (&conn_info->tx, equal, strlen(equal));
else if (!strncmp (token, "total_size=", 11))
- cherokee_buffer_add (&conn_info->total_size, equal, strlen(equal));
+ cherokee_buffer_add (&conn_info->total_size, equal, strlen(equal));
else if (!strncmp (token, "ip=", 3))
- cherokee_buffer_add (&conn_info->ip, equal, strlen(equal));
- else if (!strncmp (token, "id=", 3))
+ cherokee_buffer_add (&conn_info->ip, equal, strlen(equal));
+ else if (!strncmp (token, "id=", 3))
cherokee_buffer_add (&conn_info->id, equal, strlen(equal));
- else if (!strncmp (token, "percent=", 8))
+ else if (!strncmp (token, "percent=", 8))
cherokee_buffer_add (&conn_info->percent, equal, strlen(equal));
- else if (!strncmp (token, "handler=", 8))
+ else if (!strncmp (token, "handler=", 8))
cherokee_buffer_add (&conn_info->handler, equal, strlen(equal));
- else if (!strncmp (token, "icon=", 5))
+ else if (!strncmp (token, "icon=", 5))
cherokee_buffer_add (&conn_info->icon, equal, strlen(equal));
else
SHOULDNT_HAPPEN;
@@ -491,7 +491,7 @@ parse_reply_get_connections (char *reply, cherokee_list_t *conns_list)
return ret_ok;
}
-ret_t
+ret_t
cherokee_admin_client_ask_connections (cherokee_admin_client_t *admin, cherokee_list_t *conns_list)
{
ret_t ret;
@@ -499,7 +499,7 @@ cherokee_admin_client_ask_connections (cherokee_admin_client_t *admin, cherokee_
ret = common_processing (admin, ask_get_connections, NULL);
if (ret != ret_ok) return ret;
- return parse_reply_get_connections (DOWNLOADER(admin->downloader)->body.buf, conns_list);
+ return parse_reply_get_connections (DOWNLOADER(admin->downloader)->body.buf, conns_list);
}
@@ -528,7 +528,7 @@ parse_reply_del_connection (char *reply, char *id)
return ret;
}
-ret_t
+ret_t
cherokee_admin_client_del_connection (cherokee_admin_client_t *admin, char *id)
{
ret_t ret;
@@ -536,7 +536,7 @@ cherokee_admin_client_del_connection (cherokee_admin_client_t *admin, char *id)
ret = common_processing (admin, ask_del_connection, id);
if (ret != ret_ok) return ret;
- return parse_reply_del_connection (DOWNLOADER(admin->downloader)->body.buf, id);
+ return parse_reply_del_connection (DOWNLOADER(admin->downloader)->body.buf, id);
}
@@ -561,7 +561,7 @@ parse_reply_thread_number (cherokee_buffer_t *reply, cherokee_buffer_t *num)
return ret_ok;
}
-ret_t
+ret_t
cherokee_admin_client_ask_thread_num (cherokee_admin_client_t *admin, cherokee_buffer_t *num)
{
ret_t ret;
@@ -600,7 +600,7 @@ parse_reply_set_backup_mode (char *reply, cherokee_boolean_t active)
return ret_ok;
}
-ret_t
+ret_t
cherokee_admin_client_set_backup_mode (cherokee_admin_client_t *admin, cherokee_boolean_t active)
{
ret_t ret;
@@ -608,7 +608,7 @@ cherokee_admin_client_set_backup_mode (cherokee_admin_client_t *admin, cherokee_
ret = common_processing (admin, set_backup_mode, INT_TO_POINTER(active));
if (ret != ret_ok) return ret;
- return parse_reply_set_backup_mode (DOWNLOADER(admin->downloader)->body.buf, active);
+ return parse_reply_set_backup_mode (DOWNLOADER(admin->downloader)->body.buf, active);
}
@@ -633,7 +633,7 @@ parse_reply_trace (cherokee_buffer_t *reply, cherokee_buffer_t *trace)
return ret_ok;
}
-ret_t
+ret_t
cherokee_admin_client_ask_trace (cherokee_admin_client_t *admin, cherokee_buffer_t *trace)
{
ret_t ret;
@@ -663,7 +663,7 @@ set_trace_mode (cherokee_admin_client_t *admin, void *arg)
{
cherokee_buffer_t *trace = arg;
cherokee_buffer_t tmp = CHEROKEE_BUF_INIT;
-
+
cherokee_buffer_add_str (&tmp, "set server.trace ");
cherokee_buffer_add_buffer (&tmp, trace);
cherokee_buffer_add_str (&tmp, "\n");
@@ -672,7 +672,7 @@ set_trace_mode (cherokee_admin_client_t *admin, void *arg)
cherokee_buffer_mrproper (&tmp);
}
-ret_t
+ret_t
cherokee_admin_client_set_trace (cherokee_admin_client_t *admin, cherokee_buffer_t *trace)
{
ret_t ret;
View
2  cherokee/admin_client.h
@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
- */
+ */
#if !defined (CHEROKEE_INSIDE_CHEROKEE_H) && !defined (CHEROKEE_COMPILATION)
# error "Only <cherokee/cherokee.h> can be included directly, this file may disappear or change contents."
View
10 cherokee/admin_request.c
@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
- */
+ */
#include "common-internal.h"
#include "admin_request.h"
@@ -38,17 +38,17 @@ struct cherokee_admin_request {
ret_t cherokee_admin_request_new (cherokee_admin_request_t **req)
{
CHEROKEE_NEW_STRUCT (n, admin_request);
-
+
INIT_LIST_HEAD(&n->list);
cherokee_buffer_init (&n->req);
n->num = 0;
-
+
*req = n;
return ret_ok;
}
-ret_t
+ret_t
cherokee_admin_request_free (cherokee_admin_request_t *req)
{
cherokee_list_content_free (&req->list, free);
@@ -86,7 +86,7 @@ cherokee_admin_request_serialize (cherokee_admin_request_t *req)
/* Clean the list
*/
- cherokee_list_content_free (&req->list, free);
+ cherokee_list_content_free (&req->list, free);
return ret_ok;
}
View
2  cherokee/admin_request.h
@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
- */
+ */
#if !defined (CHEROKEE_INSIDE_CHEROKEE_H) && !defined (CHEROKEE_COMPILATION)
# error "Only <cherokee/cherokee.h> can be included directly, this file may disappear or change contents."
View
50 cherokee/admin_server.c
@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
- */
+ */
#include "common-internal.h"
#include "admin_server.h"
@@ -33,7 +33,7 @@
/* Server Port
*/
-ret_t
+ret_t
cherokee_admin_server_reply_get_port (cherokee_handler_admin_t *ahdl, cherokee_buffer_t *question, cherokee_buffer_t *reply)
{
cherokee_list_t *i;
@@ -67,7 +67,7 @@ cherokee_admin_server_reply_get_port (cherokee_handler_admin_t *ahdl, cherokee_b
}
-ret_t
+ret_t
cherokee_admin_server_reply_set_port (cherokee_handler_admin_t *ahdl, cherokee_buffer_t *question, cherokee_buffer_t *reply)
{
cherokee_server_t *srv = HANDLER_SRV(ahdl);
@@ -82,7 +82,7 @@ cherokee_admin_server_reply_set_port (cherokee_handler_admin_t *ahdl, cherokee_b
/* Server Port TLS
*/
-ret_t
+ret_t
cherokee_admin_server_reply_get_port_tls (cherokee_handler_admin_t *ahdl, cherokee_buffer_t *question, cherokee_buffer_t *reply)
{
cherokee_list_t *i;
@@ -115,7 +115,7 @@ cherokee_admin_server_reply_get_port_tls (cherokee_handler_admin_t *ahdl, cherok
return ret_ok;
}
-ret_t
+ret_t
cherokee_admin_server_reply_set_port_tls (cherokee_handler_admin_t *ahdl, cherokee_buffer_t *question, cherokee_buffer_t *reply)
{
cherokee_server_t *srv = HANDLER_SRV(ahdl);
@@ -130,7 +130,7 @@ cherokee_admin_server_reply_set_port_tls (cherokee_handler_admin_t *ahdl, cherok
/* Get RX/TX
*/
-ret_t
+ret_t
cherokee_admin_server_reply_get_tx (cherokee_handler_admin_t *ahdl, cherokee_buffer_t *question, cherokee_buffer_t *reply)
{
cherokee_server_t *srv = HANDLER_SRV(ahdl);
@@ -138,14 +138,14 @@ cherokee_admin_server_reply_get_tx (cherokee_handler_admin_t *ahdl, cherokee_buf
UNUSED(question);
cherokee_buffer_add_str (reply, "server.tx is ");
- cherokee_buffer_add_fsize (reply,
+ cherokee_buffer_add_fsize (reply,
(srv->collector) ? COLLECTOR_TX(srv->collector) : -1);
return ret_ok;
}
-ret_t
+ret_t
cherokee_admin_server_reply_get_rx (cherokee_handler_admin_t *ahdl, cherokee_buffer_t *question, cherokee_buffer_t *reply)
{
cherokee_server_t *srv = HANDLER_SRV(ahdl);
@@ -153,7 +153,7 @@ cherokee_admin_server_reply_get_rx (cherokee_handler_admin_t *ahdl, cherokee_buf
UNUSED(question);
cherokee_buffer_add_str (reply, "server.tx is ");
- cherokee_buffer_add_fsize (reply,
+ cherokee_buffer_add_fsize (reply,
(srv->collector) ? COLLECTOR_RX(srv->collector) : -1);
return ret_ok;
@@ -165,7 +165,7 @@ cherokee_admin_server_reply_get_rx (cherokee_handler_admin_t *ahdl, cherokee_buf
static void
serialize_connection (cherokee_connection_info_t *info, cherokee_buffer_t *buf)
{
- cherokee_buffer_add_va (buf, "[id=%s,ip=%s,phase=%s",
+ cherokee_buffer_add_va (buf, "[id=%s,ip=%s,phase=%s",
info->id.buf,
info->ip.buf,
info->phase.buf);
@@ -193,7 +193,7 @@ serialize_connection (cherokee_connection_info_t *info, cherokee_buffer_t *buf)
if (!cherokee_buffer_is_empty(&info->percent)) {
cherokee_buffer_add_va (buf, ",percent=%s", info->percent.buf);
}
-
+
if (!cherokee_buffer_is_empty(&info->icon)) {
cherokee_buffer_add_va (buf, ",icon=%s", info->icon.buf);
}
@@ -219,7 +219,7 @@ cherokee_admin_server_reply_get_connections (cherokee_handler_admin_t *ahdl, che
case ret_ok:
break;
case ret_not_found:
- cherokee_buffer_add_str (reply, "server.connections are \n");
+ cherokee_buffer_add_str (reply, "server.connections are \n");
return ret_ok;
case ret_error:
return ret_error;
@@ -233,10 +233,10 @@ cherokee_admin_server_reply_get_connections (cherokee_handler_admin_t *ahdl, che
cherokee_buffer_add_str (reply, "server.connections are ");
list_for_each (i, &connections) {
cherokee_connection_info_t *conn = CONN_INFO(i);
-
+
/* It won't include details about the admin requests
*/
- if (!cherokee_buffer_is_empty (&conn->handler) &&
+ if (!cherokee_buffer_is_empty (&conn->handler) &&
(!strcmp(conn->handler.buf, "admin"))) {
continue;
}
@@ -256,13 +256,13 @@ cherokee_admin_server_reply_get_connections (cherokee_handler_admin_t *ahdl, che
}
-ret_t
+ret_t
cherokee_admin_server_reply_del_connection (cherokee_handler_admin_t *ahdl, cherokee_buffer_t *question, cherokee_buffer_t *reply)
{
ret_t ret;
char *begin;
cherokee_server_t *server = HANDLER_SRV(ahdl);
-
+
if (strncmp (question->buf, "del server.connection ", 22)) {
return ret_error;
}
@@ -275,9 +275,9 @@ cherokee_admin_server_reply_del_connection (cherokee_handler_admin_t *ahdl, cher
}
-ret_t
+ret_t
cherokee_admin_server_reply_get_thread_num (cherokee_handler_admin_t *ahdl, cherokee_buffer_t *question, cherokee_buffer_t *reply)
-{
+{
cherokee_server_t *srv = HANDLER_SRV(ahdl);
UNUSED(question);
@@ -287,7 +287,7 @@ cherokee_admin_server_reply_get_thread_num (cherokee_handler_admin_t *ahdl, cher
}
-ret_t
+ret_t
cherokee_admin_server_reply_set_backup_mode (cherokee_handler_admin_t *ahdl, cherokee_buffer_t *question, cherokee_buffer_t *reply)
{
ret_t ret;
@@ -297,14 +297,14 @@ cherokee_admin_server_reply_set_backup_mode (cherokee_handler_admin_t *ahdl, che
/* Read if the resquest if for turning it on or off
*/
- if (cherokee_buffer_cmp_str (question, "set server.backup_mode on") == 0) {
+ if (cherokee_buffer_cmp_str (question, "set server.backup_mode on") == 0) {
mode = true;
- } else if (cherokee_buffer_cmp_str (question, "set server.backup_mode off") == 0) {
+ } else if (cherokee_buffer_cmp_str (question, "set server.backup_mode off") == 0) {
mode = false;
} else {
return ret_error;
}
-
+
/* Do it
*/
ret = cherokee_server_set_backup_mode (srv, mode);
@@ -314,7 +314,7 @@ cherokee_admin_server_reply_set_backup_mode (cherokee_handler_admin_t *ahdl, che
*/
cherokee_server_get_backup_mode (srv, &active);
- if (active)
+ if (active)
cherokee_buffer_add_str (reply, "server.backup_mode is on\n");
else
cherokee_buffer_add_str (reply, "server.backup_mode is off\n");
@@ -326,7 +326,7 @@ cherokee_admin_server_reply_set_backup_mode (cherokee_handler_admin_t *ahdl, che
/* Trace
*/
-ret_t
+ret_t
cherokee_admin_server_reply_get_trace (cherokee_handler_admin_t *ahdl, cherokee_buffer_t *question, cherokee_buffer_t *reply)
{
ret_t ret;
@@ -348,7 +348,7 @@ cherokee_admin_server_reply_get_trace (cherokee_handler_admin_t *ahdl, cherokee_
}
-ret_t
+ret_t
cherokee_admin_server_reply_set_trace (cherokee_handler_admin_t *ahdl, cherokee_buffer_t *question, cherokee_buffer_t *reply)
{
ret_t ret;
View
2  cherokee/admin_server.h
@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
- */
+ */
#ifndef CHEROKEE_ADMIN_SERVER_H
#define CHEROKEE_ADMIN_SERVER_H</