[ZBX-14537] HTTP agent JSON Content-Type is not set by default when using custom headers Created: 2018 Jun 28  Updated: 2024 Apr 10  Resolved: 2018 Jun 29

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: 4.0.0alpha8
Fix Version/s: 4.0.0alpha9, 4.0 (plan)

Type: Problem report Priority: Trivial
Reporter: Vladislavs Sokurenko Assignee: Vladislavs Sokurenko
Resolution: Fixed Votes: 0
Labels: headers, http, item, json
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File content-type.png    
Issue Links:
Duplicate
Sub-task
part of ZBXNEXT-4488 RestAPI trapper interface on Zabbix s... Closed
Team: Team A
Team: Team A
Sprint: Sprint 37
Story Points: 0.125

 Description   

Configure following HTTP agent item

Expected:

POST / HTTP/1.1
Host: localhost:8080
Accept: */*
DNT: 1
Content-Type: application/json
Content-Length: 14

{ "foo":"bar"}

Actual:

POST / HTTP/1.1
Host: localhost:8080
Accept: */*
DNT: 1
Content-Length: 14
Content-Type: application/x-www-form-urlencoded

{ "foo":"bar"}

Zabbix shall check for Content-Type existence when setting default application/json Content-Type, instead it checks only for headers to exist.



 Comments   
Comment by Vladislavs Sokurenko [ 2018 Jun 28 ]

Fixed in development branch:
svn://svn.zabbix.com/branches/dev/ZBX-14537

Comment by Vladislavs Sokurenko [ 2018 Jun 28 ]

Fixed in:

  • pre-4.0.0alpha9 (trunk) r82325
Generated at Thu Apr 18 11:37:05 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.