Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334708 - [server] The response for creating a project contains wrong project location
Summary: [server] The response for creating a project contains wrong project location
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-18 16:11 EST by John Arthorne CLA
Modified: 2011-09-01 11:41 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.