summaryrefslogtreecommitdiff
path: root/inc/HTTPClient.php
Commit message (Collapse)AuthorAge
* better stream writing in HTTPClient FS#2036Andreas Gohr2011-02-06
| | | | | | | | | | | This changes the HTTP stream to blocking while writing to the stream using select() to handle timeouts. Addtionally, wwriting is done in 4k block now (as it is done with reading). This is supposed to fix a problem with writing to a SSL stream that is not quite ready. Reading from the stream continues to be non-blocking as before.
* Merge branch 'master' of github.com:splitbrain/dokuwikiAdrian Lang2011-01-14
|\
| * fixed bracketsAndreas Gohr2011-01-12
| |
| * removed setter/getter to match coding styleAndreas Gohr2011-01-12
| | | | | | | | | | since we don't use setter/getters for the other options it doesn't make sense to have them for the keep-alive function
| * do not reuse errornous http connectionsTobias Sarnowski2011-01-12
| | | | | | | | | | | | | | As soon as something goes wrong while querying a http server do not reuse the same connection again, its state is undefined. In addition, check the connection for feof() before reusing it.
| * keep http connections application wide aliveTobias Sarnowski2011-01-12
| | | | | | | | | | | | Using a static context for the connection pool allows connection reuse throughout the whole application without additional changes in other places.
| * added keep-alive capabilities to the http clientTobias Sarnowski2011-01-12
| | | | | | | | | | | | | | | | The DokuHTTPClient is now able to keep connections alive. This feature is enabled by default. It can be disabled with $client->setKeepAlive(false); and asked with $client->isKeepAlive();.
* | tmpAdrian Lang2010-12-08
|/
* renamed variable initialization in HTTPClientAndreas Gohr2010-12-02
|
* Remove enc=utf-8 in VIM modeline as it is not allowed in VIM 7.3Michael Hamann2010-11-29
| | | | | | As of VIM 7.3 it is no longer possible to specify the encoding in the modeline. This gives an error message whenever such a file is opened, thus this commit removes the enc setting from the modeline.
* - fix phpdocElan Ruusamäe2010-10-07
|
* Small fixes / cleanupAdrian Lang2010-09-28
|
* ignore wrong content-encoding header FS#2037Andreas Gohr2010-09-24
| | | | | | | Some servers send a content-encoding for gzip files but do not encode the content themselves. This is IMHO wrong, this patch detects this and ignores the header. The request will return true but set a warning message in $this->error
* fixed request server port issue in httpclientai2010-09-17
|
* Convenience function in HTTPClientAndreas Gohr2010-08-02
| | | | | The new dget() method works accepts URL parameters as associative array (like the post() method).
* added proxy exception regexp FS#1247Andreas Gohr2010-06-26
|
* some more coding standard compliance updatesAndreas Gohr2010-01-15
|
* Emit less E_NOTICEs and E_STRICTsAdrian Lang2009-11-04
| | | | | | | | | | | | | Changes of behaviour are: * Allow the user name, title & description \e2\80\9c0\e2\80\9d * Default to Port 443 if using HTTPS * Set $INFO['isadmin'] and $INFO['ismanager'] to \e2\80\9cfalse\e2\80\9d even if no user is logged in * Do not pass empty fragment field in the event data for event ACTION_SHOW_REDIRECT * Handle chunked encoding in HTTPClient darcs-hash:20091104100115-e4919-5cf6397d4a457e3f98a8ca49fbdab03f2147721d.gz
* Handle relative redirects correctly FS#1741Andreas Gohr2009-09-04
| | | | | | | | Ignore-this: a85fdaa1c3aae0315a5f2a51ccbde5a0 Some servers (or scripts) do not send full qualified URLs in the Location header on redirects. darcs-hash:20090904152257-7ad00-a9749251c59e4235723ed18bcb9a8f4d3f4157ba.gz
* Added support for multipart/form-data in HTTPClientAndreas Gohr2009-08-30
| | | | | | Ignore-this: ce1342ac66bd276efc7791ff69a025a3 darcs-hash:20090830101808-7ad00-0176559a8f61f32288f274f20a047e7b5de7adaf.gz
* more robustness in gzip decoding in HTTPClient FS#1718Andreas Gohr2009-07-25
| | | | | | Ignore-this: f55bde6815d68e6e79117cdc5e4d1f77 darcs-hash:20090725123032-7ad00-9f3e6289fd73f385020334545d38e779dc104dd6.gz
* Moved HTTPCLIENT_REQUEST_SEND eventAndreas Gohr2009-06-05
| | | | | | | | | | Ignore-this: 8e7c6aae103f1bced33a74a2440c2fe8 This patch moves the HTTPCLIENT_REQUEST_SEND event from HTTPClient to DokuHTTPClient. This keeps the main HTTPClient class free from any DokuWiki specific code for easier reuse elsewhere. darcs-hash:20090605104603-7ad00-8e56892a7f20b4c7010fb2f8d54ae381f984dfc2.gz
* Don't accept gzip encoding in HTTP client when content is expected to be ↵Andreas Gohr2009-06-05
| | | | | | | | truncated FS#1710 Ignore-this: 6bd3d5f18e32356a0efd908962ce78e4 darcs-hash:20090605103531-7ad00-f3917837f33a09696ad41c19df641f0554cb9456.gz
* fixed limit typo in explode callAndreas Gohr2009-06-03
| | | | | | Ignore-this: fbd08a31ded98f7517ca679047845f6 darcs-hash:20090603163836-7ad00-aefb0a144874d2299cae47825eb72ab6413b4875.gz
* Clean up cookie handler in HTTPClientTom N Harris2009-05-28
| | | | darcs-hash:20090528215037-6942e-be53039ae592c50c481ea61528eca76db7e59328.gz
* Action Event wrappers around HTTP requests and authentication checksRobin Gareus2009-03-12
| | | | | | Ignore-this: 9ffd0327c318a633e33a60e0a8ecf7f5 darcs-hash:20090312224454-b7b7f-12b7fa78c0b638c1795f6d5e1b1c1aa2cbab64d4.gz
* fixed cookie handling in HTTPClientAndreas Gohr2009-03-12
| | | | | | Ignore-this: bcdedaf795a2eb5fe89b2be4ca7b6dc1 darcs-hash:20090312201700-7ad00-7cc9ab34909ecdc42b6444c5ccb609d18bffe6f6.gz
* FS#1517, obscure passwords in config filesChris Smith2009-01-19
| | | | | | This patch extends the config 'password' class to support a "_code" parameter darcs-hash:20090119164809-f07c6-c136b559772610539bccb9e9c0191f6a973216ad.gz
* Avoid zero-byte readsTom N Harris2009-01-16
| | | | darcs-hash:20090116001547-6942e-b5bc401c0ef4c36b1b7b8ca7ef708587953ec017.gz
* removed some illogical path setupsAndreas Gohr2008-12-13
| | | | darcs-hash:20081213090400-7ad00-4e21cd75978bb07513f32f5d750658e8d777c59e.gz
* HTTP client should accept all HTTP response codes in the 200 rangeGina Haeussge2008-12-07
| | | | darcs-hash:20081207001900-2b4f5-5d2e6fca1c443884fe7901074be7220c655d0f4a.gz
* Update HTTPClient to encode posted variable namesChris Smith2008-08-11
| | | | darcs-hash:20080811102501-f07c6-5e66b06f303ea9945a22f6636c1f1210089a1aa1.gz
* Better write handling in HTTPClientAndreas Gohr2008-07-08
| | | | | | | | | This patch takes care of a problem when sending large data to a remote server through via HTTP. The write to a socket might not always send the whole chunk in one piece. Now data is written in a loop until all bytes where sent to the socket. darcs-hash:20080708204703-7ad00-50809261df03c6c741393501d41d2beba128ac70.gz
* HTTPClient: Allow limited retrieval without abortingGina Haeussge2008-06-22
| | | | | | | | | | | Introduces a new member variable "max_bodysize_abort" into the HTTP client. If this is set to true (which is the default), the HTTP client shows it current behvaiour of aborting with an error condition if the given max_bodysize is exceeded during retrieval. If it is set to false however, the HTTP client just stops retrieval but returns what it already got. This allows the retrieval of e.g. the first 10K of a web document for searching for pingback data. darcs-hash:20080622092105-2b4f5-28c4399123775d82986faf22c7d89ccb22a8e025.gz
* Make sure there is never posted data on GET requestsAndreas Gohr2008-04-01
| | | | | | | This is an addition to the previous patch to make sure there can not accidentally $data be passed on a GET request. darcs-hash:20080331223807-7ad00-0f03763f15a9d907da6a53ed8b3c3e55b906fbc7.gz
* fixed bug in HTTPClient breaking GET requests on certain serversAndreas Gohr2008-04-01
| | | | | | | The change of a parameter default made the HTTP client send data after sending the headers for a GET request. darcs-hash:20080331221016-7ad00-a46165b1ded7155a6482398c6bdf721a4eb37507.gz
* use DokuHTTPClient in XMLRPC libraryAndreas Gohr2008-02-27
| | | | | | The code should work but is completely untested because it is currently not used. darcs-hash:20080227215408-7ad00-952ebba433991bde0c4282beeb4887c637eb25aa.gz
* cope with non-RFC-conform webservers in HTTPClient FS#1340Andreas Gohr2008-02-23
| | | | | | | | This fixes problems in the HTTP client for web servers which separate their response headers with Unix linfeeds only (instead of CRLFs as stated in RFC 2616). darcs-hash:20080223183639-7ad00-057b05a1134cbe2b8edb2d38d5a74912360cd071.gz
* don't use realpath() anymore (FS#1261 and others)Andreas Gohr2007-09-30
| | | | | | | | | | | The use of realpath() to clean up relative file names caused some trouble in certain setups relying on symlinks or having restricitve file structure setups. This patch replaces all realpath() calls with a PHP only replacement which should solve those problems. darcs-hash:20070930184250-7ad00-512ff04c95f57fc9eaf104f80372237a3c94286f.gz
* Fix for Basic HTTP authenticationMichael Klier2007-09-09
| | | | darcs-hash:20070908222540-23886-00d09dcbb5e3391686586043907dbeccea7f696d.gz
* Use Content-Length in HTTP clientAndreas Gohr2007-09-06
| | | | | | | | If a Server supplies a Content-Length header we stop reading when the specified number of bytes was read. This fixes problems with Servers not closing the connection after sending the body. darcs-hash:20070906194435-7ad00-cfb9b77ee085d28f5a643e45750b0a7be8ad7bd7.gz
* fix for cookie handling problem in HTTPClient and PHP5Andreas Gohr2006-11-01
| | | | darcs-hash:20061101161558-7ad00-2a9b093dffc1955f8a8a0a2e17ca6b177182e399.gz
* fix for post support in HTTPClientAndreas Gohr2006-10-20
| | | | darcs-hash:20061020163625-7ad00-d83f31886b140150ca5baf25cf016ab3af7afcf9.gz
* restrict fetch.php's download abilitiesAndreas Gohr2006-10-17
| | | | | | | | | | | | | | | | | | This patch changes fetch.php ability to download external files. It now checks for the returned MIME type and will only download images. For all other MIME types a redirect is sent back to the browser. This reduces the risc of being misused as open proxy. Additionally the download facility is disabled completly by default by setting the fetchsize option to 0. Users who want the feature need to overwrite the option in their local.php. Background: The ability to download external files is needed to resize external images on the server side. When disabled, a redirect is sent to the browser which will download the fullsize image and rescale it on the client side which is more bandwidth and CPU intensive. darcs-hash:20061017175329-7ad00-cd1b1bfa043a04540c51ca8380d28deaa14147d1.gz
* $conf['fetchsize'] addedAndreas Gohr2006-06-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds an option to configure the maximum size for files the fetch.php will ever download. Setting this to 0 completely turns of the caching of external media files. Disadvantages of setting a low or zero fetchsize: * fetch.php needs to download images to be able to resize them. When the used fetchsize prevents the downloading the images can only be resized by the browser which means the browser will need to download the fullsized image first. * If the linked external media files vanishes it will no longer display in the wiki because it is not cached. Advantages of setting a low or zero fetchsize: * fetch.php may be used for a possible denial of service attack by requesting many big external files. * The created cache files may take a lot of space on the server I recommend to leave the setting at 2MB for internal and private wikis and lower the setting to about 200 to 500 Kb for bigger public Wikis. Note: the caching of files uploaded through the media manager is not affected by this setting. darcs-hash:20060615184847-7ad00-04fc39928f7d72e56f5c5e271013ef265436e6c9.gz
* Feedfetcher/HTTPClient fixAndreas Gohr2006-04-29
| | | | | | | | | | | | | This fixes a typo which made the new Feedparser not use our own HTTPClient. It also enhances the get() method of HTTPClient to optionally cope better with bad HTTP responses: Some servers return a body with a "304 Not Modified" status which violates RFC 2616 but is usually accepted by common browsers. Setting the $sloppy304 parameter will return the response body. This fixes problems with feeds from feedblendr.com darcs-hash:20060429155805-7ad00-33a1c3142f241bf7747e8f679237cb6e8f1564ef.gz
* fixed typo in HTTP client #726Andreas Gohr2006-02-24
| | | | darcs-hash:20060224192130-7ad00-32144bb71be4c9f0cde6a613d8612ce760d18892.gz
* file cleanupsAndreas Gohr2006-02-17
| | | | | | | | | | This patch cleans up the source code to satisfy the coding guidelines (see http://wiki.splitbrain.org/wiki:development#coding_style) It converts files to UNIX lineendings and removes tabs and trailing whitespace. Not all files were cleaned yet. darcs-hash:20060217222040-7ad00-bba3d2bee3b5aa7cbb5184258abd50805cd071bf.gz
* Fix for broken Prox Support #626Andreas Gohr2005-11-11
| | | | darcs-hash:20051111200646-7ad00-0eca22780e39dfd24344180a541500b08a3a93df.gz
* HTTP Client tweaksAndreas Gohr2005-10-02
| | | | darcs-hash:20051002125421-7ad00-6fafa7fce8fef4954f1e65e13a2bc095734715f5.gz