|
|
|
I'm getting the correct content type when I curl it with the correct content type. After I log in, I use the place_avatar cap:
tess@station35:/var/tmp/tess/pyogp$ curl -H "Content-type: application/llsd+xml" -v -X "POST" -d "<llsd><map><key>reginlab.com:13000</string></map></llsd>" "https://agent1.aditi.lindenlab.com:12043/cap/bbfd338a-5920-11dd-bd94-0030488f1d92"
<llsd><map><key>region_url</key><string>http://sim1.vaak.lindenlab.com:13000
======= After the test works, we can figure out why the llsd lib that the test is using didnt work. Can you maybe test with Python 2.4 or up, it might be an issue with the Python version used. I think we defined the minimum requirement to be Python 2.4.
The problem in my case happenes not when using the place_avatar cap but when trying to retrieve it from the seed cap, so one step before that. But I will also check our code again. I'm running this on my mac with Python 2.5.1 and get this failure:
koolaid:pyogp tess$ python bootstrap.py Creating directory '/Users/tess/pyogp/parts'. An internal error occured due to a bug in either zc.buildout or in a I've now gotten a working pyogp checkout! w00t
Great
I'm also getting the correct content type on the seed cap:
[13:53:12] enus@station18:~/svn/pyogp/libdev$ curl -kH "Content-type: application/llsd+xml" -v -X "POST" -d "<llsd><map><key><string>caps</string></key><map></map></map></llsd>" https://agent0.aditi.lindenlab.com:12043/cap/a2d8d711-5dae-11dd-8b1e-005045bbae52
<llsd><map><key><string>caps</string></key><map></map></map></llsd>< HTTP/1.0 200 OK
========================= I printed out self.public_url inside caps.py in order to debug the error, and I got http://127.0.0.1:12345/seed_cap_wrong_content_type
If you run the tests they will setup a local mockup test server. This is a simple WSGI App which does not run in a server but gets called directly by the mockup network layer. The host:port part gets removed and the path is passed to the wsgi app.
When you run bin/login there actually should be some other ouput. I've also seen "application/xml" returned from the POST to the rez_avatar/* caps. The OGP documentation needs to detail what the expected content-type is in the response...
application/xml is incorrect. The OGP does detail the expected content-type: https://wiki.secondlife.com/wiki/Open_Grid_Protocol#Serialization
I'm now working on this bug again... sorry for the interruption. Turns out curl automatically inserts a "/" Accept header, which makes this work. Here's the patch to fix this:
Index: src/pyogp.lib.base/pyogp/lib/base/caps.py
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tess@station35:/var/tmp/tess/pyogp$ bin/test
Traceback (most recent call last):
File "/var/tmp/tess/pyogp/bin/test", line 44, in ?
zope.testing.testrunner.run([
File "/usr/lib/python2.3/site-packages/PIL/_init_.py", line 31, in run
File "/var/tmp/tess/pyogp/eggs/zope.testing-3.6.0-py2.3.egg/zope/testing/testrunner/runner.py", line 490
return sum(r.num_ran for r in results)
^
SyntaxError: invalid syntax