Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364756 - When compare.html?readonly missing, file URI is mangled and fetched from wrong service
Summary: When compare.html?readonly missing, file URI is mangled and fetched from wron...
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: libing wang CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-24 15:31 EST by Evan Hughes CLA
Modified: 2015-02-07 20:50 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Evan Hughes CLA 2011-11-24 15:31:04 EST
In compare-container.js:setEditor(), near the end, the URI of the file source has the query trimmed and is fetched using the FileClient (due to the #setInput at the end of the function). 

Trimming the query causes problems because I'm serving content using my own URI supplied by a DiffProvider. Useful information is in the query string. 

Refetching the content causes a problem because my URI doesn't match the standard lookup service, and I'm not registering my service (because I'm trying to keep my client as trivial as possible). 

I'm able to work around these problems by setting '?readonly=true' on the initial query URI, but it's a bit of a hassle.
Comment 1 libing wang CLA 2011-11-24 15:39:00 EST
I am about to release a new version of compare container, which will accept different options when you construct the widget.
I will consider this bug together.
Comment 2 Evan Hughes CLA 2011-11-25 08:54:47 EST
I'm going to switch to content URIs that don't require query parameters. This work item is still valid, but not important for my investigation.
Comment 3 libing wang CLA 2011-11-25 09:32:51 EST
(In reply to comment #2)
> I'm going to switch to content URIs that don't require query parameters. This
> work item is still valid, but not important for my investigation.

The trimming was indeed a work around at the moment. We had to understand a file name from the URL but some times a file URL in git history contains "?parts=body".
Eventually we should ask the diff Provider or name resolver to give back a file name by URL.
In Orion we have file service to give back file meta data. But RTC may have its own way to know a file name. 
This means the consumer has to tell the compare widget how to resolve file name bu URL.
Comment 4 libing wang CLA 2015-01-29 10:41:49 EST
The compare widget has been improved a lot so this issue no longer exists.