Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 174681 - Headless search fails if repository url has an "/" at the end for Bugzilla 2.23
Summary: Headless search fails if repository url has an "/" at the end for Bugzilla 2.23
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: dev   Edit
Hardware: PC Windows XP
: P2 normal with 1 vote (vote)
Target Milestone: 3.2   Edit
Assignee: Frank Becker CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 175578
Blocks:
  Show dependency tree
 
Reported: 2007-02-19 15:02 EST by John Anvik CLA
Modified: 2009-05-07 23:01 EDT (History)
3 users (show)

See Also:


Attachments
Testcase demonstrating the problem. (2.86 KB, text/plain)
2007-02-19 15:04 EST, John Anvik CLA
no flags Details
patch (6.16 KB, patch)
2009-02-24 17:32 EST, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (26.84 KB, application/octet-stream)
2009-02-24 17:33 EST, Frank Becker CLA
no flags Details
patch V2 (2.58 KB, patch)
2009-04-12 15:15 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (4.38 KB, application/octet-stream)
2009-04-12 15:15 EDT, Frank Becker CLA
no flags Details
patch V2 (5.15 KB, patch)
2009-04-12 15:18 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (4.12 KB, application/octet-stream)
2009-04-12 15:18 EDT, Frank Becker CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Anvik CLA 2007-02-19 15:02:41 EST
I've attached a testcase that demonstrated the problem. If the repository url is "https://bugzilla.mozilla.org" it works, if the url is "https://bugzilla.mozilla.org/" (i.e. the query url contains two "/") the parseHtmlError() in BugzillaClient (via getSearchHits()) throws a CoreException with the cryptic status:

Status INFO: org.eclipse.mylar.bugzilla code=2 MylarStatus null
Comment 1 John Anvik CLA 2007-02-19 15:04:25 EST
Created attachment 59306 [details]
Testcase demonstrating the problem. 

Testcase currently fails because of the problem.
Comment 2 John Anvik CLA 2007-02-19 15:06:35 EST
Comment on attachment 59306 [details]
Testcase demonstrating the problem. 

If the "/" at the end of the repository url is removed, the testcase will pass.
Comment 3 John Anvik CLA 2007-02-19 15:15:12 EST
This problem was observed for the Mozilla repository (Bugzilla v. 2.23) but doesn't occur for the Eclipse repository (Bugzilla v. 2.22).
Comment 4 Robert Elves CLA 2007-02-26 23:08:04 EST
Marking as dependant since I'll likely want to look at this at the same time as testing the Bugzilla 3.0 stream.
Comment 5 David Marple CLA 2008-06-13 14:36:00 EDT
This error occurs even without a trailing slash in some repositories.  I cannot get any bugs from http://bugs.kde.org/ and others; only a select few work.  Others (https://bugzilla.redhat.com/bugzilla/ or http://bugzilla.gnome.org/) stop producing a parseHTML error when the trailing slash is removed, but still don't return the requested bug.
Comment 6 Robert Elves CLA 2008-06-13 21:58:43 EDT
We'll have to investigate this in the 3.1 cycle. Need to defer: http://wiki.eclipse.org/index.php/Mylyn/3.0_Plan#Deferred_Items
Comment 7 gonyali CLA 2008-09-16 18:49:35 EDT
Removed by droy - SPAM 2008-09-19 21:09
Comment 8 Robert Elves CLA 2009-01-27 17:24:15 EST
Frank if you get a chance, please review and mark resolved if this has since been resolved. 
Comment 9 Frank Becker CLA 2009-01-29 17:51:40 EST
(In reply to comment #8)
> Frank if you get a chance, please review and mark resolved if this has since
> been resolved.
Rob,

for http://bugzilla.gnome.org/ I get HttpURLConnection.HTTP_FORBIDDEN but redhat is OK.

For gnome I can use the Browser without any problem.

Thoughts?
Comment 10 Robert Elves CLA 2009-01-29 18:38:40 EST
Looks like gnome.org's repos is fairly customized.  Can you get a dump of the html returned by gnome's repo (if any)?
Comment 11 Steffen Pingel CLA 2009-01-29 23:39:04 EST
We currently do not have any standalone tests for Bugzilla that run as part of the AllHeadlessStandaloneTests suite. It would be very valuable if we built up a test suite and maybe use this bug as a start.
Comment 12 Steffen Pingel CLA 2009-02-23 22:10:54 EST
What is the status here?
Comment 13 Frank Becker CLA 2009-02-24 16:26:54 EST
(In reply to comment #10)
> Looks like gnome.org's repos is fairly customized.  Can you get a dump of the
> html returned by gnome's repo (if any)?
Sorry, I can not reproduce this any longer.
Comment 14 Frank Becker CLA 2009-02-24 17:32:55 EST
Created attachment 126633 [details]
patch

I activate the following tests
* testAddCredentials
* testQueryViaConnector

Should I do the same for 
* testGetBug
* testGetBugs

Should we need a special test for an Repository URL without "/" at the end?
Comment 15 Frank Becker CLA 2009-02-24 17:33:02 EST
Created attachment 126634 [details]
mylyn/context/zip
Comment 16 Robert Elves CLA 2009-03-30 19:22:41 EDT
(In reply to comment #14)
> Created an attachment (id=126633)
> patch

+1, please apply

> 
> I activate the following tests
> * testAddCredentials
> * testQueryViaConnector

Great!

> Should I do the same for
> * testGetBug
> * testGetBugs
Would be great Frank since we could then point others to these as sample source code for headless.

> Should we need a special test for an Repository URL without "/" at the end?
Wouldn't hurt since the headless case may not be protected as is the repository settings page ui?
Comment 17 Frank Becker CLA 2009-04-12 15:15:55 EDT
Created attachment 131579 [details]
patch V2

patch for 
* testGetBug
* testGetBugs
Comment 18 Frank Becker CLA 2009-04-12 15:15:59 EDT
Created attachment 131580 [details]
mylyn/context/zip
Comment 19 Frank Becker CLA 2009-04-12 15:18:52 EDT
Created attachment 131581 [details]
patch V2

patch for 
* testGetBug
* testGetBugs

Sorry wrong patch attached
Comment 20 Frank Becker CLA 2009-04-12 15:18:54 EDT
Created attachment 131582 [details]
mylyn/context/zip
Comment 21 Robert Elves CLA 2009-05-07 23:01:52 EDT
Great.  Patch applied.