#include <string.h>
#include <ctype.h>
#include <errno.h>
+#include <time.h>
#include "utils_params.h"
else if ((src[in] < 32)
|| (src[in] == '&')
|| (src[in] == ';')
- || (src[in] >= 128))
+ || (((unsigned char) src[in]) >= 128))
{
char esc[4];
in++;
}
} /* while (42) */
+
+ return (0);
} /* }}} int uri_escape */
-const char *script_name (void)
+const char *script_name (void) /* {{{ */
{
char *ret;
struct tm tm_tmp;
size_t status;
- if (localtime_r (&t, &tm_tmp) == NULL)
+ /* Apparently Apache or FastCGI doesn't honor the timezone information and
+ * thus "fixes" the last modified header when the timezone information is
+ * east of GMT. With "gmtime_r" this problem doesn't occur. */
+ if (gmtime_r (&t, &tm_tmp) == NULL)
return (errno);
status = strftime (buffer, buffer_size, "%a, %d %b %Y %T %z", &tm_tmp);