Ошибка SQL-запроса orientdb (остальное API) с использованием curl

В командной строке я пробую это:

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

Редактировать:

Я использую версию 1.2.0 в Ubuntu 12.04.

Редактировать 2:

если я получаю доступ из Google Chrome к:

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

person Delta    schedule 17.10.2012    source источник


Ответы (1)


Пробелы должны быть заменены на %20

Неверный запрос:

curl --user admin:admin "http://localhost:2480/query/demo/sql/select from Profile/20/*:-1"

Хороший запрос

curl --user admin:admin "http://localhost:2480/query/demo/sql/select%20from%20Profile/20/*:-1"
person Delta    schedule 18.10.2012