#define dout_context g_ceph_context
#define dout_subsys ceph_subsys_rgw
+using namespace std;
+
void RGWCORSRule::dump_origins() {
unsigned num_origins = allowed_origins.size();
dout(10) << "Allowed origins : " << num_origins << dendl;
- for(set<string>::iterator it = allowed_origins.begin();
- it != allowed_origins.end();
- ++it) {
- dout(10) << *it << "," << dendl;
+ for(auto& origin : allowed_origins) {
+ dout(10) << origin << "," << dendl;
}
}
if (s.length() > 0)
s.append(",");
// these values are sent to clients in a 'Access-Control-Expose-Headers'
- // response header, so we escape '\n' and '\r' to avoid header injection
- std::string tmp = boost::replace_all_copy(header, "\n", "\\n");
- boost::replace_all_copy(std::back_inserter(s), tmp, "\r", "\\r");
+ // response header, so we escape '\n' to avoid header injection
+ boost::replace_all_copy(std::back_inserter(s), header, "\n", "\\n");
}
}