Skip to content

Commit

Permalink
- Filtro de forward no recibia los parametros de Querystring en REST API
Browse files Browse the repository at this point in the history
  Issue 104793
  • Loading branch information
AlejandroP committed Dec 13, 2023
1 parent 932b9a6 commit ac92229
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion java/src/main/java/com/genexus/filters/APIObjectFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ public class APIObjectFilter extends Filter {
private ArrayList<String> appPath = new ArrayList<String>();
static final String PRIVATE_DIR="private";
static final String WEB_INFO="WEB-INF";
static final String REST_SUBPART = "/rest/";
static final String QS_SEP = "?";

public static final Logger logger = LogManager.getLogger(APIObjectFilter.class);

public void doFilter(IServletRequest request, IServletResponse response, IFilterChain chain) throws Exception {
Expand All @@ -36,7 +39,11 @@ public void doFilter(IServletRequest request, IServletResponse response, IFilte
}
}
if(isPath) {
String fwdURI = "/rest/" + path;
String fwdURI = REST_SUBPART + path;
String qString = httpRequest.getQueryString();
if ( qString != null && !qString.isEmpty()) {
fwdURI = fwdURI + QS_SEP + qString;
}
logger.info("Forwarding from " + path +" to: " + fwdURI) ;
httpRequest.getRequestDispatcher(fwdURI).forward(request,response);
}
Expand Down

0 comments on commit ac92229

Please sign in to comment.