def checkClient
logger.debug('checkClient http_accept header:')
logger.debug(request.env['HTTP_ACCEPT'])
if request.env['HTTP_MOBIO_AGENT'] or request.env['HTTP_ACCEPT']=~/application\/pxml/
@client="xf"
elsif ((request.env['HTTP_ACCEPT']=~/wml/) ||
(request.env['HTTP_ACCEPT']=~/wap/) )
@client="wap"
elsif (request.env['HTTP_ACCEPT']=~/application\/xhtml/)
@client = "xhtml"
else
@client="html"
end
@xml = TransformerFactory::get_transformer(@client)
if @client == "xf"
headers.delete("Cache-Control")
headers['Content-Type']="application/mform"
@body = request.body.read.to_s if request.body
if request.env['REQUEST_METHOD'] == "POST" and @body
paramsFromXml(@body,'data')
end
end
@client_version = request.env['HTTP_CLIENT_INFO_URL']? '0.8' : '0.6'
@client_family = request.env['HTTP_MOBIO_AGENT']=~/WM5/? 'wm': 'other'
@user_id=request.env['HTTP_USERID']
if (@user_id.nil?)
@user_id="101"
end
end