pyLODE
pyLODE copied to clipboard
ISSUE-87 Internal Server Error when processing resource
OK this issue is intriguing :)
The PR is draft and DOES not fix the issue reported at #87. Here are my findings
With the patch applied, when I submit resource as follows
curl "localhost:8000/lode?url=http://cor.esipfed.org/ont/api/v0/ont?iri=http://purl.dataone.org/provone/2015/01/15/ontology#"
The falcon server throw the folowing
[2020-08-14 13:49:35 -0700] [88703] [ERROR] Error handling request /lode?url=http://cor.esipfed.org/ont/api/v0/ont?iri=http://purl.dataone.org/provone/2015/01/15/ontology
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/sync.py", line 135, in handle
self.handle_request(listener, req, client, addr)
File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/sync.py", line 176, in handle_request
respiter = self.wsgi(environ, resp.start_response)
File "/usr/local/lib/python3.7/site-packages/falcon/api.py", line 269, in __call__
responder(req, resp, **params)
File "/Users/lmcgibbn/Downloads/pyLODE/pylode/server.py", line 10, in on_get
raise Exception(url)
Exception: http://cor.esipfed.org/ont/api/v0/ont?iri=http://purl.dataone.org/provone/2015/01/15/ontology
Note, the URI with absent trailing #
When I encode the trailing # and try again
curl "localhost:8000/lode?url=http://cor.esipfed.org/ont/api/v0/ont?iri=http://purl.dataone.org/provone/2015/01/15/ontology%23"
...
[2020-08-14 13:50:29 -0700] [88703] [ERROR] Error handling request /lode?url=http://cor.esipfed.org/ont/api/v0/ont?iri=http://purl.dataone.org/provone/2015/01/15/ontology%23
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/sync.py", line 135, in handle
self.handle_request(listener, req, client, addr)
File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/sync.py", line 176, in handle_request
respiter = self.wsgi(environ, resp.start_response)
File "/usr/local/lib/python3.7/site-packages/falcon/api.py", line 269, in __call__
responder(req, resp, **params)
File "/Users/lmcgibbn/Downloads/pyLODE/pylode/server.py", line 10, in on_get
raise Exception(url)
Exception: http://cor.esipfed.org/ont/api/v0/ont?iri=http://purl.dataone.org/provone/2015/01/15/ontology#
Is this an issue with Falcon... ?
ah, seems like you are raising that exception just to see the url itself...
Anyway, why not just encode the query string, which is the missing step at least to handle characters that need url-encoding? Then, if there are any problems, those could be investigated later. Just 0.02.
Hi @lewismc & @carueda, have you reached consensus here? I'm happy to merge in whatever you want for the Falcon server when you're ready as you know that territory, but I'm just not sure if the "...why not just encode the query string..." comment above is still hanging?
Closing due to no action for many years