I'm using Mvc-Mini-Profiler (what a great product!). Using my ordinary web browser everything seems to work fine but as soon as I use my own http client (basic http 1.1 without cookie support) the amount of X-MiniProfiler-Ids in the http header increases. This happens quite rapidly and becomes quite many in a short amount of time (11kB and above of data).
Can the lack of cookies make Mvc-Mini-Profiler work this way or could anything be wrong with my implementation?
This is by design I think. Though we could improve the implementation a bit.
The X-MiniProfiler-Ids
need to be "consumed", they only show up when profiling is enabled. The reason it works this way is so you can profile POST
and redirects.
We probably should set some clear upper limit there (like 20 or so) - please post a bug for that.
However, since you never really plan to consume any profiling blocks for you HTTP client, I would recommend abandoning profiling if the useragent is your HTTP client.
You can do this by adding a conditional before:
// don't run if UserAgent is "my http client"
if(notMyUserAgent)
MvcMiniProfiler.MiniProfiler.Start();