Last Comment Bug 894367 - Http.jsm mishandles empty / null postData
: Http.jsm mishandles empty / null postData
Status: RESOLVED FIXED
: regression
Product: Toolkit
Classification: Components
Component: General (show other bugs)
: Trunk
: x86_64 Windows 8
: -- normal (vote)
: mozilla25
Assigned To: Patrick Cloke [:clokep]
:
Mentors:
Depends on:
Blocks: 884319
  Show dependency treegraph
 
Reported: 2013-07-16 06:06 PDT by Richard Marti (:Paenglab)
Modified: 2013-07-26 08:10 PDT (History)
3 users (show)
ryanvm: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Log of my authentication attempt (1.25 KB, text/x-log)
2013-07-17 03:48 PDT, Patrick Cloke [:clokep]
no flags Details
Fix v1 (1.40 KB, patch)
2013-07-17 17:37 PDT, Patrick Cloke [:clokep]
dtownsend: review+
Details | Diff | Review
Test v1 (2.38 KB, patch)
2013-07-18 16:27 PDT, Patrick Cloke [:clokep]
dtownsend: review+
Details | Diff | Review

Description Richard Marti (:Paenglab) 2013-07-16 06:06:51 PDT
Since 20130714 Daily shows the authentication window for Twitter. After entering the correct password the authentication reappears.

In console I get:

Tue Jul 16 2013 14:20:26
Error: 401 - {"errors":[{"message":"Could not authenticate you","code":32}]}
Source file: resource://gre/modules/Http.jsm
Line: 75
 ----------
Tue Jul 16 2013 14:20:26
Error: 401 - {"errors":[{"message":"Could not authenticate you","code":32}]}
Source file: resource://gre/components/twitter.js
Line: 593
Source code:
prpl-twitter

Last good version is 20130712

I suppose the issue has something to do with the http.jsm to toolkit bug 884319
Comment 1 Patrick Cloke [:clokep] 2013-07-17 03:48:52 PDT
Created attachment 777024 [details]
Log of my authentication attempt

This is a log of my authentication attempt with the keys removed.
Comment 2 Patrick Cloke [:clokep] 2013-07-17 17:37:02 PDT
Created attachment 777505 [details] [diff] [review]
Fix v1

I slightly changed the behavior of checking for post data when switching Http.jsm to use an options object, we should only consider post data if the field is defined AND the field has data (i.e. is not null, undefined, empty, etc.) This matches the previous behavior.
Comment 3 Dave Townsend [:mossop] 2013-07-18 15:44:42 PDT
Comment on attachment 777505 [details] [diff] [review]
Fix v1

Review of attachment 777505 [details] [diff] [review]:
-----------------------------------------------------------------

Test please
Comment 4 Patrick Cloke [:clokep] 2013-07-18 16:27:41 PDT
Created attachment 778151 [details] [diff] [review]
Test v1

Added a regression test.

Note You need to log in before you can comment on or make changes to this bug.