New issue 9 by tim...@gmail.com: sadi.py errors on content
type "application/x-www-form-urlencoded"
http://code.google.com/p/sadi/issues/detail?id=9
Not sure if you can do anything intelligent with this content type, but
curl sends it by default (and is fixed with a -H "application/rdf+xml")
Default to RDF/XML, or guess the syntax by grocking at it?
application/x-www-form-urlencoded
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/web/http.py",
line 1402, in rawDataReceived
self._finishRequestBody(data[self.length:])
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/web/http.py",
line 1337, in _finishRequestBody
self.allContentReceived()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/web/http.py",
line 1391, in allContentReceived
req.requestReceived(command, path, version)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/web/http.py",
line 714, in requestReceived
self.process()
--- <exception caught here> ---
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/web/server.py",
line 150, in process
self.render(resrc)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/web/server.py",
line 157, in render
body = resrc.render(self)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/web/resource.py",
line 190, in render
return m(request)
File "/Library/Python/2.6/site-packages/sadi-0.1.2-py2.6.egg/sadi/sadi.py",
line 257, in render_POST
graph = self.processGraph(content, request.getHeader("Content-Type"))
File "/Library/Python/2.6/site-packages/sadi-0.1.2-py2.6.egg/sadi/sadi.py",
line 203, in processGraph
self.deserialize(inputStore.reader.graph, content, type)
File "/Library/Python/2.6/site-packages/sadi-0.1.2-py2.6.egg/sadi/sadi.py",
line 127, in deserialize
format = self.getFormat(mimetype)
File "/Library/Python/2.6/site-packages/sadi-0.1.2-py2.6.egg/sadi/sadi.py",
line 119, in getFormat
if type != None: return [type,self.contentTypes[type]]
exceptions.KeyError: ''
Comment #1 on issue 9 by elmccar...@gmail.com: sadi.py errors on content
type "application/x-www-form-urlencoded"
http://code.google.com/p/sadi/issues/detail?id=9
Assigned ownership of Python bug to Jim.
The Java and Perl SADI stacks assume RDF+XML by default and that is part of
the spec (http://code.google.com/p/sadi/wiki/SynchronousServices), so this
is technically a defect.