*
*/
-#include "squid.h"
+#include "config.h"
+#include "ETag.h"
+
+#if HAVE_CSTRING
+#include <cstring>
+#endif
/*
* Note: ETag is not an http "field" like, for example HttpHdrRange. ETag is a
--- /dev/null
+#ifndef _SQUID_ETAG_H
+#define _SQUID_ETAG_H
+
+/**
+ * ETag support is rudimantal; this struct is likely to change
+ * Note: "str" points to memory in HttpHeaderEntry (for now)
+ * so ETags should be used as tmp variables only (for now)
+ */
+class ETag
+{
+public:
+ const char *str; ///< quoted-string
+ int weak; ///< true if it is a weak validator
+};
+
+/* ETag */
+SQUIDCEXTERN int etagParseInit(ETag * etag, const char *str);
+/// whether etags are strong-equal
+SQUIDCEXTERN bool etagIsStrongEqual(const ETag &tag1, const ETag &tag2);
+/// whether etags are weak-equal
+SQUIDCEXTERN bool etagIsWeakEqual(const ETag &tag1, const ETag &tag2);
+
+#endif /* _SQUIDETAG_H */
#include "mgr/Registration.h"
#include "rfc1123.h"
#include "Store.h"
+#include "TimeOrTag.h"
/*
* On naming conventions:
/* use this and only this to initialize HttpHeaderPos */
#define HttpHeaderInitPos (-1)
-/* these two are defined in structs.h */
-
-/// \todo CLEANUP: Kill this.
-typedef struct _TimeOrTag TimeOrTag;
-
-/// \todo CLEANUP: Kill this.
-typedef struct _ETag ETag;
-
class HttpHeaderEntry
{
MEMPROXY_CLASS_INLINE(HttpHeaderEntry);
+class ETag;
+class TimeOrTag;
+
class HttpHeader
{
errorpage.cc \
errorpage.h \
ETag.cc \
+ ETag.h \
event.cc \
event.h \
EventLoop.h \
SwapDir.cc \
SwapDir.h \
time.cc \
+ TimeOrTag.h \
tools.cc \
tunnel.cc \
typedefs.h \
--- /dev/null
+#ifndef _SQUID_TIMEORTAG_H
+#define _SQUID_TIMEORTAG_H
+
+#include "ETag.h"
+
+/**
+ * Some fields can hold either time or etag specs (e.g. If-Range)
+ */
+class TimeOrTag {
+public:
+ ETag tag; /* entity tag */
+ time_t time;
+ int valid; /* true if struct is usable */
+};
+
+#endif /* _SQUID_TIMEORTAG_H */
#include "ssl/certificate_db.h"
#endif
#include "Store.h"
+#include "TimeOrTag.h"
#if HAVE_LIMITS
#include <limits>
#include "auth/UserRequest.h"
#endif
#include "SquidTime.h"
+#include "ssl/ErrorDetailManager.h"
#include "Store.h"
#include "html_quote.h"
#include "HttpReply.h"
SQUIDCEXTERN int httpAnonHdrDenied(http_hdr_type hdr_id);
SQUIDCEXTERN const char *httpMakeVaryMark(HttpRequest * request, HttpReply const * reply);
-/* ETag */
-SQUIDCEXTERN int etagParseInit(ETag * etag, const char *str);
-/// whether etags are strong-equal
-SQUIDCEXTERN bool etagIsStrongEqual(const ETag &tag1, const ETag &tag2);
-/// whether etags are weak-equal
-SQUIDCEXTERN bool etagIsWeakEqual(const ETag &tag1, const ETag &tag2);
-
#include "HttpStatusCode.h"
SQUIDCEXTERN const char *httpStatusString(http_status status);
#include "squid.h"
#include "CacheManager.h"
#include "comm/Connection.h"
+#include "ETag.h"
#include "event.h"
#include "fde.h"
#include "Store.h"
FREE *free_func;
};
-
-/* ETag support is rudimantal;
- * this struct is likely to change
- * Note: "str" points to memory in HttpHeaderEntry (for now)
- * so ETags should be used as tmp variables only (for now) */
-
-struct _ETag {
- const char *str; /* quoted-string */
- int weak; /* true if it is a weak validator */
-};
-
struct _fde_disk {
DWCB *wrt_handle;
void *wrt_handle_data;
String other;
};
-/* some fields can hold either time or etag specs (e.g. If-Range) */
-
-struct _TimeOrTag {
- ETag tag; /* entity tag */
- time_t time;
- int valid; /* true if struct is usable */
-};
-
/* per field statistics */
class HttpHeaderFieldStat
typedef struct _dwrite_q dwrite_q;
-typedef struct _ETag ETag;
-
typedef struct _fileMap fileMap;
typedef struct _HttpHeaderFieldAttrs HttpHeaderFieldAttrs;
-typedef struct _TimeOrTag TimeOrTag;
-
typedef struct _HttpHeaderStat HttpHeaderStat;
typedef struct _HttpBody HttpBody;