HomePhabricator

editquality: set Content-type when sending events to EventGate

Description

editquality: set Content-type when sending events to EventGate

The error that we were debugging recently about EventGate
rejecting the test score event (from ml-staging) due to
the missing meta.stream value was due to the content type
set by Tornado, application/x-www-form-urlencoded, that
causes EventGate to probably fail parsing the POST's body
returning the error.

I tested an event generated by this code using the "wrong"
Content-Type and curl (from stat1004), I was able to
reproduce the error without any issue. Using the correct
Content-Type worked perfectly.

Bug: T301878
Change-Id: I9c98ac8049c8f7c24750348a3dd0e2df2069b54e

Details

Provenance
elukeyAuthored on Jul 15 2022, 8:00 AM
Parents
rMLIS6a7e089706fd: editquality: use json.dumps instead of urlencode for EventGate
Branches
Unknown
Tags
Unknown
References
refs/changes/98/814098/2
ChangeId
I9c98ac8049c8f7c24750348a3dd0e2df2069b54e