cloudveiltech / Filter-Windows

HTTP/S Content Filter for Windows 7 and newer
Mozilla Public License 2.0
9 stars 13 forks source link

Fleetmatics does not work properly #147

Closed kfreezen closed 6 years ago

kfreezen commented 6 years ago

To replicate: Site: reveal.fleetmatics.com

Go to Reports Try to run a Driver Log Report

Result: Side panel is blank and shouldn't be.

montesound commented 6 years ago

It won't generate a Driver Log Report with 1.6.24. It generates fine with the filter removed.

kfreezen commented 6 years ago

There are two options for this: Either Content-Type is not getting set correctly, or the server is expecting a different Accept-Encoding than it's getting.

It seems to line up most with an incorrect Content-Type getting set, however, that header seems like it should be getting added.

kfreezen commented 6 years ago

It does seem to be Content-Type. fleetmatics does not use the Content-Type header correctly and prefers to set it on GET requests without a request body. Unfortunately, this conflicts with C#'s opinions about when a Content-Type header should get set.

kfreezen commented 6 years ago

Best fix is to refactor and use HttpWebRequest. HttpRequestMessage is too opinionated about what should be allowed and what shouldn't be. The other option is reflection, but that's rather nasty. https://stackoverflow.com/a/28108775

kfreezen commented 6 years ago

Ended up using reflection. This should be fixed in 1.6.27