summaryrefslogtreecommitdiff
path: root/lib/icap/header.cpp
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2019-01-14 09:30:45 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2019-01-14 09:30:45 +0100
commit6a41902025fcc615341bf053f7aa93009dc3b6bd (patch)
tree28064370941ed2fdd421be15f4cc1be6ec878505 /lib/icap/header.cpp
parent80e6d50ae13dbfe1e4333888431eb21d3d9e926f (diff)
parentbd036dfa689f13fd9ccd6da72764ca3d21ba7793 (diff)
Merge branch 'release/debian/2.0.3-1'HEADdebian/2.0.3-1master
Diffstat (limited to 'lib/icap/header.cpp')
-rw-r--r--lib/icap/header.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/icap/header.cpp b/lib/icap/header.cpp
index 493e659..ca72bc8 100644
--- a/lib/icap/header.cpp
+++ b/lib/icap/header.cpp
@@ -140,20 +140,17 @@ namespace icap {
* OPTIONS response encapsulated_list: optbody
*/
- Header::encapsulated_header_index_t idx;
std::string encaps_header = "";
- // FIXME: chances are that we will always get the correct order
- // but should consider sorting
- for ( idx = _encapsulated.begin(); idx != _encapsulated.end(); idx++ ) {
+ for ( auto& idx : sort_encapsulated_header() ) {
- if ( idx->second > 0 ) {
+ if ( idx.second >= 0 ) {
if ( encaps_header != "" ) {
encaps_header.append( ", " );
}
- encaps_header.append( idx->first ).append( "=" ).append( util::itoa( idx->second ) );
+ encaps_header.append( idx.first ).append( "=" ).append( util::itoa( idx.second ) );
}