summaryrefslogtreecommitdiff
path: root/lib/icap/header.cpp
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2019-01-12 13:20:01 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2019-01-12 13:20:01 +0100
commit35790c09ea8ad999e632246185d629b480d59b80 (patch)
tree13d4e1d0e90f598da02eb83e5f2f1c6d28b37e11 /lib/icap/header.cpp
parent18547ece59a9977139678f683db4c990b1907eab (diff)
parente691b65ce3c82cf3781e8d02e92a4a2af07c5b20 (diff)
Update upstream source from tag 'upstream/2.0.3'
Update to upstream version '2.0.3' with Debian dir 4066aff3b63124e17135fb5d81fdb32a06f54676
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 ) );
}