correct iteration through HTTPRequest::postData and proper initialization of environment variables