checkwatches.py doesn't handle http -> https redirects

Bug #34102 reported by Björn Tillenius
14
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Jeroen T. Vermeulen

Bug Description

If a bugzilla bug tracker automatically redirects http requests to https, and the bug tracker's base URL in Launchpad is http://something.com, checkwatches.py will POST to http://something.com/buglist.cgi and get redirected to http://something.com/buglist.cgi. When this happens, the form data gets discarded and a GET request is issued.

We should address this issue somehow, I think we can define our own redirect handler for urllib2, which will POST the form data to the new page, if it's only a http -> https redirect.

Related branches

Changed in malone:
assignee: nobody → bjornt
Revision history for this message
Christian Reis (kiko) wrote :

Working around this is pretty trivial; just update the bugtracker URL.

Changed in malone:
importance: Medium → Low
Revision history for this message
Diogo Matsubara (matsubara) wrote :

When such a redirection occurs we see OOPSes like OOPS-837CCW12
Exception type UnparseableBugData
Exception value Failed to parse XML description for http://bugs.maemo.org bugs [u'2080']: mismatched tag: line 26, column 4

Changed in malone:
status: New → Confirmed
Revision history for this message
Diogo Matsubara (matsubara) wrote :
Changed in malone:
assignee: Björn Tillenius (bjornt) → nobody
Revision history for this message
Gavin Panella (allenap) wrote :

I do not think we should automatically cope with this situation. Instead, we should use Diogo's fix to improve reporting.

tags: added: story-reliable-bug-syncing
Changed in launchpad:
importance: Low → Critical
Gavin Panella (allenap)
Changed in launchpad:
status: Triaged → In Progress
assignee: nobody → Jeroen T. Vermeulen (jtv)
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

There seem to have been two separate bugs here:

1. Due to the nonstandard redirect, Bugzilla was giving us an HTML page that wasn't also well-formed XML, where our bug-tracking code expected RDF, thus triggering this parse failure. This appears to have been fixed.

2. There's also a quiet failure. Since we were getting the wrong page, we also weren't picking up new bugs on the remote bug tracker. Once the BugZilla search page became well-formed XML, we were happily parsing the wrong page without failures.

With the attached branch, we start seeing bugs that were being passed by before.

Revision history for this message
Launchpad QA Bot (lpqabot) wrote : Bug fixed by a commit
Changed in launchpad:
milestone: none → 11.02
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

We tried the new code against 108 bugzilla instances. Sadly, most of them still failed. But Gavin tells me there's no clear indication that we've made anything worse. In 4 instances the check against getting HTML back instead of RDF fails.

tags: added: qa-ok
removed: qa-needstesting
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.