Tapestry
  1. Tapestry
  2. TAPESTRY-2095

Incorrect optimization for requests that contain a colon but do not contain a slash

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.8, 5.0.9
    • Fix Version/s: 5.0.10
    • Component/s: Core Components
    • Labels:
      None
    • Environment:
      MacOS X, Jetty, Eclipse

      Description

      I have a dynamically created image from a service on my page.

      The method to create the link is as follows
      public Link getBPURL(){
      return getResources().createActionLink("BPGraph", false, new Object[] { });
      }

      This is how the .tml part looks
      <img id="bpimg" class="dia_img" src="$

      {BPURL}

      " width="800" height="400"/>

      And this is the resulting html code
      <img class="dia_img" height="400" id="bpimg" src="databp:BPGraph" width="800">

      The browser refuses to render an image since it considers the URL "databp:BPGraph" as invalid (which I can somehow understand).

      If I add a dummy parameter in the method that creates the Link
      public Link getBPURL(){
      return getResources().createActionLink("BPGraph", false, new Object[]

      { 1 }

      );
      }
      the rendered html looks like this
      <img class="dia_img" height="400" id="bpimg" src="./databp:BPGraph/1" width="800">

      This is OK for my browser. But I would consider it a but in the way tapestry (since 5.0.8) shortens the URLs.

        Activity

        Hide
        Howard M. Lewis Ship added a comment -

        Are you saying

        1) The URL is incorrect

        2) The URL is valid, but the browser refuses to use it

        3) The browser sends the request for the URL but does not render the result

        I think I can rule out #1, but from your description it isn't clear whether the problem is #2 or #3.

        Show
        Howard M. Lewis Ship added a comment - Are you saying 1) The URL is incorrect 2) The URL is valid, but the browser refuses to use it 3) The browser sends the request for the URL but does not render the result I think I can rule out #1, but from your description it isn't clear whether the problem is #2 or #3.
        Hide
        Moritz Gmelin added a comment -

        I'd say #1, src="databp:BPGraph" is not a valid URL in my Opinion. And none of the browsers I used to test can render it.

        URL ./databp:BPGraph are accepted by Firefox and Safari although I think it is very optimistic to think that all browsers will render this correctly.

        Show
        Moritz Gmelin added a comment - I'd say #1, src="databp:BPGraph" is not a valid URL in my Opinion. And none of the browsers I used to test can render it. URL ./databp:BPGraph are accepted by Firefox and Safari although I think it is very optimistic to think that all browsers will render this correctly.
        Hide
        Howard M. Lewis Ship added a comment -

        Found a bug where a path without a slash will not be prefixed with "./" even if it contains a colon.

        Show
        Howard M. Lewis Ship added a comment - Found a bug where a path without a slash will not be prefixed with "./" even if it contains a colon.

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Moritz Gmelin
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development