Commit f3ee6297 authored by Aleksandr Konstantinov's avatar Aleksandr Konstantinov
Browse files

Handle multiple Accepts HTTP headers.

parent abaa6025
Pipeline #10288 failed with stage
in 98 minutes and 21 seconds
......@@ -445,7 +445,7 @@ static Arc::MCC_Status HTTPPOSTResponse(Arc::Message& inmsg, Arc::Message& outms
static ResponseFormat ProcessAcceptedFormat(Arc::Message& inmsg, Arc::Message& outmsg) {
// text/html, application/xhtml+xml, application/xml;q=0.9, image/webp, */*;q=0.8
std::list<std::string> accepts;
tokenize(inmsg.Attributes()->get("HTTP:accept"), accepts, ",");
for(Arc::AttributeIterator attrIt = inmsg.Attributes()->getAll("HTTP:accept"); attrIt.hasMore(); ++attrIt) tokenize(*attrIt, accepts, ",");
for(std::list<std::string>::iterator acc = accepts.begin(); acc != accepts.end(); ++acc) {
*acc = Arc::trim(*acc, " ");
std::string::size_type pos = acc->find_first_of(';');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment