BugTrack/2249
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
* 添付ファイルには HTTP Last-modified ヘッダをつけるべき ...
- ページ: [[BugTrack2]]
- 投稿者: [[一ユーザー]]
- 優先順位: 低
- 状態: 提案
- カテゴリー: 本体バグ
- 投稿日: 2007-06-18 (月) 18:19:37
- バージョン:
** メッセージ [#sb85464f]
現状添付ファイルにアクセスしてもLast-modifiedが付加されず...
負荷軽減などの観点から[[BugTrack/799]]などで議論されてい...
余談になりますが、現状多くのWebブラウザはタイムスタンプを...
--------
- コメントありがとうございます。ご希望の状態にするために...
- 現状 PukiWiki は RFC2822 形式の時刻表現を使用していない...
- 現状は、[[RFC2616>http://www.studyinghttp.net/cgi-bin/r...
A.6.2. Obsolete dates
The following message uses an obsolete date format, i...
numeric time zone and a two digit year. Note that al...
day-of-week is missing, that is not specific to the o...
it is optional in the current syntax as well.
とあって「Sun, 06 Nov 1994 08:49:37 +0000」の形のみOKに変...
- Last-modified を出力させる改造例 -- &new{2009-08-15 (...
--[[cvs:plugin/attach.inc.php]] (r1.91) 720行目あたり
$filename = htmlspecialchars($filename);
+ $filetime = date('D, d M Y H:i:s', $this->time) . ' +...
ini_set('default_charset', '');
mb_http_output('pass');
pkwk_common_headers();
header('Content-Disposition: inline; filename="' . $f...
header('Content-Length: ' . $this->size);
header('Content-Type: ' . $this->type);
+ header('Last-Modified: ' . $filetime);
@readfile($this->filename);
exit;
}
}
// ファイルコンテナ
class AttachFiles
--[[cvs:plugin/ref.inc.php]] (r1.50) 420行目あたり
}
$file = htmlspecialchars($filename);
$size = filesize($ref);
+ $filetime = date('D, d M Y H:i:s', filemtime($ref) - L...
// Output
pkwk_common_headers();
header('Content-Disposition: inline; filename="' . $fi...
header('Content-Length: ' . $size);
header('Content-Type: ' . $type);
+ header('Last-Modified: ' . $filetime);
@readfile($ref);
exit;
}
?>
--蛇足で、[[BugTrack/799]] の「その他のコメント」で話があ...
break;
}
}
+
+ $filetime = date('D, d M Y H:i:s', filemtime($recent) ...
// Feeding start
pkwk_common_headers();
header('Content-type: application/xml');
+ header('Last-Modified: ' . $filetime);
print '<?xml version="1.0" encoding="UTF-8"?>' . "\n\n";
$r_whatsnew = rawurlencode($whatsnew);
switch ($version) {
-- 追記: さらに蛇足。[[BugTrack/799]] の「ブラウザの挙動(...
---ref プラグインの改造例。[[cvs:plugin/ref.inc.php]] (r1...
}
$file = htmlspecialchars($filename);
$size = filesize($ref);
+ $time = filemtime($ref) - LOCALZONE;
+ $filetime = date('D, d M Y H:i:s', $time) . ' +0000';
+ $etag = sprintf('%x-%x', $size, $time);
// Output
pkwk_common_headers();
header('Content-Disposition: inline; filename="' . $fi...
header('Content-Length: ' . $size);
header('Content-Type: ' . $type);
+ header('Last-Modified: ' . $filetime);
+ header('Etag: ' . $etag);
+
+ if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && isset...
+ $_SERVER['HTTP_IF_MODIFIED_SINCE'] === rtrim($fileti...
+ $_SERVER['HTTP_IF_NONE_MATCH'] === rtrim($etag, "\r\...
+ header('HTTP/1.1 304 Not Modified');
+ exit;
+ }
+
@readfile($ref);
exit;
}
?>
---rss プラグインの改造例。[[cvs:plugin/rss.inc.php]] (r1...
break;
}
}
+
+ $size = strlen($page_title . $whatsnew . $lang . $item...
+ $time = filemtime($recent) - LOCALZONE;
+ $filetime = date('D, d M Y H:i:s', $time) . ' +0000';
+ $etag = sprintf('%x-%x', $size, $time);
// Feeding start
pkwk_common_headers();
header('Content-type: application/xml');
+ header('Last-Modified: ' . $filetime);
+ header('Etag: ' . $etag);
+
+ if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && isset...
+ $_SERVER['HTTP_IF_MODIFIED_SINCE'] === rtrim($fileti...
+ $_SERVER['HTTP_IF_NONE_MATCH'] === rtrim($etag, "\r\...
+ header('HTTP/1.1 304 Not Modified');
+ exit;
+ }
+
print '<?xml version="1.0" encoding="UTF-8"?>' . "\n\n";
$r_whatsnew = rawurlencode($whatsnew);
switch ($version) {
- 時刻に戻さず、文字列のままで比較しているので、' +0000'...
- 良い機会だったので (1)簡易な実装としては、実ファイルの...
#comment
終了行:
* 添付ファイルには HTTP Last-modified ヘッダをつけるべき ...
- ページ: [[BugTrack2]]
- 投稿者: [[一ユーザー]]
- 優先順位: 低
- 状態: 提案
- カテゴリー: 本体バグ
- 投稿日: 2007-06-18 (月) 18:19:37
- バージョン:
** メッセージ [#sb85464f]
現状添付ファイルにアクセスしてもLast-modifiedが付加されず...
負荷軽減などの観点から[[BugTrack/799]]などで議論されてい...
余談になりますが、現状多くのWebブラウザはタイムスタンプを...
--------
- コメントありがとうございます。ご希望の状態にするために...
- 現状 PukiWiki は RFC2822 形式の時刻表現を使用していない...
- 現状は、[[RFC2616>http://www.studyinghttp.net/cgi-bin/r...
A.6.2. Obsolete dates
The following message uses an obsolete date format, i...
numeric time zone and a two digit year. Note that al...
day-of-week is missing, that is not specific to the o...
it is optional in the current syntax as well.
とあって「Sun, 06 Nov 1994 08:49:37 +0000」の形のみOKに変...
- Last-modified を出力させる改造例 -- &new{2009-08-15 (...
--[[cvs:plugin/attach.inc.php]] (r1.91) 720行目あたり
$filename = htmlspecialchars($filename);
+ $filetime = date('D, d M Y H:i:s', $this->time) . ' +...
ini_set('default_charset', '');
mb_http_output('pass');
pkwk_common_headers();
header('Content-Disposition: inline; filename="' . $f...
header('Content-Length: ' . $this->size);
header('Content-Type: ' . $this->type);
+ header('Last-Modified: ' . $filetime);
@readfile($this->filename);
exit;
}
}
// ファイルコンテナ
class AttachFiles
--[[cvs:plugin/ref.inc.php]] (r1.50) 420行目あたり
}
$file = htmlspecialchars($filename);
$size = filesize($ref);
+ $filetime = date('D, d M Y H:i:s', filemtime($ref) - L...
// Output
pkwk_common_headers();
header('Content-Disposition: inline; filename="' . $fi...
header('Content-Length: ' . $size);
header('Content-Type: ' . $type);
+ header('Last-Modified: ' . $filetime);
@readfile($ref);
exit;
}
?>
--蛇足で、[[BugTrack/799]] の「その他のコメント」で話があ...
break;
}
}
+
+ $filetime = date('D, d M Y H:i:s', filemtime($recent) ...
// Feeding start
pkwk_common_headers();
header('Content-type: application/xml');
+ header('Last-Modified: ' . $filetime);
print '<?xml version="1.0" encoding="UTF-8"?>' . "\n\n";
$r_whatsnew = rawurlencode($whatsnew);
switch ($version) {
-- 追記: さらに蛇足。[[BugTrack/799]] の「ブラウザの挙動(...
---ref プラグインの改造例。[[cvs:plugin/ref.inc.php]] (r1...
}
$file = htmlspecialchars($filename);
$size = filesize($ref);
+ $time = filemtime($ref) - LOCALZONE;
+ $filetime = date('D, d M Y H:i:s', $time) . ' +0000';
+ $etag = sprintf('%x-%x', $size, $time);
// Output
pkwk_common_headers();
header('Content-Disposition: inline; filename="' . $fi...
header('Content-Length: ' . $size);
header('Content-Type: ' . $type);
+ header('Last-Modified: ' . $filetime);
+ header('Etag: ' . $etag);
+
+ if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && isset...
+ $_SERVER['HTTP_IF_MODIFIED_SINCE'] === rtrim($fileti...
+ $_SERVER['HTTP_IF_NONE_MATCH'] === rtrim($etag, "\r\...
+ header('HTTP/1.1 304 Not Modified');
+ exit;
+ }
+
@readfile($ref);
exit;
}
?>
---rss プラグインの改造例。[[cvs:plugin/rss.inc.php]] (r1...
break;
}
}
+
+ $size = strlen($page_title . $whatsnew . $lang . $item...
+ $time = filemtime($recent) - LOCALZONE;
+ $filetime = date('D, d M Y H:i:s', $time) . ' +0000';
+ $etag = sprintf('%x-%x', $size, $time);
// Feeding start
pkwk_common_headers();
header('Content-type: application/xml');
+ header('Last-Modified: ' . $filetime);
+ header('Etag: ' . $etag);
+
+ if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && isset...
+ $_SERVER['HTTP_IF_MODIFIED_SINCE'] === rtrim($fileti...
+ $_SERVER['HTTP_IF_NONE_MATCH'] === rtrim($etag, "\r\...
+ header('HTTP/1.1 304 Not Modified');
+ exit;
+ }
+
print '<?xml version="1.0" encoding="UTF-8"?>' . "\n\n";
$r_whatsnew = rawurlencode($whatsnew);
switch ($version) {
- 時刻に戻さず、文字列のままで比較しているので、' +0000'...
- 良い機会だったので (1)簡易な実装としては、実ファイルの...
#comment
ページ名: