J
Johann Blake
I have an application that intercepts a user clicking on a link in
Pocket Internet Explorer (PIE). This is possible since the web page
the user is viewing is created by my application and each link uses:
http://127.0.0.1:59500/xxx.htm
where xxx is the name of some web page stored locally on the user's
PDA.
When the user clicks on a link, my application acts like a mini web
server and intercepts the request. I then want to redirect the browser
to a local file.
I have access to the underlying stream that gets sent back to PIE so I
can write whatever I want to the browser.
I have tried using HTTP codes such as 301 and 302 along with
additional header information. This doesn't work. PIE continues to
call my web server even after I close the socket that it opened.
Here is what an example of using response codes looks like:
streamWriter.WriteLine("HTTP/1.1 301 Moved Permanently");
streamWriter.WriteLine("Location: " + file);
streamWriter.WriteLine("Connection: close");
streamWriter.WriteLine("Content-Type: text/html");
streamWriter.WriteLine();
I also tried using a META tag such as:
<META HTTP-EQUIV="Refresh" CONTENT="5" URL="xxx.htm">
This doesn't do anything.
Any suggestions?
Thanks
Johann
Pocket Internet Explorer (PIE). This is possible since the web page
the user is viewing is created by my application and each link uses:
http://127.0.0.1:59500/xxx.htm
where xxx is the name of some web page stored locally on the user's
PDA.
When the user clicks on a link, my application acts like a mini web
server and intercepts the request. I then want to redirect the browser
to a local file.
I have access to the underlying stream that gets sent back to PIE so I
can write whatever I want to the browser.
I have tried using HTTP codes such as 301 and 302 along with
additional header information. This doesn't work. PIE continues to
call my web server even after I close the socket that it opened.
Here is what an example of using response codes looks like:
streamWriter.WriteLine("HTTP/1.1 301 Moved Permanently");
streamWriter.WriteLine("Location: " + file);
streamWriter.WriteLine("Connection: close");
streamWriter.WriteLine("Content-Type: text/html");
streamWriter.WriteLine();
I also tried using a META tag such as:
<META HTTP-EQUIV="Refresh" CONTENT="5" URL="xxx.htm">
This doesn't do anything.
Any suggestions?
Thanks
Johann