Closed larsmans closed 10 years ago
Is this even a valid URL?
Op 11 nov. 2013, om 18:34 heeft Lars Buitinck notifications@github.com het volgende geschreven:
Try
curl http://semanticize.uva.nl/api//nl?text=Semanticize+me This breaks because of the //. Do we want to handle this on the semanticizer side?
— Reply to this email directly or view it on GitHub.
It's valid, just not very pretty. It's up to the application to interpret the path, viz. to decide that two ore more consecutive slashes are equivalent to a single one.
For me, it’s not worth spending any effort on fixing these ugly URLs. Did you come across a request like this 'in the wild’?
Op 11 nov. 2013, om 19:29 heeft Lars Buitinck notifications@github.com het volgende geschreven:
It's valid, just not very pretty. It's up to the application to interpret the path, viz. to decide that two ore more consecutive slashes are equivalent to a single one.
— Reply to this email directly or view it on GitHub.
Yes, I just inadvertently generated one and spent quite some time debugging because of it. Other web services, such as Elasticsearch, treat double slashes as if they were single ones so I never cared to generate pretty URLs until just now.
It seems to be by design in Flask: https://github.com/mitsuhiko/flask/issues/663.
Should be that hard to come up with a more fancy pattern for the URLs, though.
Op 11 nov. 2013, om 19:34 heeft Lars Buitinck notifications@github.com het volgende geschreven:
Yes, I just inadvertently generated one and spent quite some time debugging because of it. Other web services, such as Elasticsearch, treat double slashes as if they were single ones so I never cared to generate pretty URLs until just now.
— Reply to this email directly or view it on GitHub.
Aha. It's not really a necessity, but if there's a quick and easy way to be more liberal in what to accept than that would be nice. For now, I'll be more conservative in what I produce.
I agree it would be better to be robust. However, I didn’t see any quick solution for this other than diving into the Flask or Werkzeug code, so I’m not pursuing this further.
Op 11 nov. 2013, om 23:59 heeft Lars Buitinck notifications@github.com het volgende geschreven:
Aha. It's not really a necessity, but if there's a quick and easy way to be more liberal in what to accept than that would be nice. For now, I'll be more conservative in what I produce.
— Reply to this email directly or view it on GitHub.
Again no easy fix found. I'm closing the ticket.
Try
This breaks because of the
//
. Do we want to handle this on the semanticizer side?