[dokuwiki] Limited retrieval for HTTP Client

  • From: Gina Häußge <gina@xxxxxxxxxx>
  • To: Dokuwiki mailinglist <dokuwiki@xxxxxxxxxxxxx>
  • Date: Sun, 22 Jun 2008 13:35:54 +0200

Hello everyone,

I prepared a little something for the HTTP client... So far, it did not
allow to only retrieve parts of a document (e.g. the first 5KB) without
changing into error condition if the document's actual size exceeded the
given size limit.

The attached patch 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 the current behaviour as described above. If it is set
to false however, the HTTP client just stops retrieval but returns what
it already got without going "into error".

I needed this functionality for discovery of trackback and pingback URLs
in the linkback plugin and so far used a custom subclass of HTTPClient
which redefined the sendRequest method. As code duplication is bad, I
thought it would be an idea to include the option in the standard HTTP
Client as well.

Greetings from Darmstadt,
  Gina

Other related posts:

  • » [dokuwiki] Limited retrieval for HTTP Client