net: clear input request headers map before saving response headers
@@ -540,6 +540,8 @@ void rho::net::JNINetRequest::getResponseHeader(rho::Hashtable<rho::String, rho:
if(keys.get()) JArraytoVectorString(keys, v_keys);
if(values.get()) JArraytoVectorString(values, v_values);
+ headers.clear();
+
if(v_keys.size() == v_values.size()) {
for(size_t i = 0; i < v_keys.size(); ++i) {
headers.emplace(v_keys[i], v_values[i]);
