summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2011-10-12 12:57:13 +0000
committerTed Trask <ttrask01@yahoo.com>2011-10-12 12:57:13 +0000
commita2e1425816cc3811d21a904b15dd453e13819dc2 (patch)
tree6594df284858fa0b6b8d677f95e5f7300fc4910e
parente0681a6e6a04f45898734b70f937905769e64d75 (diff)
downloadacf-provisioning-a2e1425816cc3811d21a904b15dd453e13819dc2.tar.bz2
acf-provisioning-a2e1425816cc3811d21a904b15dd453e13819dc2.tar.xz
Polycom -directory files are handled differently on upload
-rwxr-xr-xcgi-bin/provisioning.cgi10
1 files changed, 6 insertions, 4 deletions
diff --git a/cgi-bin/provisioning.cgi b/cgi-bin/provisioning.cgi
index 640294a..f374f4c 100755
--- a/cgi-bin/provisioning.cgi
+++ b/cgi-bin/provisioning.cgi
@@ -86,13 +86,13 @@ if ( request_method == "GET" ) then
os.exit()
end
- -- If it's a Polycom, 404 the MAC.cfg, MAC-directory.xml, and MAC-license files and redirect the MAC-phone.cfg and MAC-web.cfg files to blanks
+ -- If it's a Polycom, 404 the MAC.cfg, MAC-directory.xml, and MAC-license files and redirect the MAC-phone.cfg and MAC-web.cfg files to blanks
local f = string.match(basename, mac.."(.*)")
- if string.match(user_agent, "Polycom") and (f==".cfg" or f=="-directory.xml" or f=="-license.cfg" or mac=="000000000000") then
+ if string.match(user_agent, "Polycom") and (f==".cfg" or f=="-directory.xml" or f=="-license.cfg" or mac=="000000000000") then
http_code(404)
log:close()
os.exit()
- elseif string.match(user_agent, "Polycom") and (f=="-phone.cfg" or f=="-web.cfg") then
+ elseif string.match(user_agent, "Polycom") and (f=="-phone.cfg" or f=="-web.cfg") then
http_code(302)
log:close()
os.exit()
@@ -139,8 +139,10 @@ elseif ( request_method == "PUT" ) then
os.exit()
end
+ -- If it's a Polycom, do not pass the MAC-directory.xml file to ACF
-- Don't bother for .log files
- if not string.match(path_info, "%.log$") then
+ local f = string.match(basename, mac.."(.*)")
+ if not (string.match(user_agent, "Polycom") and f=="-directory.xml") and not string.match(path_info, "%.log$") then
log:write("Checking PROV Table for results\n")
-- Load the ACF mvc
local PATH = package.path