Skip to content

MeasurementAnalyticsClient.AdjustUriBeforeRequest cuts strings with special chars #39

@xmedeko

Description

@xmedeko

Sent strings are malformed in the MeasurementAnalyticsClient.AdjustUriBeforeRequest method, when a string contains chars = or &.

E.g. sending

AutoMeasurement.Client.TrackEvent("My Action", "My Custom Category", "My Label id=345");

results in sending label="My Label id" only.

I've solved problem either by using UriFormat.UriEscaped, or fix GetQueryParameters method by q.Split(new char[] {'='}, 2). (Just one of this fix solved problem.)

Note: Such Uri construction, parsing and again construction is often source of problems. (My experience from several other applications.) Better to avoid it. Just construct the right Uri once and send it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions