Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 334708

Summary: [server] The response for creating a project contains wrong project location
Product: [ECD] Orion Reporter: John Arthorne <john.arthorne>
Component: ClientAssignee: John Arthorne <john.arthorne>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Szymon.Brandys
Version: 0.2   
Target Milestone: 0.2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description John Arthorne CLA 2011-01-18 16:11:05 EST
When POST /workspace/<workspaceId> is used to create a project, this is the response I got:

{
  "Id": "I",
  "Location": "http://localhost:8080/workspace/D/I";,
  "Name": "xcvxcv",
  "SearchLocation": "http://localhost:8080/solrsearch?wt=json&fl=Id,Name,Length,Directory,LastModified,Location&hl=true&q=";
}

The location should be "http://localhost:8080/file/I";,
Comment 1 John Arthorne CLA 2011-01-18 16:11:21 EST
I think "http://localhost:8080/workspace/D/I"; is correct. There are actually two interesting locations here:

- The location of the project metadata
- The location of the project *contents*

They should probably both be included in the response. I had created the ContentLocation header for the second one, but maybe it is missing for POST response.

2.John ArthorneDec 7, 2010 11:02 A.M.
I need to think more about this. POST creates both a project and file resource. Deleting the project resource removes that project from the workspace, and deleting the file resource deletes the content. So, these two resources are useful but both resource locations should be included in the POST response.
Comment 2 John Arthorne CLA 2011-02-08 16:36:35 EST
Some other problems with project creation:

- Response has no HTTP "Location" header 
- Response code is 200 rather than 201 (Created)
Comment 3 John Arthorne CLA 2011-02-08 17:21:56 EST
Fix released.