Hi everyone,
The result of using slug header and name attribute is different during file creation. Is it the expected behavior?
Whenever I want to create a file under project test using slug header:
-------------------------cut--------------------------
Orion-Version: 1.0
Content-Type: text/xml
{
"Directory":"false"
}
-- response --
400 Bad Request
Content-Type: application/json; charset=UTF-8
Content-Length: 118
Server: Jetty(8.1.10.v20130312)
-------------------------end--------------------------
In contrast, it works fine with the name attribute:
-------------------------cut--------------------------
Orion-Version: 1.0
Content-Type: text/xml
{
"Directory":"false",
}
-- response --
201 Created
Cache-Control: no-store
Content-Type: application/json; charset=UTF-8
Location: /file/timur/test/http%253A%252F%
252Fwww.example.org%252Fwinery%252FTEST%252Fjclouds2221
Content-Length: 630
Server: Jetty(8.1.10.v20130312)
{
"Attributes": {
"Executable": false,
"ReadOnly": false,
"SymLink": false
},
"Directory": false,
"ImportLocation": "/xfer/import/timur/test/http%253A%252F%
252Fwww.example.org%252Fwinery%252FTEST%252Fjclouds2221",
"Length": 0,
"LocalTimeStamp": 1384448839000,
"Location": "/file/timur/test/http%253A%252F%
252Fwww.example.org%252Fwinery%252FTEST%252Fjclouds2221",
"Parents": [{
"ChildrenLocation": "/file/timur/test/?depth=1",
"Location": "/file/timur/test/",
"Name": "test"
}],
"SearchLocation": "/filesearch?q="
}
-------------------------end--------------------------
The above case occurs only if the url encoding has been applied once. In case of multiple URL encodings the result is:
-------------------------cut--------------------------
Orion-Version: 1.0
Content-Type: text/xml
{
"Directory":"false"
}
-- response --
201 Created
Cache-Control: no-store
Content-Type: application/json; charset=UTF-8
Location: /file/timur/test/http%25253A%25252F%
25252Fwww.example.org%25252Fwinery%25252FTEST%25252Fjclouds2221
Content-Length: 666
Server: Jetty(8.1.10.v20130312)
{
"Attributes": {
"Executable": false,
"ReadOnly": false,
"SymLink": false
},
"Directory": false,
"ImportLocation": "/xfer/import/timur/test/http%25253A%25252F%
25252Fwww.example.org%25252Fwinery%25252FTEST%25252Fjclouds2221",
"Length": 0,
"LocalTimeStamp": 1384449060000,
"Location": "/file/timur/test/http%25253A%25252F%
25252Fwww.example.org%25252Fwinery%25252FTEST%25252Fjclouds2221",
"Parents": [{
"ChildrenLocation": "/file/timur/test/?depth=1",
"Location": "/file/timur/test/",
"Name": "test"
}],
"SearchLocation": "/filesearch?q="
}
-------------------------end--------------------------
Is it a bug or the expected behavior of Orion? In the previous version, there was no such behavior.
Regards,
Timur