summaryrefslogtreecommitdiff
path: root/ucb/source/ucp/webdav-neon/NeonSession.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'ucb/source/ucp/webdav-neon/NeonSession.cxx')
-rw-r--r--ucb/source/ucp/webdav-neon/NeonSession.cxx66
1 files changed, 33 insertions, 33 deletions
diff --git a/ucb/source/ucp/webdav-neon/NeonSession.cxx b/ucb/source/ucp/webdav-neon/NeonSession.cxx
index 4773514cd3fa..b914f41cd903 100644
--- a/ucb/source/ucp/webdav-neon/NeonSession.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonSession.cxx
@@ -2007,47 +2007,47 @@ void runResponseHeaderHandler( void * userdata,
OUString aHeader(value, strlen(value), RTL_TEXTENCODING_ASCII_US);
sal_Int32 nPos = aHeader.indexOf( ':' );
- if ( nPos != -1 )
- {
- OUString aHeaderName( aHeader.copy( 0, nPos ) );
+ if ( nPos == -1 )
+ return;
- NeonRequestContext * pCtx
- = static_cast< NeonRequestContext * >( userdata );
+ OUString aHeaderName( aHeader.copy( 0, nPos ) );
- // Note: Empty vector means that all headers are requested.
- bool bIncludeIt = pCtx->pHeaderNames->empty();
+ NeonRequestContext * pCtx
+ = static_cast< NeonRequestContext * >( userdata );
- if ( !bIncludeIt )
- {
- // Check whether this header was requested.
- auto it = std::find_if(pCtx->pHeaderNames->cbegin(), pCtx->pHeaderNames->cend(),
- [&aHeaderName](const OUString& rName) {
- // header names are case insensitive
- return rName.equalsIgnoreAsciiCase( aHeaderName ); });
+ // Note: Empty vector means that all headers are requested.
+ bool bIncludeIt = pCtx->pHeaderNames->empty();
- if ( it != pCtx->pHeaderNames->end() )
- {
- aHeaderName = *it;
- bIncludeIt = true;
- }
- }
+ if ( !bIncludeIt )
+ {
+ // Check whether this header was requested.
+ auto it = std::find_if(pCtx->pHeaderNames->cbegin(), pCtx->pHeaderNames->cend(),
+ [&aHeaderName](const OUString& rName) {
+ // header names are case insensitive
+ return rName.equalsIgnoreAsciiCase( aHeaderName ); });
- if ( bIncludeIt )
+ if ( it != pCtx->pHeaderNames->end() )
{
- // Create & set the PropertyValue
- DAVPropertyValue thePropertyValue;
- // header names are case insensitive, so are the
- // corresponding property names.
- thePropertyValue.Name = aHeaderName.toAsciiLowerCase();
- thePropertyValue.IsCaseSensitive = false;
-
- if ( nPos < aHeader.getLength() )
- thePropertyValue.Value <<= aHeader.copy( nPos + 1 ).trim();
-
- // Add the newly created PropertyValue
- pCtx->pResource->properties.push_back( thePropertyValue );
+ aHeaderName = *it;
+ bIncludeIt = true;
}
}
+
+ if ( !bIncludeIt )
+ return;
+
+ // Create & set the PropertyValue
+ DAVPropertyValue thePropertyValue;
+ // header names are case insensitive, so are the
+ // corresponding property names.
+ thePropertyValue.Name = aHeaderName.toAsciiLowerCase();
+ thePropertyValue.IsCaseSensitive = false;
+
+ if ( nPos < aHeader.getLength() )
+ thePropertyValue.Value <<= aHeader.copy( nPos + 1 ).trim();
+
+ // Add the newly created PropertyValue
+ pCtx->pResource->properties.push_back( thePropertyValue );
}
} // namespace