При обновлении OTRS c 3.0.x до 4 возникла проблема, точнее их много, но пока самая актуальная связанная с работой модуля mod_perl.
В конфиге apache дефолтовая настройка для ОТРС:
Код: Выделить всё
<IfModule mod_perl.c>
Perlrequire /opt/otrs/scripts/apache2-perl-startup.pl
PerlModule Apache2::Reload
PerlInitHandler Apache2::Reload
DirectoryIndex index.pl index.html
<Location /otrs>
ErrorDocument 403 /otrs/index.pl
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
Options +ExecCGI
PerlOptions +ParseHeaders
PerlOptions +SetupEnv
</Location>
<Location /otrs/nph-genericinterface.pl>
PerlOptions -ParseHeaders
</Location>
</IfModule>
В FIREBUG можно увидеть, что при обращении к прикрепленному файлу сервер возвращает 500 Internal Server Error
Заголовок ответа:
Код: Выделить всё
HTTP/1.1 500 Internal Server Error
Date: Tue, 12 Jan 2016 12:05:03 GMT
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips mod_perl/2.0.9dev Perl/v5.16.3
Content-Length: 17243
Cache-Control: max-age=0, no-store
Connection: close
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; name="=?windows-1251?Q?имя_файла_изменено
Код: Выделить всё
GET /otrs/index.pl?Action=AgentTicketAttachment;ArticleID=ххх;FileID=3 HTTP/1.1
Host: ххх.ru
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://ххх/otrs/index.pl?Action=AgentTicketZoom;TicketID=ххх
Cookie: OTRSAgentInterface=ххх
Connection: keep-alive
Код: Выделить всё
[Tue Jan 12 15:03:36.603219 2016] [core:error] [pid 29422] [client xx.xx.xx.xx:33512] Premature end of script headers: index.pl, referer: https://xxx.ru/otrs/index.pl?Action=AgentTicketZoom;TicketID=ххх
[Tue Jan 12 15:03:36.603271 2016] [perl:warn] [pid 29422] /otrs/index.pl did not send an HTTP header
Если в конфиге апача в секции <IfModule mod_perl.c> закомментировать и добавить AddHandler cgi-script .cgi, то все файлы доступны и их можно скачать.
Код: Выделить всё
#SetHandler perl-script
#PerlResponseHandler ModPerl::Registry
AddHandler cgi-script .cgi
Код: Выделить всё
HTTP/1.1 200 OK
Date: Tue, 12 Jan 2016 12:06:05 GMT
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips mod_perl/2.0.9dev Perl/v5.16.3
Content-Disposition: attachment; filename="блабла-имя-файла-именено.xlsx
X-UA-Compatible: IE=edge,chrome=1
X-Frame-Options: SAMEORIGIN
Content-Length: 17243
Cache-Control: max-age=0, no-store
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; name="=?windows-1251?Q?блаблабла_имя_файла_в_виндовой_кодировке"
В этой же заявке есть другой файл pdf, и от загружается нормально с активированными опциями "SetHandler perl-script"