Changeset 54c26d57dca4b2b36780e272e53076784546863a for src/modules-lua
- Timestamp:
- 03/01/10 23:36:34 (8 years ago)
- git-parent:
- Files:
-
- src/modules-lua/noit/module/http.lua (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
src/modules-lua/noit/module/http.lua
rcc06538 r54c26d5 207 207 local starttime = noit.timeval.now() 208 208 local method = check.config.method or "GET" 209 local max_len = 80 209 210 210 211 -- expect the worst … … 342 343 if check.config.body ~= nil then 343 344 local bodyre = noit.pcre(check.config.body) 344 if bodyre ~= nil and bodyre(output) then 345 local rv, m, m1 = bodyre(output or '') 346 if rv then 347 m = m1 or m or output 348 if string.len(m) > max_len then 349 m = string.sub(m,1,max_len) 350 end 345 351 status = status .. ',body=matched' 352 check.metric_string('body_match', m) 346 353 else 347 354 status = status .. ',body=failed' 355 check.metric_string('body_match', nil) 348 356 good = false 349 357 end