Issue 9 in sadi: sadi.py errors on content type "application/x-www-form-urlencoded"

10 views
Skip to first unread message

sa...@googlecode.com

unread,
Dec 16, 2011, 2:09:20 PM12/16/11
to bu...@sadiframework.org
Status: New
Owner: elmccar...@gmail.com
Labels: Type-Defect Priority-Medium

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: ''

sa...@googlecode.com

unread,
Dec 17, 2011, 10:56:36 AM12/17/11
to bu...@sadiframework.org
Updates:
Owner: mccus...@gmail.com
Labels: -Priority-Medium Product-PythonAPI Priority-Low

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.

sa...@googlecode.com

unread,
Dec 26, 2013, 2:29:03 PM12/26/13
to bu...@sadiframework.org
Updates:
Status: Fixed

Comment #2 on issue 9 by mccus...@gmail.com: sadi.py errors on content
type "application/x-www-form-urlencoded"
http://code.google.com/p/sadi/issues/detail?id=9

This is now fixed in sadi.python 0.2. Default serialization is now RDF/XML.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages