Skip to content

resolver with path bug #281

Description

@pcnate

I think there is a bug in how the path is removed from the URL. In the code below we can see it trying to take the length of the pathname off of the beginning of the request.url property.

redbird/lib/proxy.js

Lines 646 to 653 in cb7781e

var pathname = route.path;
if (pathname.length > 1) {
//
// remove prefix from src
//
req._url = url; // save original url
req.url = url.substr(pathname.length) || '';
}

If I am not mistaken, that means returning the path of /test in your resolver will result in the request.url having http removed from the beginning instead of the end.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions