# you better don't look inside
[m6w6/ext-http] / http_date_api.c
index 6949df09dc15287294ca6530c047415843df5b4c..91c16766aba994136783995584ccfcb27a77d341 100644 (file)
@@ -1,16 +1,13 @@
 /*
-   +----------------------------------------------------------------------+
-   | PECL :: http                                                         |
-   +----------------------------------------------------------------------+
-   | This source file is subject to version 3.0 of the PHP license, that  |
-   | is bundled with this package in the file LICENSE, and is available   |
-   | through the world-wide-web at http://www.php.net/license/3_0.txt.    |
-   | If you did not receive a copy of the PHP license and are unable to   |
-   | obtain it through the world-wide-web, please send a note to          |
-   | license@php.net so we can mail you a copy immediately.               |
-   +----------------------------------------------------------------------+
-   | Copyright (c) 2004-2005 Michael Wallner <mike@php.net>               |
-   +----------------------------------------------------------------------+
+    +--------------------------------------------------------------------+
+    | PECL :: http                                                       |
+    +--------------------------------------------------------------------+
+    | Redistribution and use in source and binary forms, with or without |
+    | modification, are permitted provided that the conditions mentioned |
+    | in the accompanying LICENSE file are met.                          |
+    +--------------------------------------------------------------------+
+    | Copyright (c) 2004-2005, Michael Wallner <mike@php.net>            |
+    +--------------------------------------------------------------------+
 */
 
 /* $Id$ */
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
-#include "php.h"
 
 #include "php_http.h"
-#include "php_http_std_defs.h"
-
-#include <ctype.h>
+#include "php_http_date_api.h"
 
 static int check_day(char *day, size_t len);
 static int check_month(char *month);
@@ -150,7 +144,7 @@ PHP_HTTP_API char *_http_date(time_t t TSRMLS_DC)
 {
        struct tm *gmtime, tmbuf;
 
-       if (gmtime = php_gmtime_r(&t, &tmbuf)) {
+       if ((gmtime = php_gmtime_r(&t, &tmbuf))) {
                char *date = ecalloc(1, 31);
                snprintf(date, 30,
                        "%s, %02d %s %04d %02d:%02d:%02d GMT",