Bug 416119 - Creation attributes don't take effect
Summary: Creation attributes don't take effect
Status: RESOLVED WONTFIX
Alias: None
Product: Orion (Archived)
Classification: ECD
Component: Server (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, helpwanted
Depends on:
Blocks:
 
Reported: 2013-08-29 04:50 EDT by Timur Sungur CLA
Modified: 2015-05-05 14:37 EDT (History)
2 users (show)

See Also:


Attachments
Contains two test cases(test for directory + file) and the code for solving the bug. (256.92 KB, patch)
2014-02-12 05:17 EST, Dragos Corlatescu CLA
dragos.corlatescu: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timur Sungur CLA 2013-08-29 04:50:16 EDT
Hi, 

In Orion Wiki(http://wiki.eclipse.org/Orion/Server_API/File_API#Notes_on_POST_method) states that: "The entity body, if present, indicates attributes to be applied to the created resource. Attributes in the request body must conform to the file JSON representation."

The attributes set during the creation of resources do not change the attributes. Please see an example request response below.

Request attributes:
{
"Directory":"true",
"Attributes":{
"ReadOnly":"true"
}
}

Response attributes:
{
  "Attributes": {
    "Executable": true,
    "ReadOnly": false,
    "SymLink": false
  },


Regards,

Timur


POST http://127.0.0.1:8080/file/timur/Container+1377698004940
Orion-Version: 1.0
Slug: aFolder1
Content-Type: text/xml
{
"Directory":"true",
"Attributes":{
"ReadOnly":"true"
}
}

 -- response --
201 Created
Cache-Control:  no-store

Content-Type:  application/json; charset=UTF-8

Location:  /file/timur/Container+1377698004940/aFolder1

Content-Length:  474

Server:  Jetty(8.1.10.v20130312)

{
  "Attributes": {
    "Executable": true,
    "ReadOnly": false,
    "SymLink": false
  },
  "ChildrenLocation": "/file/timur/Container+1377698004940/aFolder1?depth=1",
  "Directory": true,
  "ImportLocation": "/xfer/import/timur/Container+1377698004940/aFolder1",
  "Length": 4096,
  "LocalTimeStamp": 1377765980000,
  "Location": "/file/timur/Container+1377698004940/aFolder1",
  "Name": "Container+1377698004940",
  "Parents": [],
  "SearchLocation": "/filesearch?q="
}
Comment 2 Dragos Corlatescu CLA 2014-02-12 05:17:25 EST
Created attachment 239857 [details]
Contains two test cases(test for directory + file) and the code for solving the bug.

This is my second patch, ever. I hope is all ok.
Comment 3 John Arthorne CLA 2015-05-05 14:37:28 EDT
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:

https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html