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

Bug 415551

Summary: Server API / File API: Getting file metadata and contents
Product: [ECD] Orion Reporter: Vitaly Kozyura <v.kozyura>
Component: DocAssignee: Project Inbox <orion.doc-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Vitaly Kozyura CLA 2013-08-21 04:58:33 EDT
Below is the example response from the wiki page  (http://wiki.eclipse.org/Orion/Server_API/File_API#Getting_file_metadata_and_contents). 
In the Orion implementation (http://download.eclipse.org/orion/) the “Content-Type: text/plain” is missing.
Instead there is some number of ‘\r’ and ‘\n’ around the contents.

What is the correct response?


Example Response 
HTTP/1.1 HTTP/1.1 200 OK
Content-Type: multipart/related; boundary="BOUNDARY"
ETag: "35fd43td3"
--BOUNDARY
Content-Type: application/json

{
"Name" : "myfile.txt",
"Location" : "http://example.com/file/MyProj/myfile.txt",
"ETag" : "35fd43td3",
"Directory" : "false",
"LocalTimeStamp" : "01234345009837",
"Charset" : "UTF-8",
"ContentType" : "text/plain",
"Attributes" : {
"ReadOnly" : "false",
"Executable" : "true"
}
}

--BOUNDARY
Content-Type: text/plain

This is the contents 

--BOUNDARY
Comment 1 John Arthorne CLA 2015-05-05 14:41:48 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