Commit Graph

176 Commits

Author SHA1 Message Date
markjaquith
d65e49c9f3 Bunch of PHPDoc corrections and cleanups. props c3mdigital. props SergeyBiryukov. fixes #21149
git-svn-id: http://core.svn.wordpress.org/trunk@21241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-09 05:03:53 +00:00
dd32
251719c5e5 WP_HTTP: Add a @link to the Chunked Decode RFC for documentation of how to decode the data correctly. Props mailnew2ster. Fixes #14184
git-svn-id: http://core.svn.wordpress.org/trunk@21231 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-08 05:34:47 +00:00
dd32
6f29700fdb WP_HTTP: Remove a empty() check that would never be empty due to the format of HTTP Headers, value would always contain at least a space followed by the value. See #14184
git-svn-id: http://core.svn.wordpress.org/trunk@21230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-08 05:16:26 +00:00
dd32
4db9e5c605 WP_HTTP: Allow for cookies with "empty" values be sent, this affects sending cookies such as test=0, which would previously fail. Props mailnew2ster for initial patch. See #14184
git-svn-id: http://core.svn.wordpress.org/trunk@21227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-07 12:06:09 +00:00
dd32
2005aed7e6 WP_HTTP: Respect that some cookies do not have an expiration time, this is a valid use-case that WP_HTTP_Cookie::test() should not discard, a non-existant expiration date simply means to let it expire at the end of the session. Props mailnew2ster. Fixes #14191
git-svn-id: http://core.svn.wordpress.org/trunk@21226 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-07 04:23:49 +00:00
dd32
9ed35c4586 WP_HTTP: Add a filter to WP_HTTP_Proxy::send_through_proxy() to allow for plugins to modify which requests are sent to a proxy dynamically. Fixes #20222
git-svn-id: http://core.svn.wordpress.org/trunk@21225 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-07 02:27:13 +00:00
ryan
08d01e2950 Handle relative urls when processing redirects. Introduce WP_Http::make_absolute_url(). Props dd32. fixes #20434
git-svn-id: http://core.svn.wordpress.org/trunk@20767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-10 21:32:02 +00:00
dd32
98e33b2f9b WP_HTTP: Curl: $theHeaders is an array, not an object, introduced in [20370]. Props kurtpayne. Fixes #20389 See #20219
git-svn-id: http://svn.automattic.com/wordpress/trunk@20399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-07 07:16:30 +00:00
westi
a1c575b671 Fix typo in [20372] - See #19922 props SergeyBiryukov.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-05 15:34:28 +00:00
westi
5b6c025cc3 HTTP: Don't force cookie values to be urlencoded because it breaks usage of cookies in some scenarios like the LiveJournal Importer. Instead add a filter for a plugin to use if it really wants to have the cookie mangled. Fixes #19922 props pw201, dllh and kurtpayne.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-05 15:17:34 +00:00
dd32
c5b25fd6d0 WP_HTTP: Curl: Correct a typo in [20208] causing failed curl requests not to return a WP_Error under certain situations. Props SergeyBiryukov. Fixes #20219
git-svn-id: http://svn.automattic.com/wordpress/trunk@20370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-05 11:58:04 +00:00
dd32
f314fb3ea7 WP_HTTP: Curl: Handle Redirections in PHP rather than internally in Curl, Simplifies code flow between safe_mode On and Off, and works around certain bugs. Props simonwheatley for initial patch. Fixes #20219, Fixes #17490
git-svn-id: http://svn.automattic.com/wordpress/trunk@20208 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-18 05:00:05 +00:00
dd32
5bc2f55d50 WP_Http: cURL: Use the parsed args $r, rather than the raw $args. Mentioned in #20219
git-svn-id: http://svn.automattic.com/wordpress/trunk@20207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-18 03:12:12 +00:00
dd32
ef6661a628 WP_HTTP: Send the body with custom method requests when using cURL. Fixes #18589
git-svn-id: http://svn.automattic.com/wordpress/trunk@20183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 05:33:38 +00:00
dd32
3abb558ae8 Support custom HTTP Methods in WP_Http_Curl. Brings it in line with the other HTTP transports of respecting the requested method. Props zx2c4. Fixes #18589
git-svn-id: http://svn.automattic.com/wordpress/trunk@19696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-06 12:53:44 +00:00
ryan
83b131f8e3 User lowercase true, false, null instead of uppercase. Props c3mdigital, mfields. fixes #16302
git-svn-id: http://svn.automattic.com/wordpress/trunk@19687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-05 20:50:54 +00:00
ryan
616c35e71c One newline is enough.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-05 20:10:39 +00:00
ryan
c924060858 Remove extraneuos newlines
git-svn-id: http://svn.automattic.com/wordpress/trunk@19623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-21 18:42:11 +00:00
ryan
07ff8b216b Use one space, not two, after trailing punctuation. fixes #19537
git-svn-id: http://svn.automattic.com/wordpress/trunk@19593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-13 23:45:31 +00:00
ryan
28b1b4763d Avoid E_STRICT notices. see #18975
git-svn-id: http://svn.automattic.com/wordpress/trunk@19094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-31 19:38:46 +00:00
ryan
62afab8db3 Pinking shears
git-svn-id: http://svn.automattic.com/wordpress/trunk@19054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-24 19:13:23 +00:00
dd32
ee71b2eb88 Respect the Content-Type header developers pass to WP_HTTP. Fixes #18982
git-svn-id: http://svn.automattic.com/wordpress/trunk@19000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-19 04:48:00 +00:00
dd32
f1ffd16440 Document the Magic numbering in WP_Http_Encoding::compatible_gzinflate(). Fixes #18273
git-svn-id: http://svn.automattic.com/wordpress/trunk@18806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-29 02:10:35 +00:00
dd32
08bea55949 Pass $args and $url to the http_api_debug action to improve debugging. Props johnbillion. Fixes #18732
git-svn-id: http://svn.automattic.com/wordpress/trunk@18805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-29 01:42:09 +00:00
dd32
f40bc45b6f Add inflation support for java.util.zip.Deflater in WP_Http_Encoding::compatible_gzinflate(). Fixes #18273
git-svn-id: http://svn.automattic.com/wordpress/trunk@18718 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-19 14:43:43 +00:00
duck_
e4ed63fc6f Fix typos in documentation (wp-includes/[a-h]). See #18560.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-03 16:02:41 +00:00
ryan
28b241df2b Empty headers instance var instead of unsetting to avoid warning. Props chrisbliss18. fixes #18157
git-svn-id: http://svn.automattic.com/wordpress/trunk@18457 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-07-21 21:44:35 +00:00
ryan
daa14c36f9 Bring out the pinking shears.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18254 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-06-10 23:01:45 +00:00
ryan
a98d5a605c HTTP API PHP Doc Updates. Props sivel. fixes #17724
git-svn-id: http://svn.automattic.com/wordpress/trunk@18185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-06-08 00:51:31 +00:00
westi
65e341d0cb Fix typos and inconsistencies in PHPdoc / function declarations. See #17414 props duck_
git-svn-id: http://svn.automattic.com/wordpress/trunk@17925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-05-14 09:50:20 +00:00
westi
81cd0218ec Introduce wp_http_supports as a much less hacky replacement for the http_transport_(get|post)_debug hooks that plugins could have
been using to detect if things like ssl requests were working.
See #17251 props mdawaffe


git-svn-id: http://svn.automattic.com/wordpress/trunk@17914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-05-13 09:56:59 +00:00
ryan
04487fc268 Constructor cleanup. Props ocean90. fixes #16768
git-svn-id: http://svn.automattic.com/wordpress/trunk@17771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-29 20:05:12 +00:00
dd32
ad5f5db861 Allow the cURL transport to handle '0' response bodies. Fixes #17223
git-svn-id: http://svn.automattic.com/wordpress/trunk@17692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-23 13:49:52 +00:00
dd32
e2b914fbad Remove support for the PHP HTTP Extension from WP_HTTP. The PHP HTTP Extension is a wrapper around libcurl and fopen() providing limited configuration and is supported on a minority of servers due to its non-default inclusion. Props sivel. Fixes @16978
git-svn-id: http://svn.automattic.com/wordpress/trunk@17659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-19 04:22:59 +00:00
dd32
c1e70ae5e6 Verify certificate matches both the common name and the provided hostname. WP_HTTP_Curl requires CURLOPT_SSL_VERIFYHOST be either 2 or false. Props sivel. Fixes #16904
git-svn-id: http://svn.automattic.com/wordpress/trunk@17616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-07 08:38:36 +00:00
dd32
864330c766 explode always returns an array in this context. Props hakre. Fixes #16958
git-svn-id: http://svn.automattic.com/wordpress/trunk@17600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-05 06:41:51 +00:00
dd32
b4d213c7a5 Fix warning in HTTP Header parsing where response message is not specified. Props hakre. Fixes #16885
git-svn-id: http://svn.automattic.com/wordpress/trunk@17599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-05 06:21:56 +00:00
dd32
d5ae0717c0 Streamline WP_Http_*::test() methods: Check basic SSL requirements, only allow filters to disable transports, not enable them after ::test() has failed. Props mdawaffe for the initial patch. See #16606
git-svn-id: http://svn.automattic.com/wordpress/trunk@17598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-05 06:09:43 +00:00
dd32
06dab650ac Return 4xx errors as a standard response from WP_HTTP, Brings it in line with the rest of the transports for 4xx error handling. See #17010
git-svn-id: http://svn.automattic.com/wordpress/trunk@17597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-05 04:06:40 +00:00
dd32
ef063f8508 Use the correct variable name; Simpler static initialisation. Props hakre. See #11613 & #16978
git-svn-id: http://svn.automattic.com/wordpress/trunk@17566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-28 09:55:15 +00:00
dd32
de498967ef Correct logic for cURL Errors, add extra sanity protection in ::processHeaders to guard against null inputs. See #16236
git-svn-id: http://svn.automattic.com/wordpress/trunk@17563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-26 03:32:05 +00:00
dd32
00dc7a57d6 First run of introducing Stream-To-File for the WP_HTTP API. Reduces memory consumption during file downloads. Implemented in download_url() for upgraders. Props sivel. See #16236
git-svn-id: http://svn.automattic.com/wordpress/trunk@17555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-25 02:42:20 +00:00
dd32
0e08826bbd Allow for array('redirection' => 0) to bypass WP_Error on redirects being encountered; Allows HEAD requests WITH 'redirection' > 0 specified at call time to follow redirections; Standardises on return values from all transports to act the same based on the Unit Tests. Fixes #16855
git-svn-id: http://svn.automattic.com/wordpress/trunk@17551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-24 05:18:34 +00:00
dd32
6dd4dbec38 Fix WP_HTTP to only make a request upon a working transport, as well as to allow Unit Testing. Removes the getTransport() & postTransport() methods as they're no longer needed, replaces them with a single _dispatch_request() method. Fixes #11613
git-svn-id: http://svn.automattic.com/wordpress/trunk@17550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-24 02:16:13 +00:00
dd32
9fec2e59dc Prune PHP5 compat checks in WP_Http, WP_Http_Curl & WP_Http_Streams. Only removes pre PHP 5.2.4 conditional code. See #13915
git-svn-id: http://svn.automattic.com/wordpress/trunk@17535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-23 11:58:09 +00:00
dd32
ebf169b350 Remove PHP4 based WP_Http_Fopen class. Props sivel for initial patch. See #16917 Fixes #13915
git-svn-id: http://svn.automattic.com/wordpress/trunk@17534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-23 11:35:41 +00:00
nacin
b0ad5b5928 Just a typo of the class name. fixes #14786.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-01-13 05:08:40 +00:00
nacin
26d7de2d93 We only need strpos here. Ensures PHP4 compat. props mailnew2ster, fixes #14187.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-07 07:17:06 +00:00
ryan
3f72e340d6 Update since phpdoc. Props demetris. fixes #15445
git-svn-id: http://svn.automattic.com/wordpress/trunk@16660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-01 19:24:38 +00:00
nacin
d37c4b0ebc WP_Http_ExtHTTP variable fix. Don't pass an empty array to http_request, props mdawaffe, fixes #13730.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-18 03:34:28 +00:00
dd32
ac2ca038ea Support wildcard domains in WP_PROXY_BYPASS_HOSTS and WP_ACCESSIBLE_HOSTS. Fixes #14636
git-svn-id: http://svn.automattic.com/wordpress/trunk@15911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-22 10:27:35 +00:00
dd32
ea54f7f91c Remove redundant strtolower() in WP_HTTP. Props rmccue. Fixes #14168
git-svn-id: http://svn.automattic.com/wordpress/trunk@15362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-07-02 07:52:14 +00:00
nacin
d77e093aba Some whitespace in WP_HTTP. props hakre, see #13897.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15309 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-23 14:26:57 +00:00
dd32
9615351ae6 Some coding standards cleanups for WP_HTTP. Props hakre for initial patch. See #13897
git-svn-id: http://svn.automattic.com/wordpress/trunk@15285 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-19 07:02:09 +00:00
dd32
b55852aad0 Fix typo in HTTP Class. Props filosofo. Fixes #13897 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@15284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-19 06:54:21 +00:00
ryan
b39e28ec1b Fix logic
git-svn-id: http://svn.automattic.com/wordpress/trunk@15143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-04 20:11:06 +00:00
nacin
0ad32e0c61 Revert part of r14429 as it broke HTTP in setup-config. Revisit when we decide to fully deprecate get_bloginfo(url). see #9008.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-04 21:41:45 +00:00
nacin
5edbc3d3c7 Revert accidental removal of parse_url(). see #9008, props PeteMall.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-04 04:57:22 +00:00
wpmuguru
abed02b32d use homeurl(), props PeteMall, see #9008
git-svn-id: http://svn.automattic.com/wordpress/trunk@14429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-04 00:28:29 +00:00
ryan
7b7243d94a Strip trailing whites.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-03 20:26:11 +00:00
nacin
c5af6664a6 Remove debug.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-03 07:12:26 +00:00
nacin
0b597379e4 Prevent fatal error when falling back to fsockopen in the setup-config.php key/salt HTTP request. fixes #13030.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-03 06:28:05 +00:00
dd32
efe0a28c18 Bail from WP_HTTP when a invalid URL is provided. Fixes #12964
git-svn-id: http://svn.automattic.com/wordpress/trunk@14134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-18 04:58:19 +00:00
dd32
cf0e90578e Fix typo in Proxy Authorization header. Props thales.tede. Fixes #12995
git-svn-id: http://svn.automattic.com/wordpress/trunk@14129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-18 04:01:19 +00:00
nacin
880b27ee2b Clean up the HTTP inline docs to reflect the times. props jacobsantos, fixes #12882.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-10 11:23:21 +00:00
dd32
33b86da7ce Whitespace only Cookie pairs are not permitted; Skip them. Props josephscott. Fixes #12761
git-svn-id: http://svn.automattic.com/wordpress/trunk@13887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-30 10:22:30 +00:00
dd32
c0974fb518 Avoid notices for requests with no body. Also fixes a few race conditions related to headers. Fixes #11872
git-svn-id: http://svn.automattic.com/wordpress/trunk@13849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-28 00:56:43 +00:00
dd32
334670a67a Correct Array style for returning Multiple HTTP Headers. See #12045
git-svn-id: http://svn.automattic.com/wordpress/trunk@13847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-28 00:23:40 +00:00
markjaquith
58d47426cc More pedantry. "Setup" is not a verb. http://notaverb.com/setup
git-svn-id: http://svn.automattic.com/wordpress/trunk@13725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-17 04:39:50 +00:00
dd32
c29b107102 Fix spelling typo's in r13484. See #12200
git-svn-id: http://svn.automattic.com/wordpress/trunk@13485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-28 04:27:32 +00:00
dd32
4e8de447f6 Support non-BASIC Authentication schemes in the HTTP API if server supports them. Props ssandison, See #4011, Fixes #12200
git-svn-id: http://svn.automattic.com/wordpress/trunk@13484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-28 04:24:04 +00:00
dd32
af48ab61de New files svn:eol-style: native.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-27 03:37:38 +00:00
nacin
0b66fc91e0 Clean up redundant defined() check. Props TobiasBg fixes #12375
git-svn-id: http://svn.automattic.com/wordpress/trunk@13422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-26 00:37:20 +00:00
ryan
9ab7306993 Remove author tags. fixes #12366
git-svn-id: http://svn.automattic.com/wordpress/trunk@13377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-24 19:07:21 +00:00
nacin
5557d3e4f0 Fix notice in WP_Http. Fixes #12316 props sivel.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-22 18:45:45 +00:00
dd32
d271b1357b Split WP_Http classes into separate file. Fixes #11559
git-svn-id: http://svn.automattic.com/wordpress/trunk@13274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-21 02:06:24 +00:00