You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2013/03/22 11:11:44 UTC
svn commit: r1459692 -
/syncope/branches/1_0_X/console/src/main/resources/applicationContext.xml
Author: ilgrosso
Date: Fri Mar 22 10:11:43 2013
New Revision: 1459692
URL: http://svn.apache.org/r1459692
Log:
[SYNCOPE-342] Adding default header for HttpClient
Modified:
syncope/branches/1_0_X/console/src/main/resources/applicationContext.xml
Modified: syncope/branches/1_0_X/console/src/main/resources/applicationContext.xml
URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/resources/applicationContext.xml?rev=1459692&r1=1459691&r2=1459692&view=diff
==============================================================================
--- syncope/branches/1_0_X/console/src/main/resources/applicationContext.xml (original)
+++ syncope/branches/1_0_X/console/src/main/resources/applicationContext.xml Fri Mar 22 10:11:43 2013
@@ -16,7 +16,6 @@ software distributed under the License i
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -26,15 +25,15 @@ under the License.
xmlns:oxm="http://www.springframework.org/schema/oxm"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context.xsd
- http://www.springframework.org/schema/oxm
- http://www.springframework.org/schema/oxm/spring-oxm.xsd
- http://www.springframework.org/schema/tx
- http://www.springframework.org/schema/tx/spring-tx.xsd
- http://www.springframework.org/schema/aop
- http://www.springframework.org/schema/aop/spring-aop.xsd">
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context.xsd
+ http://www.springframework.org/schema/oxm
+ http://www.springframework.org/schema/oxm/spring-oxm.xsd
+ http://www.springframework.org/schema/tx
+ http://www.springframework.org/schema/tx/spring-tx.xsd
+ http://www.springframework.org/schema/aop
+ http://www.springframework.org/schema/aop/spring-aop.xsd">
<context:component-scan base-package="org.apache.syncope.console.rest"/>
@@ -70,6 +69,11 @@ under the License.
<bean id="httpClientConnManager" class="org.apache.http.impl.conn.PoolingClientConnectionManager"/>
+ <bean id="httpHostHeader" class="org.apache.http.message.BasicHeader">
+ <constructor-arg value="Host"/>
+ <constructor-arg value="${host}"/>
+ </bean>
+
<bean id="httpClientParams" class="org.apache.syncope.client.http.HttpClientParams">
<property name="parameterMap">
<map key-type="java.lang.String">
@@ -85,6 +89,14 @@ under the License.
</key>
<value type="java.lang.String">UTF-8</value>
</entry>
+ <entry>
+ <key>
+ <value>http.default-headers</value>
+ </key>
+ <list>
+ <ref bean="httpHostHeader"/>
+ </list>
+ </entry>
</map>
</property>
</bean>