Closed Bug 1595991 Opened 2 years ago Closed 2 years ago

[autoconfig] Shorten console output for invalid HTML server responses


(Thunderbird :: Account Manager, enhancement)

Not set


(thunderbird_esr6871+ fixed, thunderbird71 fixed, thunderbird72 fixed)

Thunderbird 72.0
Tracking Status
thunderbird_esr68 71+ fixed
thunderbird71 --- fixed
thunderbird72 --- fixed


(Reporter: BenB, Assigned: BenB)



(1 file, 1 obsolete file)

If we request our autoconfig format and the server responds to "not founds" with an HTML page and a HTTP 200 success code (violating the HTTP spec) instead of a proper HTTP 404, we dump the HTML doc on the console to help diagnose what happened. We're outputting the data, because developers cannot always reproduce situations due to server access and need the console output from users to diagnose.

Instead of dumping the whole doc, just output the first few characters. Maybe 50 chars, less than 1 line. This still allows to analyze what happened and see what happened (invalid HTML server response), but avoids the useless scatter.

Attached patch Cut down the dump, v1 (obsolete) — Splinter Review

As requested

Assignee: nobody → ben.bucksch
Attachment #9108311 - Flags: review?(jorgk)
Severity: normal → minor
OS: Unspecified → All
Hardware: Unspecified → All
Comment on attachment 9108311 [details] [diff] [review]
Cut down the dump, v1

Thanks. That avoids a strange delay when setting up an account in a debug build that makes one wonder what's going on.
Attachment #9108311 - Flags: review?(jorgk)
Attachment #9108311 - Flags: review+
Attachment #9108311 - Flags: approval-comm-esr68+
Attachment #9108311 - Flags: approval-comm-beta+

Added a proper HG header, fixed linting issue and while I was there, also switched to a template string to make it more readable. It still works. Setting up now shows:

client config xml = "\r\n\r\n\r\n<!DOCTYPE html>\r\n<html lang="de-de

Attachment #9108311 - Attachment is obsolete: true
Attachment #9108348 - Flags: review+
Attachment #9108348 - Flags: approval-comm-esr68+
Attachment #9108348 - Flags: approval-comm-beta+

Pushed by
[autoconfig] Shorten console output for HTML responses. a=jorgk DONTBUILD

Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 72.0
You need to log in before you can comment on or make changes to this bug.