From e0a013397a51963039c43877be3afe954e519be0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Wed, 11 Aug 2010 14:28:06 +0300 Subject: filter: implement basic analysis of urls Analysing of the url host part, some simple tests. Not usable as squid filter yet. --- blob.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'blob.h') diff --git a/blob.h b/blob.h index 883c053..767e661 100644 --- a/blob.h +++ b/blob.h @@ -31,7 +31,7 @@ extern const blob_t BLOB_NULL; static inline int blob_is_null(blob_t b) { - return b.ptr == NULL; + return b.len == 0; } char *blob_cstr_dup(blob_t b); @@ -47,4 +47,6 @@ int blob_pull_matching(blob_t *b, blob_t e); unsigned int blob_pull_uint(blob_t *b, int radix); blob_t blob_pull_cspn(blob_t *b, const blob_t cspn); +blob_t blob_expand_head(blob_t *b, blob_t limits, unsigned char sep); + #endif -- cgit v1.2.3