How to read client cookies in ejabberd hooks?

I have a perl script as the ejabberd hook for external authentication ("extauth_program").
My http-bind requests carry a cookie set in the browser and I want to read the value of this cookie in my perl script.
How do I do it?
Any help on this regard would be great.

Additional Info:
I cannot read this cookie in the browser and send it as part of the body (packet).
The reason is that this cookie is a http-only cookie and cannot be read at the browser.

Syndicate content