Additional checks when evaluating the safety of an HTTP request, to avoid false negatives.

Merges [24915] to the 3.6 branch.
fixes #24646.



git-svn-id: https://core.svn.wordpress.org/branches/3.6@24916 1a063a9b-81f0-0310-95a4-ce76da25c4cd