/identify and /identifier #17

Open
emanuil-tolev opened this Issue Feb 15, 2012 · 2 comments

Comments

Projects
None yet
1 participant
@emanuil-tolev
Owner

emanuil-tolev commented Feb 15, 2012

/identify should attempt to identify an identifier.

If you submit from the form on the main page, it works (i.e. POST-ing works).

However, if you just do /identify/identifier , it doesn't do anything. The routing's slightly wrong with a missing '/', and the web.identify code has to be changed to actually make use of the GET data, the URL.

/identifier isn't actually coded as a route (the web.identifier function itself looks incomplete AND the routing /identifier is commented out). However, /identify is redirecting to /identifier. I don't quite get how that works at all actually.

@ghost ghost assigned emanuil-tolev Feb 15, 2012

emanuil-tolev added a commit that referenced this issue Feb 25, 2012

#17 fix /identify routing and use data obtained through GET properly…
… - still bugs with the routing if you try to do a DOI that way!
@emanuil-tolev

This comment has been minimized.

Show comment Hide comment
@emanuil-tolev

emanuil-tolev Feb 25, 2012

Owner

http://localhost:5001/identify/a
will work.

But
http://localhost:5001/identify/10.1186/1758-2946-3-42
(a DOI) won't work. I checked with print statements - it doesn't route to the identify method.

Most probably because of the forward slashes - the route is defined as "/identify" and "/identify/" but it's getting confused.

A POST (submit from the homepage) works because it encapsulates the data differently than a GET request. Somebody with more Flask mojo than me?

Owner

emanuil-tolev commented Feb 25, 2012

http://localhost:5001/identify/a
will work.

But
http://localhost:5001/identify/10.1186/1758-2946-3-42
(a DOI) won't work. I checked with print statements - it doesn't route to the identify method.

Most probably because of the forward slashes - the route is defined as "/identify" and "/identify/" but it's getting confused.

A POST (submit from the homepage) works because it encapsulates the data differently than a GET request. Somebody with more Flask mojo than me?

@emanuil-tolev

This comment has been minimized.

Show comment Hide comment
@emanuil-tolev

emanuil-tolev Mar 23, 2012

Owner

"However, if you just do /identify/identifier , it doesn't do anything." has been fixed in commit ea82aed. This issue is still open though, because the /identifier routing in web.py needs to be looked at.

At this point all it should do is the same as the /identify routing, so maybe I'll just add it as an alternative routing to the web.py identify function.

Owner

emanuil-tolev commented Mar 23, 2012

"However, if you just do /identify/identifier , it doesn't do anything." has been fixed in commit ea82aed. This issue is still open though, because the /identifier routing in web.py needs to be looked at.

At this point all it should do is the same as the /identify routing, so maybe I'll just add it as an alternative routing to the web.py identify function.

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