在命令行上我试试这个:
curl --user admin:admin -XGET "http://localhost:2480/query/demo/sql/select from Profile/20/*:-1"
得到这个
from Profile/20/*:-1"
from 500 Internal Server Error
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Date: Wed Oct 17 10:25:57 CDT 2012
Content-Type: text/plain; charset=utf-8
Server: OrientDB Server v.1.2.0 (build 12659)
Connection: Keep-Alive
Content-Length: 72
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
然后我试试这个:
curl --user admin:admin "http://localhost:2480/query/demo/sql/select from Profile/20/*:-1"
得到这个
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
编辑:
我在 ubuntu 12.04 中使用 1.2.0 版本
编辑2:
如果我从谷歌浏览器访问:
http://localhost:2480/query/demo/sql/select%20from%20Profile/20/*:-1
有用。所以我认为卷曲请求中有一些东西。
编辑3:
我尝试添加此标头并出现相同的错误
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Authorization:Basic YWRtaW46YWRtaW4=
Cache-Control:max-age=0
Connection:keep-alive
Cookie:OSESSIONID=-
Host:127.0.0.1:2480
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19