HandyCache форум

Главная категория => English forum => Тема начата: truefriend-cz от 04 Июль 2017, 11:02:31



Название: SSL Handling check
Отправлено: truefriend-cz от 04 Июль 2017, 11:02:31
Hi users. I testing script for check SSL handling but i have problem apply:

Код:
if hc.ssl_handling == "on" then
hc.put_msg(1, 'SSL ON')
else
hc.put_msg(1, 'SSL OFF')
end

Output is only SSL OFF

Variant with hc.ssl_handling_on or hc.sslhandling_on it also does not work.
How i can use?


Название: Re: SSL Handling check
Отправлено: truefriend-cz от 06 Июль 2017, 02:59:57
I modify script by documentation to:

Код:
if hc.ssl_handling_enabled == "true" then
hc.put_msg(1, 'Yes')
else
hc.put_msg(1, 'No')
end

but no returns the status of processing options SSL. (version with on and off no working)
What is wrong?


Название: Re: SSL Handling check
Отправлено: mai62 от 06 Июль 2017, 13:35:11
I don't know which documentation you looked. In the file HCExtensions.html a usage example.
Код:
en=hc.ssl_handling_enabled('https://mail.ru', 'Boss')
hc.ssl_handling_enabled is not a variable. hc.ssl_handling_enabled is a function. Therefore, it is necessary to use
Код:
if hc.ssl_handling_enabled() == true then
The word true should be without quotes. With quotes you get the string. And the function returns a Boolean value.


Название: Re: SSL Handling check
Отправлено: truefriend-cz от 07 Июль 2017, 12:17:45
Thank you, it is solving.


Название: Re: SSL Handling check
Отправлено: hc.addict от 24 Ноябрь 2017, 20:19:47
I don't know which documentation you looked. In the file HCExtensions.html a usage example.
Код:
en=hc.ssl_handling_enabled('https://mail.ru', 'Boss')
hc.ssl_handling_enabled is not a variable. hc.ssl_handling_enabled is a function. Therefore, it is necessary to use
Код:
if hc.ssl_handling_enabled() == true then
The word true should be without quotes. With quotes you get the string. And the function returns a Boolean value.

@mai62

In what particular event this code is applicable.

Greetings.