Explicitly set content type to form data
ClosedPublic

Authored by leinir on Mar 9 2018, 9:28 AM.

Details

Summary

Without this patch, Attica will make a lot of noise when interacting with an OCS server, in the form of a message for each network request asking to have the content type set.

Test Plan

Without patch: A warning is written out for each request
With patch: The warning is gone, and things still work

Diff Detail

Repository
R235 Attica
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
leinir created this revision.Mar 9 2018, 9:28 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptMar 9 2018, 9:28 AM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
leinir requested review of this revision.Mar 9 2018, 9:28 AM
leinir added a reviewer: Frameworks.
apol added a subscriber: apol.Mar 9 2018, 11:13 AM

Which warning? How does changing to "application/x-www-form-urlencoded" help?

In D11172#221854, @apol wrote:

Which warning? How does changing to "application/x-www-form-urlencoded" help?

Sorry, i forgot to add it in the description. Specifically, this warning:
content-type missing in HTTP POST, defaulting to application/x-www-form-urlencoded. Use QNetworkRequest::setHeader() to fix this problem.
So, quite literally, this change has no effect other than silencing that warning which insists that i should silence it...

apol accepted this revision.Mar 9 2018, 11:35 AM
This revision is now accepted and ready to land.Mar 9 2018, 11:35 AM
This revision was automatically updated to reflect the committed changes.