- if (!strncasecmp(buf, "Accept-encoding: ", 17)) {
- extract_token(encodings, &buf[17], 0, ';');
- for (i=0; i<num_tokens(encodings, ','); ++i) {
- extract_token(enc, encodings, i, ',');
- if (!strcasecmp(enc, "gzip")) {
- gzip = 1;
- }
- }
+ /**
+ * GroupDAV-based sessions use HTTP authentication
+ */
+ if (!strncasecmp(buf, "Authorization: Basic ", 21)) {
+ CtdlDecodeBase64(httpauth_string, &buf[21], strlen(&buf[21]));
+ extract_token(httpauth_user, httpauth_string, 0, ':', sizeof httpauth_user);
+ extract_token(httpauth_pass, httpauth_string, 1, ':', sizeof httpauth_pass);
+ }
+
+ if (!strncasecmp(buf, "If-Modified-Since: ", 19)) {
+ if_modified_since = httpdate_to_timestamp(&buf[19]);
+ }
+
+ if (!strncasecmp(buf, "Accept-Language: ", 17)) {
+ safestrncpy(accept_language, &buf[17], sizeof accept_language);