The option is exposed through the ZAP API, it can be enabled with:
http://zap/JSON/core/action/setOptionHttpStateEnabled/?Boolean=true
> Because without this option the spider never finishes in my case.
Could you provide more details about this? Does the spider continue
finding new pages?