RESOLVED FIXED 56717
[Qt] Clean up redirection logic in QNetworkReplyHandler
https://bugs.webkit.org/show_bug.cgi?id=56717
Summary [Qt] Clean up redirection logic in QNetworkReplyHandler
Andreas Kling
Reported 2011-03-19 15:47:33 PDT
SSIA
Attachments
Proposed patch (10.67 KB, patch)
2011-03-19 15:51 PDT, Andreas Kling
kenneth: review+
Andreas Kling
Comment 1 2011-03-19 15:51:29 PDT
Created attachment 86273 [details] Proposed patch
WebKit Review Bot
Comment 2 2011-03-19 15:53:01 PDT
Attachment 86273 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp:420: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Total errors found: 1 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Kenneth Rohde Christiansen
Comment 3 2011-03-19 15:57:11 PDT
Comment on attachment 86273 [details] Proposed patch Looks good, though it can be a bit hard to follow from looking at the patch.
Kenneth Rohde Christiansen
Comment 4 2011-03-19 15:59:33 PDT
Comment on attachment 86273 [details] Proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=86273&action=review >> Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp:420 >> + if (m_redirectionTries == 0) { // 10 or more redirections to the same url is considered infinite recursion > > Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] When 10 is defined as a static variable at the top, maybe it is bad to mention 10 here? > Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp:421 > + ResourceError error(newUrl.host(), 400 /*bad request*/, Don't we have defines for 400 etc somewhere?
Andreas Kling
Comment 5 2011-03-20 03:26:21 PDT
Note You need to log in before you can comment on or make changes to this bug.