Forwarding HTTP error codes to the client

Now you can forward additional HTTP error codes to the client. By default, only codes >=200 < 400 are forwarded, and codes that fall outside of this range automatically get changed to a 404 File Not Found error. The only exception is code 401 (unauthorized), which results in 403 Forbidden unless the basic-auth-support attribute is enabled for that specific request. For more information, see Enabling support for Basic Authentication in this same topic.

You can forward codes >= 400 with a message by setting the forward-http-errors meta parameter in MashupCenter_install_root\\mm\\config\\proxy-config.xml, for example:

<proxy-rules

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:proxy="http://www.ibm.com/xmlns/prod/sw/ajax/proxy-config/1.1">

<proxy:mapping contextpath="/proxy/*" />

<proxy:policy url="*" acf="none">

<proxy:actions>

<proxy:method>GET</proxy:method>

</proxy:actions>

</proxy:policy>

<proxy:meta-data>

<proxy:name>forward-http-errors</proxy:name>

<proxy:value>true</proxy:value>

</proxy:meta-data>

</proxy-rules>

Note: If an unexpected code below 200 occurs, for example 100, then the proxy will respond with a 500 Internal Server Error because 1xx codes should only be sent in Connection-Keep-Alive mode.

Enabling support for Basic Authentication

Now, you can enable support for Basic Authentication by setting a basic-auth-support attribute for a policy in MashupCenter_install_root\\mm\\config\\proxy-config.xml, for example:

<proxy-rules

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:proxy="http://www.ibm.com/xmlns/prod/sw/ajax/proxy-config/1.1">

<proxy:mapping contextpath="/proxy/*" />

<proxy:policy url="*" acf="none" basic-auth-support="true">

<proxy:actions>

<proxy:method>GET</proxy:method>

</proxy:actions>

</proxy:policy>

</proxy-rules>

In this example, the proxy will automatically forward the necessary HTTP status and error codes as well as the needed headers to the target host and then back to the client.

Note: Currently, the Basic Authentication mechanism is the only HTTP authentication method supported by the proxy.