Commit Graph

14 Commits

Author SHA1 Message Date
Brion Vibber 2c12d837c6 Disable SSL peer/hostname verification for HTTPClient unless we've configured a trusted CA bundle like this: $config['http']['ssl_cafile'] = '/usr/lib/ssl/certs/ca-certificates.crt';
The previous state was failing on all HTTPS hits due to HTTP_Request2 library turning on the validation check but not specifying a CA file.
2010-05-21 10:12:39 -07:00
Brion Vibber a8d92dad5e Renamed HTTPResponse class to StatusNet_HTTPResponse to avoid conflict with PECL HTTP extension.
The class isn't referenced by name by any other code I can see so this should have no side effects.
2010-03-29 15:07:15 -07:00
Brion Vibber 5cd020bf29 Workaround intermittent bugs with HEAD requests by disabling keepalive in HTTPClient.
I think this is a bug in Youtube's web server (sending chunked encoding of an empty body with a HEAD response, leaving the connection out of sync when it doesn't attempt to read a body) but the HTTP_Request2 library may need to be adjusted to watch out for that.
2010-03-10 15:13:16 -08:00
Brion Vibber dc09453a77 First steps on converting FeedSub into the pub/sub basis for OStatus communications:
* renamed FeedSub plugin to OStatus
* now setting avatar on subscriptions
* general fixes for subscription
* integrated PuSH hub to handle only user timelines on canonical ID url; sends updates directly
* set $config['feedsub']['nohub'] = true to test w/ foreign feeds that don't have hubs (won't actually receive updates though)
* a few bits of code documentation
* HMAC support for verified distributions (safest if sub setup is on HTTPS)

And a couple core changes:
* minimizing HTML output for exceptions in API requests to aid in debugging
* fix for rel=self link in apitimelineuser when id given

This does not not yet include any of the individual subscription management (Salmon notifications for sub/unsub, etc) nor a nice UI for user subscriptions.
Needs some further cleanup to treat posts as status updates instead of link references.
2010-02-08 11:15:29 -08:00
Brion Vibber 5581143bee Rebuilt HTTPClient class as an extension of PEAR HTTP_Request2 package, adding redirect handling and convenience functions.
Caching support will be added in future work after unit tests have been added.

* extlib: add PEAR HTTP_Request2 0.4.1 alpha
* extlib: update PEAR Net_URL2 to 0.3.0 beta for HTTP_Request2 compatibility
* moved direct usage of CURL and file_get_contents to HTTPClient class, excluding external-sourced libraries
* adapted GeonamesPlugin for new HTTPResponse interface

Note some plugins haven't been fully tested yet.
2009-11-02 09:14:15 -08:00
Brion Vibber b22fc5b74a Revert "Rebuilt HTTPClient class as an extension of PEAR HTTP_Request2 package, adding redirect handling and convenience functions."
Going to restructure a little more before finalizing this...

This reverts commit fa37967858.
2009-11-02 07:51:29 -08:00
Brion Vibber fa37967858 Rebuilt HTTPClient class as an extension of PEAR HTTP_Request2 package, adding redirect handling and convenience functions.
Caching support will be added in future work after unit tests have been added.

* extlib: add PEAR HTTP_Request2 0.4.1 alpha
* extlib: update PEAR Net_URL2 to 0.3.0 beta for HTTP_Request2 compatibility
* moved direct usage of CURL and file_get_contents to HTTPClient class, excluding external-sourced libraries

Note some plugins haven't been tested yet.
2009-11-02 06:31:28 -08:00
Evan Prodromou 65c45986c6 HTTPResponse has default empty headers 2009-10-22 16:20:56 -04:00
Evan Prodromou 15a2b69777 statusize new HTTP classes 2009-09-15 22:31:52 -04:00
Evan Prodromou 6f531745ca change all evans to evan@status.net 2009-09-15 22:28:59 -04:00
Evan Prodromou 9a9a0ae56f add cURL client with HEAD method 2009-09-15 21:50:19 -04:00
Evan Prodromou 8ceb4196f3 add user agent and correct version check to httpclient 2009-09-15 21:22:47 -04:00
Evan Prodromou ae20d073ce update httpclient class 2009-09-15 21:12:59 -04:00
Evan Prodromou 20dd0db704 move httputil to httpclient 2009-09-15 21:12:59 -04:00