Skip to content

Ensure the event published by ExconPublisher is compatible with URI

Issue gitlab-org/gitlab#301009 (closed)

Labkit::ExconPublisher injects into Excon's middleware system to broadcast events when there is any HTTP request triggered. It uses Excon's datum standard object to extract the event information. The query field in this object may contain two kinds of value: String and Hash. Internally Excon converts the Hash object into a query string before composing the full URL for the request. However, it leaves the original object unchanged. That makes the event consumers surprised. This MR is to convert the query hash object to a query string, and explicitly enforce the types of other URI components.

Other publishers (Labkit::NetHttpPublisher and Labkit::HtppClientPublisher) create the events from already URI object. Therefore they are safe.

Merge request reports