Tapestry
  1. Tapestry
  2. TAPESTRY-1627

Start page redirect requests can return an empty response.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.5
    • Fix Version/s: 5.0.7
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      A Start page redirect request will produce an empty response if the request URL was root, e.g: http://localhost:8080/myapp/
      It will succeed only if the URL maps to the Start page, eg: http://localhost:8080/myapp/start

      It looks like just a couple of lines need to be (changed/added) in org.apache.tapestry.internal.services.RootPathDispatcher.dispatch()
      [Marked by -/+ below.]

      public boolean dispatch(Request request, final Response response) throws IOException
      {
      // Only match the root path

      if (!request.getPath().equals("/")) return false;

      if (_componentClassResolver.isPageName(_startPageName))

      { - _handler.handle(_startPageName, _emptyContext); + ActionResponseGenerator responseGenerator = _handler.handle(pageName, context); + if (responseGenerator != null) responseGenerator.sendClientResponse(response); return true; }

      return false;
      }

      Cheers,
      Nick.

        Issue Links

          Activity

          Nick Westgate created issue -
          Nick Westgate made changes -
          Field Original Value New Value
          Attachment TAPESTRY-1627.patch [ 12364217 ]
          Finn Kennedy made changes -
          Link This issue is duplicated by TAPESTRY-1814 [ TAPESTRY-1814 ]
          Howard M. Lewis Ship made changes -
          Assignee Howard M. Lewis Ship [ hlship ]
          Howard M. Lewis Ship made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Howard M. Lewis Ship made changes -
          Status In Progress [ 3 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Fix Version/s 5.0.7 [ 12312802 ]
          Mark Thomas made changes -
          Workflow jira [ 12407537 ] Default workflow, editable Closed status [ 12568377 ]
          Mark Thomas made changes -
          Workflow Default workflow, editable Closed status [ 12568377 ] jira [ 12590069 ]

            People

            • Assignee:
              Howard M. Lewis Ship
              Reporter:
              Nick Westgate
            • Votes:
              8 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development