Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Mapping returns not-found, is it a bug? #68

Closed
lingo opened this Issue · 4 comments

3 participants

@lingo

In my app, I have a mapping as so:

urls = (
            '^/data/(\d+)/(\d+)', 'data',
            '^/data/(\d+)', 'data',
            '^/csv/?(\d+)', 'csvout',
            '^/status/(\d+)', 'status',
            '^/list$', 'list',
            '^/control/(\d+)/(.+)', 'control',
            '^/(keyword)/(.+)', 'search',
            '^/(url)/(.+)', 'search',
            '^/?', 'index'
            )

If I use:

http://example.com/url/abcdef

Then the mapping correctly calls my 'search' class.
However, with the following type of URL:

http://example.com/url/http%3A%2F%2Fwww.example2.com%2Fpath%2Fto%2Fdirectory%2Fitems-two%2F

I get "not-found" and the mapping doesn't seem to call my 'search' class.
Is this a web.py bug, or is this my misunderstanding of the mapping system?

Cheers,

  • Luke
@lingo lingo closed this
@ahmetalpbalkan

why closed?

@lingo lingo reopened this
@lingo

Ah, by accident! Was looking at another issue, sorry.

@anandology
Collaborator

Works for me with the dev server.

$ curl 'http://0.0.0.0:9000/url/abcdef'
url abcdef
$ curl 'http://0.0.0.0:9000/url/http%3A%2F%2Fwww.example2.com%2Fpath%2Fto%2Fdirectory%2Fitems-two%2F'
url http:%2F%2Fwww.example2.com%2Fpath%2Fto%2Fdirectory%2Fitems-two%2F

And here is the search class that I used.

class search:
    def GET(self, name, value):
        return "%s %s\n" % (name, value)

Can you please test it again?

@anandology
Collaborator

Closing the bug as it is working as expected.

@anandology anandology closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.