cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Patches to make curl work as a netsaint plugin

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 19 Jan 2001 09:15:56 +0100 (MET)

On Thu, 18 Jan 2001, Christoph Lameter wrote:

> The following patch adds netsant compatibility to curl and allows the use
> of CURL directly as a netsaint plugin.

Thanks!

While I'm thrilled by getting this kind of contribution, I have doubts
regarding this patch. I'll explain in detail below. Please don't consider my
remarks personal.

First, what is netsaint and why do you/we need to add hard-coded netsaint-
specific code in curl?

> -g Netsaint URL check mode. Retrieves URL and returns
> one line of text describing the event and status 0=ok, 1=warning
> 2-error

In other words, you have an option to set another option? Most people simply
use -w/--write-out for this.

> -G regexp Matches webpages against regexp. Returns error code 2
> for mismatches. Otherwise returns the same as -g

This part lacks a lot. You make the code use a certain regex function that
won't be present on a large amount of systems curl is built on. I could add
stuff to configure to figure this out, but would that really be what we want?

Normally, when people want to check regexes against the contents of a web
page, they use curl (or libcurl) to get the page and then another tool or
package does the regex stuff.

Why is it necessary to have this check built-in?

> -j <http-code> Allows the treatment of an http error code as an OK
> condition. This is necessary when checking f.e. the presence of a
> http page that requries authentication (code 404). In that case 404 is
> evidence that the URL works as designed.

Curl doesn't treat HTTP error codes as error conditions. This patch seems to
add nothing that isn't already supported. Or what is the rational behind
this?

All in all, how come you don't just write a perl wrapper around curl that
does all this stuff you want? Or, if you can come up with a solution that
doesn't modify libcurl, you can make a clone of the curl client that uses
libcurl and make a 'netsaintcurl' client that is made purely for that
purpose, separated from curl the general-purpose client.

I'm all ears. While I may have the final say, I do listen to everyone's
opinions.

> Please CC me on all correspondence. I am not a member of this mailing
> list!

Please join the list to make discussions around this easier.

Please get the latest CVS version or the 7.6-pre3 release if you intend to
make any further patches. Internals have been changed.

-- 
  Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/
Received on 2001-01-19