J
_jpg_
Hi,
I need to read (& store) all the custom response headers in an
HttpResponse. I am writing an HttpModule and hence do not know what
headers could have been added (but need to cache them for later use).
The only relevant methods that I can see are
AppendHeader/AddHeader(string, string) and ClearHeaders() both of
which are obviously useless to me. Is there any way of reading the
custom headers?
I also considered replacing the HttpResponse object with my own
wrapper that just passes me the headers which I can add later, but
HttpContext.Response is read-only.
Surely this should be possible?
Thanks
jpg
ps. I have actually got it working currently, I am using reflection to
'bypass' the fact that the _customHeaders field is private, although
this is obviously not the best way to do it.
I need to read (& store) all the custom response headers in an
HttpResponse. I am writing an HttpModule and hence do not know what
headers could have been added (but need to cache them for later use).
The only relevant methods that I can see are
AppendHeader/AddHeader(string, string) and ClearHeaders() both of
which are obviously useless to me. Is there any way of reading the
custom headers?
I also considered replacing the HttpResponse object with my own
wrapper that just passes me the headers which I can add later, but
HttpContext.Response is read-only.
Surely this should be possible?
Thanks
jpg
ps. I have actually got it working currently, I am using reflection to
'bypass' the fact that the _customHeaders field is private, although
this is obviously not the best way to do it.