[ZBX-12666] Fix ETag support in jsLoader.php Created: 2017 Sep 03  Updated: 2024 Apr 10  Resolved: 2017 Oct 18

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 3.4.1
Fix Version/s: 3.0.13rc1, 3.2.10rc1, 3.4.4rc1, 4.0.0alpha1, 4.0 (plan)

Type: Patch request Priority: Trivial
Reporter: Alex Vorona Assignee: Gregory Chalenko
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

CentOS 7, zabbix 3.4.1, php-fpm 7.1, nginx 1.12.1 with gzip compression enabled


Attachments: Text File jsLoader.php.patch    
Team: Team B
Sprint: Sprint 17, Sprint 18, Sprint 19
Story Points: 0.5

 Description   

I use zabbix 3.4.1 with nginx and gzip compression. jsLoader.php responses are compressed, but they cannot be cached by browser due to 2 cross-dependant reasons:
1) ETag header value is malformed in jsLoader.php, it should be quoted with double quotes, see https://tools.ietf.org/html/rfc7232#section-2.3 . Nginx removes such malformed ETag header during compression, see https://github.com/nginx/nginx/blob/3d42fcd6d004a6875d474becec5d6d91a16e4e07/src/http/ngx_http_core_module.c#L1855
2) jsLoader.php ETag verification doesn't support weak ETag value, which is used by nginx instead of ETag after gzip compression.

Please check attached patch, it works in my tests.



 Comments   
Comment by Gregory Chalenko [ 2017 Sep 27 ]

(1) No translation strings changes

Miks.Kronkalns CLOSED

Comment by Gregory Chalenko [ 2017 Oct 18 ]

Fixed in:

  • 3.0.12rc1 r73342
  • 3.2.9rc1 r73343
  • 3.4.4rc1 r73656
  • 4.0.0alpha1(trunk) r73657
Generated at Thu Apr 25 10:09:52 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.