/*
- * $Id: mime.cc,v 1.123 2006/02/17 20:15:35 wessels Exp $
+ * $Id: mime.cc,v 1.124 2006/04/22 06:03:42 robertc Exp $
*
* DEBUG: section 25 MIME Parsing
* AUTHOR: Harvest Derived
char transfer_mode;
unsigned int view_option:
+ 1;
-1, download_option:
+unsigned int download_option:
1;
mimeEntry *next;
MimeIcon theIcon;
return 0;
}
-const char *
-mime_get_auth(const char *hdr, const char *auth_scheme, const char **auth_field)
-{
- char *auth_hdr;
- char *t;
-
- if (auth_field)
- *auth_field = NULL;
-
- if (hdr == NULL)
- return NULL;
-
- if ((auth_hdr = mime_get_header(hdr, "Authorization")) == NULL)
- return NULL;
-
- if (auth_field)
- *auth_field = auth_hdr;
-
- if ((t = strtok(auth_hdr, " \t")) == NULL)
- return NULL;
-
- if (strcasecmp(t, auth_scheme) != 0)
- return NULL;
-
- if ((t = strtok(NULL, " \t")) == NULL)
- return NULL;
-
- return base64_decode(t);
-}
-
static mimeEntry *
mimeGetEntry(const char *fn, int skip_encodings)
{
/*
- * $Id: protos.h,v 1.520 2006/04/22 05:29:19 robertc Exp $
+ * $Id: protos.h,v 1.521 2006/04/22 06:03:42 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
SQUIDCEXTERN char *mime_get_header(const char *mime, const char *header);
SQUIDCEXTERN char *mime_get_header_field(const char *mime, const char *name, const char *prefix);
SQUIDCEXTERN size_t headersEnd(const char *, size_t);
-SQUIDCEXTERN const char *mime_get_auth(const char *hdr, const char *auth_scheme, const char **auth_field);
SQUIDCEXTERN void mimeInit(char *filename);
SQUIDCEXTERN void mimeFreeMemory(void);