Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing favicon implementation from the PassThroughNHttpGetProcessor #3863

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading