#46 Let non reletive urls work in forward() and includeURL()

WebKit (45)
Luke Holden

if you use:

It is treated reletive to the current directory.

So if you are in the directory

you get:

which is not what you would expect...

This patch changes forward and includeURL to detect if
your trying to use a file from the root directory, and
if you are.. adds req.siteRoot() as needed.

so self.forward("/someurl")
will work as expected

so self.forward("someurl")
will still work reletive to the current directory.


  • Stuart Donaldson

    Logged In: YES

    This is closely related to the path parsing problems I am
    looking at right now. This works in some cases, but on its
    own, it fails with ExtraPathInfo in FindServlet I think.

    I'm looking into this further right now. Thanks for the
    Patch, I'll likely use a good part of it.

  • Stuart Donaldson

    • assigned_to: nobody --> stuartd
  • Luke Holden

    Luke Holden - 2003-01-12

    Logged In: YES

    Unfortunatly... it looks like an includeURL right after a
    forward does not work =/

    For some reason transaction.request().serverSidePath()
    gets set to None

    "/home/alterself/public_html/lib/layout/SiteLayout.py", line
    6, in writeHTMLBody
    File "./WebKit/Page.py", line 340, in includeURL
    File "/opt/Webware/WebKit/Application.py", line 672, in
    File "/opt/Webware/WebKit/Application.py", line 1000, in
    assert path is not None

  • Luke Holden

    Luke Holden - 2003-01-13

    Logged In: YES

    Okay, attached is another patch. (Application_lholden2.diff)
    It fixes the problem with includes after a forward.

    Apply this after the first patch

  • Stuart Donaldson

    Logged In: YES

    I am attatching a revised patch. It is a tarball containing
    a diff which includes most of what Luke had already done. I
    moved things around a little, and updated the RelNotes.

    I added some test cases under WebKit/Testing at the end of
    the test list.

  • Stuart Donaldson

    Logged In: YES

    Oops, spoke to soon on the consolidated patch. Some
    debugging code in other parts of Webware was apparently
    required by this. I'll clean it up and re-post.

  • Stuart Donaldson

    Revised consolidated patch from Stuart.

  • Stuart Donaldson

    Logged In: YES

    Ok, try this consolidated patch. It also includes an update
    to WebKit/Testing so check that out as well.

    There are some differences with handling URL references when
    ExtraPathInfo is set or not. This was developed and tested
    with it set. When it is not set, the testing code currently
    will show some different values when referencing the URL
    '/'. This is because that is parsed slightly differently
    under the two circumstances.

  • Stuart Donaldson

    Logged In: YES

    Patches have been applied, closing this report.
    Any new changes should be entered in via a new patch or bug

  • Stuart Donaldson

    • status: open --> closed-fixed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks