code: public static RedirectionAction buildRedirectUrlAction(final WebContext context, final String location) {
          if (ContextHelper.isPost(context) && useModernHttpCodes) {
              return new SeeOtherAction(location);
          } else {
              return new FoundAction(location);
          }
      }
docs: Build the appropriate redirection action for a location.
  
  @param context the web context
  @param location the location
  @return the appropriate redirection action