DAVResourceAccess.cxx (c1c10f68) | DAVResourceAccess.cxx (6601ee31) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 1103 unchanged lines hidden (view full) --- 1112//========================================================================= 1113// static 1114void DAVResourceAccess::getUserRequestHeaders( 1115 const uno::Reference< ucb::XCommandEnvironment > & xEnv, 1116 const rtl::OUString & rURI, 1117 const rtl::OUString & rMethod, 1118 DAVRequestHeaders & rRequestHeaders ) 1119{ | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 1103 unchanged lines hidden (view full) --- 1112//========================================================================= 1113// static 1114void DAVResourceAccess::getUserRequestHeaders( 1115 const uno::Reference< ucb::XCommandEnvironment > & xEnv, 1116 const rtl::OUString & rURI, 1117 const rtl::OUString & rMethod, 1118 DAVRequestHeaders & rRequestHeaders ) 1119{ |
1120 if ( xEnv.is() ) 1121 { 1122 uno::Reference< ucb::XWebDAVCommandEnvironment > xDAVEnv( 1123 xEnv, uno::UNO_QUERY ); | 1120 if ( !xEnv.is() ) 1121 return; |
1124 | 1122 |
1125 if ( xDAVEnv.is() ) 1126 { 1127 uno::Sequence< beans::NamedValue > aRequestHeaders 1128 = xDAVEnv->getUserRequestHeaders( rURI, rMethod ); | 1123 uno::Reference< ucb::XWebDAVCommandEnvironment > xDAVEnv( 1124 xEnv, uno::UNO_QUERY ); |
1129 | 1125 |
1130 for ( sal_Int32 n = 0; n < aRequestHeaders.getLength(); ++n ) 1131 { 1132 rtl::OUString aValue; 1133 sal_Bool isString = aRequestHeaders[ n ].Value >>= aValue; | 1126 if ( !xDAVEnv.is() ) 1127 return; |
1134 | 1128 |
1135 if ( !isString ) 1136 { 1137 OSL_ENSURE( isString, 1138 "DAVResourceAccess::getUserRequestHeaders :" 1139 "Value is not a string! Ignoring..." ); 1140 } | 1129 uno::Sequence< beans::NamedValue > aRequestHeaders 1130 = xDAVEnv->getUserRequestHeaders( rURI, rMethod ); |
1141 | 1131 |
1142 rRequestHeaders.push_back( 1143 DAVRequestHeader( aRequestHeaders[ n ].Name, aValue ) ); 1144 } | 1132 for ( sal_Int32 n = 0; n < aRequestHeaders.getLength(); ++n ) 1133 { 1134 rtl::OUString aValue; 1135 sal_Bool isString = aRequestHeaders[ n ].Value >>= aValue; 1136 1137 if ( !isString ) 1138 { 1139 OSL_ENSURE( isString, 1140 "DAVResourceAccess::getUserRequestHeaders :" 1141 "Value is not a string! Ignoring..." ); 1142 continue; |
1145 } | 1143 } |
1144 1145 rRequestHeaders.push_back( 1146 DAVRequestHeader( aRequestHeaders[ n ].Name, aValue ) ); |
|
1146 } 1147} 1148 1149//========================================================================= 1150sal_Bool DAVResourceAccess::detectRedirectCycle( 1151 const rtl::OUString& rRedirectURL ) 1152 throw ( DAVException ) 1153{ --- 68 unchanged lines hidden --- | 1147 } 1148} 1149 1150//========================================================================= 1151sal_Bool DAVResourceAccess::detectRedirectCycle( 1152 const rtl::OUString& rRedirectURL ) 1153 throw ( DAVException ) 1154{ --- 68 unchanged lines hidden --- |