Discussion:
[basex-talk] PUT in Rest API
Christophe Marchand
2017-06-28 11:32:40 UTC
Permalink
Hello,


I have a strange behavior, using PUT method on Rest API.

Here is the curl instruction :

curl -i -v -X PUT -H "Content-Type: text/xml" -T /data/pom.xml
"http://admin:***@localhost:1984/rest/valid/pom.xml"

curl displays this :

* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 1984 (#0)
* Server auth using Basic with user 'admin'
PUT /rest/valid/ff548ea41-07be-4dae-81c1-a758ed1d3581.xml HTTP/1.1
Host: localhost:1984
Authorization: Basic YWRtaW46YWRtaW4=
User-Agent: curl/7.47.0
Accept: */*
Content-Type: text/xml
Content-Length: 4957
Expect: 100-continue
* Done waiting for 100-continue
* We are completely uploaded and fine
* Connection #0 to host localhost left intact
BaseX:33952094826395

And BaseX logs say this :

12:41:23.367 127.0.0.1:43908 admin ERROR Timeout
exceeded. 600000.81 ms

There is no other processes open on BaseX, curl is the sole client.

What am I doing wrong ?

Thanks in advance,
Christophe
Christian Grün
2017-06-28 11:41:19 UTC
Permalink
Hi Christophe,

could you please check if the problem occurs with an empty database as
well, and provide us with the input data.

Thanks in advance,
Christian



On Wed, Jun 28, 2017 at 1:32 PM, Christophe Marchand
Post by Christophe Marchand
Hello,
I have a strange behavior, using PUT method on Rest API.
curl -i -v -X PUT -H "Content-Type: text/xml" -T /data/pom.xml
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 1984 (#0)
* Server auth using Basic with user 'admin'
PUT /rest/valid/ff548ea41-07be-4dae-81c1-a758ed1d3581.xml HTTP/1.1
Host: localhost:1984
Authorization: Basic YWRtaW46YWRtaW4=
User-Agent: curl/7.47.0
Accept: */*
Content-Type: text/xml
Content-Length: 4957
Expect: 100-continue
* Done waiting for 100-continue
* We are completely uploaded and fine
* Connection #0 to host localhost left intact
BaseX:33952094826395
12:41:23.367 127.0.0.1:43908 admin ERROR Timeout exceeded.
600000.81 ms
There is no other processes open on BaseX, curl is the sole client.
What am I doing wrong ?
Thanks in advance,
Christophe
Christian Grün
2017-06-28 12:41:47 UTC
Permalink
Hi Christophe,

1984 is the port of the BaseX database server. You will need to use
the HTTP port instead [1].

Best,
Christian

[1] http://docs.basex.org/wiki/Startup#HTTP_Server



On Wed, Jun 28, 2017 at 1:32 PM, Christophe Marchand
Post by Christophe Marchand
Hello,
I have a strange behavior, using PUT method on Rest API.
curl -i -v -X PUT -H "Content-Type: text/xml" -T /data/pom.xml
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 1984 (#0)
* Server auth using Basic with user 'admin'
PUT /rest/valid/ff548ea41-07be-4dae-81c1-a758ed1d3581.xml HTTP/1.1
Host: localhost:1984
Authorization: Basic YWRtaW46YWRtaW4=
User-Agent: curl/7.47.0
Accept: */*
Content-Type: text/xml
Content-Length: 4957
Expect: 100-continue
* Done waiting for 100-continue
* We are completely uploaded and fine
* Connection #0 to host localhost left intact
BaseX:33952094826395
12:41:23.367 127.0.0.1:43908 admin ERROR Timeout exceeded.
600000.81 ms
There is no other processes open on BaseX, curl is the sole client.
What am I doing wrong ?
Thanks in advance,
Christophe
Christophe Marchand
2017-06-28 12:51:38 UTC
Permalink
My mistake.

Thanks a lot.

Best,
Christophe
Post by Christian Grün
Hi Christophe,
1984 is the port of the BaseX database server. You will need to use
the HTTP port instead [1].
Best,
Christian
[1] http://docs.basex.org/wiki/Startup#HTTP_Server
On Wed, Jun 28, 2017 at 1:32 PM, Christophe Marchand
Post by Christophe Marchand
Hello,
I have a strange behavior, using PUT method on Rest API.
curl -i -v -X PUT -H "Content-Type: text/xml" -T /data/pom.xml
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 1984 (#0)
* Server auth using Basic with user 'admin'
PUT /rest/valid/ff548ea41-07be-4dae-81c1-a758ed1d3581.xml HTTP/1.1
Host: localhost:1984
Authorization: Basic YWRtaW46YWRtaW4=
User-Agent: curl/7.47.0
Accept: */*
Content-Type: text/xml
Content-Length: 4957
Expect: 100-continue
* Done waiting for 100-continue
* We are completely uploaded and fine
* Connection #0 to host localhost left intact
BaseX:33952094826395
12:41:23.367 127.0.0.1:43908 admin ERROR Timeout exceeded.
600000.81 ms
There is no other processes open on BaseX, curl is the sole client.
What am I doing wrong ?
Thanks in advance,
Christophe
Loading...