| Author |
|
mosheberg Newbie

Joined: 25 October 2004 Location: United States
Online Status: Offline Posts: 37
|
| Posted: 27 May 2011 at 12:12pm | IP Logged
|
|
|
I have compression enabled for text/html in my ISA server configured
for reverse proxy and I'm attempting to disable this for a particular
URL.
I have the following rewrite rule to remove the inbound Accept-
Encoding header which I was hoping would block the ISA server from
sending back to the client a compressed file. (This tactic has worked
for me in other scenarios.)
Code:
RewriteCond URL /search/.*
RewriteHeader Accept-Encoding: .* $1 |
|
|
The rule works to the extent that if I put the F flag it blocks the
page. But it seams that this header never reaches the web server with
or without this rule.
My theory is that this header is handled by the ISA server and that
although ISAPI_Rewrite can see the header and even act on it (F
flag), it is unable to supersede the ISA compression filter and block
it from receiving it to begin with.
Can anyone confirm this or think of another work around?
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 31 May 2011 at 1:59am | IP Logged
|
|
|
Could you please clarify what "compressed file" means - a zip archive or IIS-compressed html page?
__________________ Regards,
Anton
|
| Back to Top |
|
| |
mosheberg Newbie

Joined: 25 October 2004 Location: United States
Online Status: Offline Posts: 37
|
| Posted: 31 May 2011 at 6:34am | IP Logged
|
|
|
We are talking about an html text compressed page using
GZip, but the compression is done at the ISA server not
the IIS server.
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 01 June 2011 at 7:13am | IP Logged
|
|
|
Sorry for asking what may seem to be an unimportant question, but why do you need this type of behavior (not give out compressed files)?
__________________ Regards,
Anton
|
| Back to Top |
|
| |
mosheberg Newbie

Joined: 25 October 2004 Location: United States
Online Status: Offline Posts: 37
|
| Posted: 01 June 2011 at 7:22am | IP Logged
|
|
|
In order for an ASP response.flush to be seen by the end
users browser, in my testing, it seems that it is unable
to work at the same time as compression.
This is logical because the entire page is compressed as
one and only then sent to the client, response.flush
attempts to break up the page so the client will see part
of it before the reset is done generating in IIS.
In this case, we want to implement it on a search page
which can take time to load depending on the search term,
with a response.flush, we can show a loading message
until the query is completed and then hide that loading
message. The end user will not try to click again and
will be more patient with that loading message.
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 02 June 2011 at 5:15am | IP Logged
|
|
|
Please try to fix your rules a bit:
RewriteCond URL .*/search/.*
RewriteHeader Accept-Encoding: .* $1
And please check and report what headers you get before and after ISA server.
__________________ Regards,
Anton
|
| Back to Top |
|
| |
mosheberg Newbie

Joined: 25 October 2004 Location: United States
Online Status: Offline Posts: 37
|
| Posted: 02 June 2011 at 8:28am | IP Logged
|
|
|
The rule fix didn't solve it.
From the Client's perspective (going through the ISA
server):
Request Headers:
Accept-Encoding gzip, deflate
Response Headers:
Content-EContent-Encoding gzip
Vary Accept-Encoding
Transfer-Encoding chunked
From the IIS servers perspective however, it never
receives any Accept-Encoding header and no compression
response headers are sent either.
When I test directly to the IIS server (no ISA), IIS
reportes this header:
HTTP_ACCEPT_ENCODING:gzip, deflate
But IIS is not set to do compression so it does not
respond.
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 03 June 2011 at 7:13am | IP Logged
|
|
|
Still can't figure out why it happens.
Please do the following requests in wFetch:
- request to IIS (bypassing ISA) setting Accept-Encoding header
- request to IIS (bypassing ISA) without setting Accept-Encoding header
- request to ISA setting Accept-Encoding header
- request to ISA without setting Accept-Encoding header
After that send us all wFetch logs obtained.
__________________ Regards,
Anton
|
| Back to Top |
|
| |
mosheberg Newbie

Joined: 25 October 2004 Location: United States
Online Status: Offline Posts: 37
|
| Posted: 03 June 2011 at 4:07pm | IP Logged
|
|
|
- request to IIS (bypassing ISA) setting Accept-Encoding header
REQUEST: **************\n
GET /search/results1.asp?searchword=testing HTTP/1.1\r\n
Accept-Encoding: gzip, deflate\r\n
Host: www.domain.org.internal\r\n
Accept: */*\r\n
\r\n
RESPONSE: **************\n
HTTP/1.1 200 OK\r\n
Connection: close\r\n
Date: Fri, 03 Jun 2011 20:55:18 GMT\r\n
Server: Microsoft-IIS/6.0\r\n
X-Powered-By: ASP.NET\r\n
Content-Type: text/html; Charset=UTF-8\r\n
Set-Cookie: COSESSION=2D25666534000; path=/\r\n
Cache-control: private\r\n
\r\n
- request to IIS (bypassing ISA) without setting Accept-Encoding header
REQUEST: **************\n
GET /search/results1.asp?searchword=testing HTTP/1.1\r\n
Host: www.domain.org.internal\r\n
Accept: */*\r\n
\r\n
RESPONSE: **************\nHTTP/1.1 200 OK\r\n
Connection: close\r\n
Date: Fri, 03 Jun 2011 20:54:25 GMT\r\n
Server: Microsoft-IIS/6.0\r\n
X-Powered-By: ASP.NET\r\n
Content-Type: text/html; Charset=UTF-8\r\n
Set-Cookie: COSESSION=2D29247303000; path=/\r\n
Cache-control: private\r\n
\r\n
- request to ISA setting Accept-Encoding header
REQUEST: **************\n
GET /search/results1.asp?searchword=testing HTTP/1.1\r\n
Accept-Encoding: gzip, deflate\r\n
Host: www.domain.org\r\n
Accept: */*\r\n
\r\n
RESPONSE: **************\n
HTTP/1.1 200 OK\r\n
Connection: close\r\n
Date: Fri, 03 Jun 2011 20:51:02 GMT\r\n
Content-Type: text/html; Charset=UTF-8\r\n
Cache-control: private\r\n
Content-Encoding: gzip\r\n
Vary: Accept-Encoding\r\n
Transfer-Encoding: chunked\r\n
\r\n
- request to ISA without setting Accept-Encoding header
REQUEST: **************\n
GET /search/results1.asp?searchword=testing HTTP/1.1\r\n
Host: www.domain.org\r\n
Accept: */*\r\n
\r\n
RESPONSE: **************\n
HTTP/1.1 200 OK\r\n
Connection: close\r\n
Date: Fri, 03 Jun 2011 20:52:20 GMT\r\n
Content-Type: text/html; Charset=UTF-8\r\n
Cache-control: private\r\n
\r\n
|
| Back to Top |
|
| |
mosheberg Newbie

Joined: 25 October 2004 Location: United States
Online Status: Offline Posts: 37
|
| Posted: 10 June 2011 at 10:18am | IP Logged
|
|
|
Anton, any update on this? Thanks.
|
| Back to Top |
|
| |
Yaroslav Admin Group

Joined: 15 August 2002
Online Status: Offline Posts: 6521
|
| Posted: 10 June 2011 at 4:00pm | IP Logged
|
|
|
I think you are right. Most probably the ISA compression filter has a higher priority than the ISAPI_Rewrite. So, it sees an original Accept-Encoding header bofore it's change. Nothing could be done in this case (unless you will be able to change filter priorities. But I do not know whether it is possible or not).
As for a Response.Flush vs a compression. The Response.Flush should not cause any troubles since it is being used with the response buffering turned on. So, a server send a whole response only after a Response.Flush or a Response.End or a page completion.
__________________ Yaroslav Govorunov,
Helicon Tech
|
| Back to Top |
|
| |
mosheberg Newbie

Joined: 25 October 2004 Location: United States
Online Status: Offline Posts: 37
|
| Posted: 13 June 2011 at 9:35am | IP Logged
|
|
|
Issue resolved!
I did find a way to change the priority built right into
the ISA GUI: Configuration | Add-ins | Web Filters (tab),
I then moved the ISAPI_Rewrite filter above the
Compression Filter and it’s now working exactly as
expected.
Yaroslav, re Response.Flush and ISA server aside, you
can’t send part of the page using a Response.Flush to the
client if you are using compression (at least with the
Microsoft ISAPI Comression filters.) We’ve never been
able to get it to work and it’s logical, the page is
compressed and then all sent to the browser.
|
| Back to Top |
|
| |