Closed Bug 637408 Opened 13 years ago Closed 13 years ago

'cfx docs' /api/idle handler throws silent exception, resets timer anyways

Categories

(Add-on SDK Graveyard :: Documentation, defect, P2)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: warner, Assigned: wbamberg)

Details

Attachments

(1 file)

A combination of bugs is causing a minor error in the 'cfx docs' server, then failing to actually break anything. But it'd be nice to clean up.

The WSGI webserver thread started by 'cfx docs' is supposed to exit as soon as the user closes the docs-viewing tab which it auto-opened. To accomplish this, the server terminates after 60 seconds of no requests, and the frontend javascript code does an idle ping (a GET to /api/idle) every 5 seconds.

"Cork" on IRC noticed that the docs server shuts down surprisingly if you have JS disabled in the browser (we could stand to have a warning about that, but that's not the purpose of this ticket). In the process of discovering that, I noticed that doing a GET of /api/idle actually throws an exception and returns a 500 "internal server error". The frontend code stops pinging if it sees a 501 or 404. So the exception would have caused the frontend to stop pinging (and thus the server to stop running before the tab was closed, and thus be an actual bug), except that 500!=501. Oh, and the exception isn't logged, because the server is normally run in "quiet" mode.

The attached patch fixes the exception.
Assignee: warner-bugzilla → nobody
Component: General → Documentation
QA Contact: general → documentation
Thanks for this fix Brian. It looks good to me, shall I just apply it and close the bug?
Priority: -- → P2
Target Milestone: --- → 1.0
Assignee: nobody → wbamberg
sounds good by me. thanks!
Fixed by: https://github.com/mozilla/addon-sdk/commit/f85ee223b9f86b0102c1733b85b8774b27a74411
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: