| レス数が950を超えています。1000を超えると表示できなくなるよ。 |
2ch閉鎖の危機なんだと(Part3.1)
[429:名無しさん (01/08/26 10:20)]
>>424
鯖側の政治的問題で、さくっとは無理なんだってよ
おいおい入るかもってことらしい
[430:名無し (01/08/26 10:24)]
徹夜でやったからプログラム板の人たち眠ってますか?
お昼頃から再開ですか?
[431:原住民 (01/08/26 10:42)]
むむ、制限時間過ぎてもスレ全体を一括読みできない原因発見...
zz_GetEnv()と get_lastmod_str() の両方で gmtime()使ってるぞ!!
static領域に結果置いておくだけだから上書きされちゃうんだよね...
[432:原住民 (01/08/26 11:16)]
--- read11.c.orig Sun Aug 26 11:07:14 2001
+++ read11.c Sun Aug 26 11:05:21 2001
@@ -1,2 +1 @@
-<META content="MSHTML 5.00.2614.3500" name=GENERATOR></HEAD>
#include <stdio.h>
@@ -60,3 +59,3 @@
time_t t_now ;
-struct tm *tm_now ;
+struct tm tm_now ;
long currentTime ;
@@ -125,3 +124,3 @@
if(fp == NULL) return ;
- fprintf(fp,"%02d:%02d:%02d %8s:",tm_now->tm_hour,tm_now->tm_min,tm_now->tm_sec,zz_bs) ;
+ fprintf(fp,"%02d:%02d:%02d %8s:",tm_now.tm_hour,tm_now.tm_min,tm_now.tm_sec,zz_bs) ;
fprintf(fp,"(%15s)",zz_remote_addr) ;
@@ -520,4 +519,3 @@
time(&t_now) ;
- t_now += 9*60*60 ;
- tm_now = gmtime(&t_now) ;
+ tm_now = *localtime(&t_now) ;
@@ -618,5 +616,7 @@
close(pipefds[1]);
+
execl("/bin/gzip", "gzip", "-cf", NULL);
- printf ("Error can't exec\n");
- exit(1);
+ execl("/usr/bin/gzip", "gzip", "-cf", NULL);
+ printf ("Error can't exec\n");
+ exit(1);
}
@@ -795,3 +795,3 @@
printf("fileSize = [%d bytes] %dlines<BR>\n",zz_fileSize,lineMax) ;
-printf("time=[%02d:%02d:%02d]<BR>\n",tm_now->tm_hour,tm_now->tm_min,tm_now->tm_sec);
+printf("time=[%02d:%02d:%02d]<BR>\n",tm_now.tm_hour,tm_now.tm_min,tm_now.tm_sec);
@@ -947,3 +947,3 @@
{
- if(tm_now->tm_hour < LIMIT_AM || LIMIT_PM <= tm_now->tm_hour) return 1 ;
+ if(tm_now.tm_hour < LIMIT_AM || LIMIT_PM <= tm_now.tm_hour) return 1 ;
return 0 ;
[433: (01/08/26 11:19)]
プログラマが2chを救う!?
http://piza2.2ch.net/test/read.cgi?bbs=tech&key=998736516
にいった方がいいと思う、今2, 3人ほどいるみたい
[434:原住民 (01/08/26 11:19)]
http://star.endless.ne.jp/users/forcount/contents/scriptmaker/read11.c
に対する patchなんだけど...
もしかしてこのserverの timezoneって日本じゃない??
だとしたら 520行近辺の *localtimeはまずいかも...
[435:433 (01/08/26 11:21)]
>434
サーバはアメリカのハズです、西海岸だったと思いますが・・
[436:Perler ◆GSi39OA6 (01/08/26 11:55)]
>>434
別スレにも書きましたが、ヤバイも何も、HTTP/1.1のHTTP-dateでは
「例外なく」GMTに「しなければならない(MUST)」です。
西海岸時間なんかここに入れたら動作しなくなるUAが出てくると思う。
RFC 2068
3.3 Date/Time Formats
3.3.1 Full Date
All HTTP date/time stamps MUST be represented in Greenwich Mean Time
(GMT), without exception. This is indicated in the first two formats
by the inclusion of "GMT" as the three-letter abbreviation for time
zone, and MUST be assumed when reading the asctime format.
[437:後発 (01/08/26 11:56)]
で、現段階の最新ソースはどこにあるの?
[438:後発 (01/08/26 11:56)]
あれ?書き込むと?
read.cgi ver5.26+ (01/10/21-)