/** * Utility functions for RFC9110 Conditional Requests validation */ /** * Checks if an ETag is marked as weak (starts with W/) * @param etag The ETag value to check * @returns true if the ETag is weak, false otherwise */ export declare function isWeakETag(etag: string): boolean; /** * Checks if an ETag is strong (not marked as weak) * @param etag The ETag value to check * @returns true if the ETag is strong, false otherwise */ export declare function isStrongETag(etag: string): boolean; /** * Validates if a string is a valid HTTP-date according to RFC9110 * Accepts IMF-fixdate, obsolete RFC 850, and ANSI C's asctime() format * @param date The date string to validate * @returns true if valid HTTP-date, false otherwise */ export declare function isValidHttpDate(date: string): boolean; /** * Compares two ETags according to RFC9110 rules * @param etag1 First ETag to compare * @param etag2 Second ETag to compare * @param useWeakComparison If true, uses weak comparison; otherwise uses strong comparison * @returns true if ETags match according to the comparison type */ export declare function compareETags(etag1: string, etag2: string, useWeakComparison: boolean): boolean; /** * Parses If-Match or If-None-Match header value into individual ETags * Handles both "*" and comma-separated ETag lists * @param headerValue The If-Match or If-None-Match header value * @returns Array of ETag strings, or ["*"] if the value is "*" */ export declare function parseConditionalETagHeader(headerValue: string): string[]; /** * Validates If-Match or If-None-Match header syntax * According to RFC9110, the header must not contain "*" mixed with other values * @param headerValue The If-Match or If-None-Match header value * @returns true if syntax is invalid (violation), false if valid */ export declare function hasInvalidConditionalETagSyntax(headerValue: string): boolean; /** * Compares two HTTP dates * @param date1 First date string * @param date2 Second date string * @returns -1 if date1 < date2, 0 if equal, 1 if date1 > date2, null if invalid */ export declare function compareHttpDates(date1: string, date2: string): -1 | 0 | 1 | null; //# sourceMappingURL=utils.d.ts.map