* do linebuffered/non-blocking reads from http requests
[citadel.git] / webcit / fmt_date.c
index ac4af4337bc64904a9882d54358f982959868464..7ae90fbb301b688fa1db3119a4387e066764a2f1 100644 (file)
@@ -147,14 +147,14 @@ void fmt_time(char *buf, time_t thetime)
  * FIXME won't read asctime
  * Doesn't understand timezone, but we only should be using GMT/UTC anyway
  */
-time_t httpdate_to_timestamp(char *buf)
+time_t httpdate_to_timestamp(StrBuf *buf)
 {
        time_t t = 0;
        struct tm tt;
-       char *c;
+       const char *c;
 
        /** Skip day of week, to number */
-       for (c = buf; *c != ' '; c++)
+       for (c = ChrPtr(buf); *c != ' '; c++)
                ;
        c++;