Welcome! Log In Create A New Profile

Advanced

Запись в лог значения поля header после x-accel-redirect

March 20, 2010 05:38PM
Вечер добрый, столкнулся с такой проблемой.

nginx-0.7.64

log_format traffic '$remote_addr $sent_http_userid $sent_http_key';

location / {
root /var/www;
index index.php;
rewrite ^/download/(.*) /d.php?path=$1 last;
}

location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
...
}

location /protected {
root /var/www/files;
internal;
}

d.php
<?php
$u = rand(1000, 1100);
$k = md5(rand(1,10));
$path = $_GET["path"];
header("userid: $u");
header("key: $k");
?>

Вот в таком виде все работает как и ожидалось, в traffic лог попадают значения userid и key. но стоит только добавить непосредственно отдачу файла

header("Content-disposition: attachment; filename=".$path);
header("X-Accel-Redirect: /protected/". $path);

userid и key в лог не пишутся, вернее не передаются.

Научите как быть.
Subject Author Posted

Запись в лог значения поля header после x-accel-redirect

fortrap March 20, 2010 05:38PM

Re: Запись в лог значения поля header после x-accel-redirect

Maxim Dounin March 20, 2010 07:06PM

Re: Запись в лог значения поля header после x-accel-redirect

fortrap March 20, 2010 07:13PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 298
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready