diff --git a/components/mediation/extensions/org.wso2.micro.integrator.transport.handlers/src/main/java/org/wso2/micro/integrator/transport/handlers/Axis2HttpGetRequestProcessor.java b/components/mediation/extensions/org.wso2.micro.integrator.transport.handlers/src/main/java/org/wso2/micro/integrator/transport/handlers/Axis2HttpGetRequestProcessor.java index 21b6f46ff9..1a12f1a9fd 100644 --- a/components/mediation/extensions/org.wso2.micro.integrator.transport.handlers/src/main/java/org/wso2/micro/integrator/transport/handlers/Axis2HttpGetRequestProcessor.java +++ b/components/mediation/extensions/org.wso2.micro.integrator.transport.handlers/src/main/java/org/wso2/micro/integrator/transport/handlers/Axis2HttpGetRequestProcessor.java @@ -64,9 +64,7 @@ public void process(HttpCarbonMessage inboundCarbonMsg, MessageContext messageCo // Handle browser request to get favicon while requesting for wsdl if (uri.equals(FAVICON_ICO)) { - outboundCarbonMsg.setHttpStatusCode(HttpStatus.SC_MOVED_PERMANENTLY); - outboundCarbonMsg.setHeader(HTTPConstants.HEADER_LOCATION, FAVICON_ICO_URL); - + outboundCarbonMsg.setHttpStatusCode(HttpStatus.SC_NOT_FOUND); submitResponseAndHideExceptions(inboundCarbonMsg, outboundCarbonMsg, new byte[0]); isRequestHandled = true; diff --git a/components/mediation/extensions/org.wso2.micro.integrator.transport.handlers/src/main/java/org/wso2/micro/integrator/transport/handlers/PassThroughNHttpGetProcessor.java b/components/mediation/extensions/org.wso2.micro.integrator.transport.handlers/src/main/java/org/wso2/micro/integrator/transport/handlers/PassThroughNHttpGetProcessor.java index d58668ae1e..33f0ab35fc 100644 --- a/components/mediation/extensions/org.wso2.micro.integrator.transport.handlers/src/main/java/org/wso2/micro/integrator/transport/handlers/PassThroughNHttpGetProcessor.java +++ b/components/mediation/extensions/org.wso2.micro.integrator.transport.handlers/src/main/java/org/wso2/micro/integrator/transport/handlers/PassThroughNHttpGetProcessor.java @@ -167,16 +167,16 @@ public void process(HttpRequest request, HttpResponse response, boolean loadBalancer = Boolean.parseBoolean(System.getProperty("wso2.loadbalancer", "false")); // Handle browser request to get favicon while requesting for wsdl if (uri.equals(FAVICON_ICO)) { - response.setStatusCode(HttpStatus.SC_MOVED_PERMANENTLY); - response.addHeader("Location", FAVICON_ICO_URL); + response.setStatusCode(HttpStatus.SC_NOT_FOUND); SourceContext.updateState(conn, ProtocolState.WSDL_RESPONSE_DONE); try { outputStream.flush(); outputStream.close(); } catch (Exception ignore) { + } finally { + sourceHandler.commitResponseHideExceptions(conn, response); + isRequestHandled = true ; } - sourceHandler.commitResponseHideExceptions(conn, response); - isRequestHandled = true ; } else if(uri.startsWith(servicePath) && (serviceName == null || serviceName.length() == 0)){ //check if service listing request is blocked