Please, I would like to ask you to use a different name for the local variable target_uri. Since it's a name already used on Msf::Exploit::Remote::HttpClient, using a different name here would help to avoid confusion.