Discussion:
HTTP protocol filter / HTTP refresh problem
(too old to reply)
Chris
2003-11-26 01:45:55 UTC
Permalink
Hi,

I've written a temporary Namespace handler for the HTTP protocol. It
works essentially as a filter; when it gets called at various points in
the HTTP request/response processing flow, it looks at the
request/response and then typically just passes it along to the default
HTTP protocol handler for the real processing.

Everything seems to be working fine except when the site I browse
returns a REFRESH header - IE ignores the header and stops the
navigation instead of redirecting to the location specified by the
REFRESH header like it normally does when using the default HTTP
protocol handler directly.

For example, if the page http://localhost/testpage.html returns header
like below (from IHttpNegotiate::OnResponse):

HTTP/1.1 200 OK
Date: Tue, 25 Nov 2003 18:59:56 GMT
Cache-control: no-cache
P3P: CP="PHY ONL PRE STA CURi OUR IND"
REFRESH: 0;URL=http://www.yahoo.com
Content-length: 270
Content-type: text/html

The browser does not redirect to the page http://www.yahoo.com, as it
does when no temporary namespace handler is registered - it stops at
the page http://localhost/testpage.html.

Any ideas why this might be the case / what else our handler needs to be
doing to make this work?

thx,
Chris
Wei-Dong Xu [MSFT]
2003-11-27 03:46:13 UTC
Permalink
Hi Chris,

Thank you for posing in MSDN managed newsgroup!

From my experience on this issue, I'd suggest you can follow the kb article 240774 to enable the refresh in the IIS. Then you can test whether your
ie client can redirect to the url you specified in the HTTP header. Please go to:
240774 HOW TO: Enable Client Pull for Web Servers, Sites, and Folders
http://support.microsoft.com/?id=240774

If IE still can't redirect to the URL, this means your temparory namespace handler works very well. The issue may be regarding the IE.

It will be appreciated you tell me the test result. Furthermore, you can also tell me more information about your scenario so that I can test this for
you.

Please feel free to let me know if you have any further questions.

Does this answer your question? Thank you for using Microsoft NewsGroup!

Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
Chris
2003-11-28 17:53:08 UTC
Permalink
Post by Wei-Dong Xu [MSFT]
From my experience on this issue, I'd suggest you can follow the kb article 240774 to enable the refresh in the IIS. Then you can test whether your
240774 HOW TO: Enable Client Pull for Web Servers, Sites, and Folders
http://support.microsoft.com/?id=240774
Hi Wei-Dong,

The above article discusses enabling a web *server* to instruct browsers
to do auto refreshes, so is not relevant to my question.
Post by Wei-Dong Xu [MSFT]
If IE still can't redirect to the URL, this means your temparory namespace handler works very well. The issue may be regarding the IE.
Actually it looks like my namespace handler is somehow interfering with
the default handler's, or IE's, handling of the HTTP REFRESH header send
in the server response. So I need your help in identifying why this
might be the case.
Post by Wei-Dong Xu [MSFT]
It will be appreciated you tell me the test result. Furthermore, you can also tell me more information about your scenario so that I can test this for
you.
My scenario is installing a namespace handler filter for IE, as I
described in the first post, and then visiting a web page that returns
an HTTP REFRESH header. Without my handler, IE redirects to the
specified URL. With my handler installed, which simply calls through to
the default handler, for some reason IE doesn't redirect and I need help
in figuring out why.
Post by Wei-Dong Xu [MSFT]
Please feel free to let me know if you have any further questions.
Does this answer your question? Thank you for using Microsoft NewsGroup!
Unfortunately not. Please try again.

thx,
Chris
Wei-Dong Xu [MSFT]
2003-11-29 04:00:05 UTC
Permalink
Hi Chris,

Thank you for replying!

From my experience on this, I'd suggest you may fine the reason with WFtech tool which is released by Microsoft for the troubleshooting of IIS. The
tool provides http trace function for you to obtain the output of IIs following your request. You can alos customize your request according to yoru
scenario. Please go to:
284285 HOW TO: Use Wfetch.exe to Troubleshoot HTTP Connections
http://support.microsoft.com/?id=284285

Please feel free to let me know if you have any further questions.

Does this answer your question? Thank you for using Microsoft NewsGroup!

Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
Chris
2003-11-29 22:55:34 UTC
Permalink
Post by Wei-Dong Xu [MSFT]
Hi Chris,
Thank you for replying!
From my experience on this, I'd suggest you may fine the reason with WFtech tool which is released by Microsoft for the troubleshooting of IIS. The
tool provides http trace function for you to obtain the output of IIs following your request. You can alos customize your request according to yoru
284285 HOW TO: Use Wfetch.exe to Troubleshoot HTTP Connections
http://support.microsoft.com/?id=284285
As I said in my last response, *this has nothing whatsoever to do with
IIS*.

This is an Internet Explorer programming question. Please hand this
over to somebody who's familiar with IE programming and specifically
asynchronous pluggable protocol handlers.

You can read up on the technology yourself if you wish at
http://msdn.microsoft.com/library/default.asp?url=/workshop/networking/pluggable/pluggable.asp
.

thx,
Chris
Chris
2003-12-02 21:15:14 UTC
Permalink
All -- here's a follow-up response I sent to an MSDN newsgroup mgr. in
response to his offline follow-up to me. Posting here in hopes that
others reading this will have suggestions.

thx,
Chris
In a message dated 12/1/2003 3:06:32 PM Pacific Standard Time, John
Hi, Chris
I just received the following link from one of the IE Client Dev tech
leads. .
303740 INFO: Implementing HTTP-like Asynchronous Pluggable Protocols
http://support.microsoft.com/?id=303740
It's not good news if it applies, but it may clarify things somewhat.
I still have a couple folks who need to get back to me, so we shall see.

Ya, I've seen that; in fact the only reason I'm looking into doing an
APP is that I've been unable to identify any other means of
accomplishing the following for IE. Can you please also ask about other
ways to accomplish this besides APP?

Requirement: I wish to extend IE (and ideally any WinInet or URL
Moniker-using app) to support a custom HTTP authentication scheme for
our intranet.

Options explored:

1. Registering new HTTP authentication scheme / DLL. Per
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/handling_authentication.asp
, Wininet supports a number of different HTTP authentication schemes and
has a generic mechanism for registering the DLL to use for each.
However, I've been unable to find any documentation on addressing
whether IE will call out to a new, custom (not listed in the table on
that page) auth scheme if it's listed in that key in the registry.
Let's say I want to use a new HTTP auth scheme "foo". If I add a key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Security\foo and
point it to my DLL, will IE call out to it when it receives a
WWW-Authenticate header specifying "foo" as the auth scheme? If so,
what is the API that IE will call on my foo.dll in order to enable
foo.dll to see the WWW-Authenticate header contents and to supply an
appropriate Authorization: response header?

2. Implementing new auth scheme via a HTTP request/response callback
handler. I've looked into several possible ways to get IE to callback
into my code at appropriate points in its HTTP request/response
processing sequence in order, so as to enable my code to read
WWW-Authenticate response headers sent by a server and to attach
outgoing request Authorization headers. Here are the approaches I've
investigated and the issues / questions I have about each:

a. Register callback via WinInet's InternetSetStatusCallback() fn.
- Issue: requires having access to the HINTERNET handles being
used by IE.
- Question: is there any way to access the HINTERNET handles
being used by IE such that I could register my callbacks via
InternetSetStatusCallback()?

b. Implement APP wrapper for HTTP/HTTPs protocol handlers.
- Issue: as we've been discussing + 303740 INFO: Implementing
HTTP-like Asynchronous Pluggable Protocols
http://support.microsoft.com/?id=303740

Bottom line -- what do your IE experts suggest as the (best) way for me
to implement my custom HTTP auth scheme for IE?

thx,
Chris
Post by Wei-Dong Xu [MSFT]
Hi Chris,
Thank you for replying!
From my experience on this, I'd suggest you may fine the reason with
WFtech tool which is released by Microsoft for the troubleshooting of
IIS. The
Post by Wei-Dong Xu [MSFT]
tool provides http trace function for you to obtain the output of IIs
following your request. You can alos customize your request according to
yoru
Post by Wei-Dong Xu [MSFT]
284285 HOW TO: Use Wfetch.exe to Troubleshoot HTTP Connections
http://support.microsoft.com/?id=284285
As I said in my last response, *this has nothing whatsoever to do with
IIS*.
This is an Internet Explorer programming question. Please hand this
over to somebody who's familiar with IE programming and specifically
asynchronous pluggable protocol handlers.
You can read up on the technology yourself if you wish at
http://msdn.microsoft.com/library/default.asp?url=/workshop/networking/pluggable/pluggable.asp
.
thx,
Chris
Chris
2003-12-02 21:14:33 UTC
Permalink
All -- here's a follow-up response I sent to an MSDN newsgroup mgr. in
response to his offline follow-up to me. Posting here in hopes that
others reading this will have suggestions.

thx,
Chris
Hi, Chris
I just received the following link from one of the IE Client Dev tech leads. .
303740 INFO: Implementing HTTP-like Asynchronous Pluggable Protocols
http://support.microsoft.com/?id=303740
It's not good news if it applies, but it may clarify things somewhat. I still have a couple folks who need to get back to me, so we shall see.
Ya, I've seen that; in fact the only reason I'm looking into doing an
APP is that I've been unable to identify any other means of
accomplishing the following for IE. Can you please also ask about other
ways to accomplish this besides APP?

Requirement: I wish to extend IE (and ideally any WinInet or URL
Moniker-using app) to support a custom HTTP authentication scheme for
our intranet.

Options explored:

1. Registering new HTTP authentication scheme / DLL. Per
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/handling_authentication.asp
, Wininet supports a number of different HTTP authentication schemes and
has a generic mechanism for registering the DLL to use for each.
However, I've been unable to find any documentation on addressing
whether IE will call out to a new, custom (not listed in the table on
that page) auth scheme if it's listed in that key in the registry.
Let's say I want to use a new HTTP auth scheme "foo". If I add a key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Security\foo and
point it to my DLL, will IE call out to it when it receives a
WWW-Authenticate header specifying "foo" as the auth scheme? If so,
what is the API that IE will call on my foo.dll in order to enable
foo.dll to see the WWW-Authenticate header contents and to supply an
appropriate Authorization: response header?

2. Implementing new auth scheme via a HTTP request/response callback
handler. I've looked into several possible ways to get IE to callback
into my code at appropriate points in its HTTP request/response
processing sequence in order, so as to enable my code to read
WWW-Authenticate response headers sent by a server and to attach
outgoing request Authorization headers. Here are the approaches I've
investigated and the issues / questions I have about each:

a. Register callback via WinInet's InternetSetStatusCallback() fn.
- Issue: requires having access to the HINTERNET handles being
used by IE.
- Question: is there any way to access the HINTERNET handles
being used by IE such that I could register my callbacks via
InternetSetStatusCallback()?

b. Implement APP wrapper for HTTP/HTTPs protocol handlers.
- Issue: as we've been discussing + 303740 INFO: Implementing
HTTP-like Asynchronous Pluggable Protocols
http://support.microsoft.com/?id=303740

Bottom line -- what do your IE experts suggest as the (best) way for me
to implement my custom HTTP auth scheme for IE?

thx,
Chris
Post by Wei-Dong Xu [MSFT]
Hi Chris,
Thank you for replying!
From my experience on this, I'd suggest you may fine the reason with WFtech tool which is released by Microsoft for the troubleshooting of IIS. The
tool provides http trace function for you to obtain the output of IIs following your request. You can alos customize your request according to yoru
284285 HOW TO: Use Wfetch.exe to Troubleshoot HTTP Connections
http://support.microsoft.com/?id=284285
As I said in my last response, *this has nothing whatsoever to do with
IIS*.
This is an Internet Explorer programming question. Please hand this
over to somebody who's familiar with IE programming and specifically
asynchronous pluggable protocol handlers.
You can read up on the technology yourself if you wish at
http://msdn.microsoft.com/library/default.asp?url=/workshop/networking/pluggable/pluggable.asp
.
thx,
Chris
Ariel Molina
2003-12-01 23:19:06 UTC
Permalink
Hello Chris,

Looking at the nature of this issue, I would highly recommend you contact
Microsoft Product Support Services since it would require intensive
troubleshooting which would be done quickly and effectively with direct
assistance from a Microsoft Support Professional. With the assistance of
a Support Professional we can debug both your namespace handler as well as
the native behavior of IE and we can give you a solid answer as to why the
REFRESH is ignored.

Microsoft support home page: http://support.microsoft.com.

To view support options:
http://support.microsoft.com/default.aspx?scid=sz;en-us;top.

To submit an online request:
http://support.microsoft.com/default.aspx?scid=fh;en-us;incidentsubmit.


Ariel Molina
Microsoft Online Support
Loading...