473,564 Members | 2,798 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

inconsistent response to http post request in .net proxy

All,

I am writing an HTTP 1.1 compliant proxy in c#.NET, for use as a proxy
server for any web browser (IE, firefox, etc). I've got it working
fine for GET requests. However, when a POST request is issued by IE, I
find that sometimes IE does not render the page, even though my proxy
reports that it successfully sent the response from the server back to
IE. So, in IE a blank page is rendered. If I use a plugin like
IEWatch, it seems to show the correct response headers and content
coming from the proxy.

Additionally, if I step through the proxy with the debugger in Visual
Studio, the problem does not reproduce. This is perplexing because I
am only using the synchronous socket API's in system.net.sock ets.
Also, if I issue the same POST request with firefox, the problem does
not reproduce. So it's an issue specific to IE as the client. Any
ideas? Does IE require HTTP connections to be handled in a specific
way? Or perhaps does it expect intermediary proxies to handle
responses in a specific way?

Thanks

Jan 24 '07 #1
4 2222
Hi figelwump,

Can you view the source of the response page?(View>Sour ce menu)
If so it may be you have malformed html in your response page (orphaned
tags, duplicate tag attributes). These have been causing rendering problems
in IE6 SP2 and IE7, but not in other browsers.

Regards.
<fi*******@gmai l.comwrote in message
news:11******** **************@ v33g2000cwv.goo glegroups.com.. .
All,

I am writing an HTTP 1.1 compliant proxy in c#.NET, for use as a proxy
server for any web browser (IE, firefox, etc). I've got it working
fine for GET requests. However, when a POST request is issued by IE, I
find that sometimes IE does not render the page, even though my proxy
reports that it successfully sent the response from the server back to
IE. So, in IE a blank page is rendered. If I use a plugin like
IEWatch, it seems to show the correct response headers and content
coming from the proxy.

Additionally, if I step through the proxy with the debugger in Visual
Studio, the problem does not reproduce. This is perplexing because I
am only using the synchronous socket API's in system.net.sock ets.
Also, if I issue the same POST request with firefox, the problem does
not reproduce. So it's an issue specific to IE as the client. Any
ideas? Does IE require HTTP connections to be handled in a specific
way? Or perhaps does it expect intermediary proxies to handle
responses in a specific way?

Thanks

Jan 25 '07 #2
If I view source in IE, I get the following:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html;
charset=utf-8"></HEAD>
<BODY></BODY></HTML>

.... and it's rendered as a blank page, as expected. However, the proxy
reports the contents that it sends back to the client, and that looks
like the correct HTML. So I'm not sure how/where data is getting lost
here?

On Jan 24, 5:36 pm, "Rob ^_^" <iecustomi...@h otmail.comwrote :
Hi figelwump,

Can you view the source of the response page?(View>Sour ce menu)
If so it may be you have malformed html in your response page (orphaned
tags, duplicate tag attributes). These have been causing rendering problems
in IE6 SP2 and IE7, but not in other browsers.

Regards.<figelw ...@gmail.comwr ote in messagenews:11* *************** ******@v33g2000 cwv.googlegroup s.com...
All,
I am writing an HTTP 1.1 compliant proxy in c#.NET, for use as a proxy
server for any web browser (IE, firefox, etc). I've got it working
fine for GET requests. However, when a POST request is issued by IE, I
find that sometimes IE does not render the page, even though my proxy
reports that it successfully sent the response from the server back to
IE. So, in IE a blank page is rendered. If I use a plugin like
IEWatch, it seems to show the correct response headers and content
coming from the proxy.
Additionally, if I step through the proxy with the debugger in Visual
Studio, the problem does not reproduce. This is perplexing because I
am only using the synchronous socket API's in system.net.sock ets.
Also, if I issue the same POST request with firefox, the problem does
not reproduce. So it's an issue specific to IE as the client. Any
ideas? Does IE require HTTP connections to be handled in a specific
way? Or perhaps does it expect intermediary proxies to handle
responses in a specific way?
Thanks
Jan 25 '07 #3
<fi*******@gmai l.comwrote in message
news:11******** **************@ v33g2000cwv.goo glegroups.com.. .
All,

I am writing an HTTP 1.1 compliant proxy in c#.NET, for use as a proxy
server for any web browser (IE, firefox, etc). I've got it working
fine for GET requests. However, when a POST request is issued by IE, I
find that sometimes IE does not render the page, even though my proxy
reports that it successfully sent the response from the server back to
IE. So, in IE a blank page is rendered. If I use a plugin like
IEWatch, it seems to show the correct response headers and content
coming from the proxy.
Additionally, if I step through the proxy with the debugger in Visual
Studio, the problem does not reproduce.

If it's a timing problem using a debugger or using a proxy tracer
is going to change the timing. BTW have you tried using FiddlerTool
as your tracer too? Note that it has an option to allow it to be "downstream "
so I think you could chain it in just about wherever you want.

This is perplexing because I
am only using the synchronous socket API's in system.net.sock ets.
Also, if I issue the same POST request with firefox, the problem does
not reproduce. So it's an issue specific to IE as the client. Any
ideas?

Yet another undocumented and uncontrollable timeout, plus inappropriate
error recovery for such an event would be my guess.

To test this idea try using a transparent tracer, such as netcap.
Format its .cap files with Ethereal and pay attention to the differences
in timestamps of the packets when it works and contrast those
with the timing when it doesn't.

Does IE require HTTP connections to be handled in a specific
way? Or perhaps does it expect intermediary proxies to handle
responses in a specific way?

Thanks

Analyse what FiddlerTool does, assuming it doesn't exhibit
the problem symtpom?

BTW try the MSDN web forums for IE instead of newsgroups
if you're hoping to catch the attention of responders from MS.
Good luck

Robert Aldwinckle
---
Jan 25 '07 #4
Thus wrote fi*******@gmail .com,
All,

I am writing an HTTP 1.1 compliant proxy in c#.NET, for use as a proxy
server for any web browser (IE, firefox, etc). I've got it working
fine for GET requests. However, when a POST request is issued by IE,
I find that sometimes IE does not render the page, even though my
proxy reports that it successfully sent the response from the server
back to IE. So, in IE a blank page is rendered. If I use a plugin
like IEWatch, it seems to show the correct response headers and
content coming from the proxy.

Additionally, if I step through the proxy with the debugger in Visual
Studio, the problem does not reproduce. This is perplexing because I
am only using the synchronous socket API's in system.net.sock ets.
Also, if I issue the same POST request with firefox, the problem does
not reproduce. So it's an issue specific to IE as the client. Any
ideas? Does IE require HTTP connections to be handled in a specific
way? Or perhaps does it expect intermediary proxies to handle
responses in a specific way?
Is your connection handling correct according to RFC 2616 or whatever HTTP
version to want to support? Especially regarding persistent connections?

Cheers,
--
Joerg Jooss
ne********@joer gjooss.de
Jan 25 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2762
by: yawnmoth | last post by:
i'm trying to send an http post request and see if the server got it correctly. i'm sending the http post request with this script: <? $address = 'domain.tld'; $port = 80; $proxy = fsockopen("tcp://$address", (int) $port, $errno, $errstr, 1); $extra = "extra=blah&this=test";
2
4035
by: D. Nii | last post by:
Hi there, I have a web application that recently got redesigned and now makes use of Response.Redirect . The "new" application is hosted on Win2000 and works for all kinds of clients using IE 5.0 + and different operating systems (Win2000, WinXP, WinME, Win98). Functions that use the Response.Redirect no longer work for clients using NT...
4
4264
by: Dante | last post by:
Hello, When I try to decompress a response from a web service I'm getting the error: "hexadecimal value 0x1F, is an invalid character. Line 1, position 1." The web server is an apache server. Content-Encoding is set to "gzip, deflate" in the request header. I can see that the response encoding is gzip.
4
2645
by: Jit Prasad | last post by:
I have been consuming a IBM Websphere (Java) web service using .Net 1.0 front end writen in VB.NET. The proxy class submits a soap request and gets a soap response. When I migrated the front-end to .NET1.1, the response from the web service appears as null in the proxy class. This only happens with .NET1.1, .NET1.0 is ok and works fine. I...
4
11412
by: mike.biang | last post by:
I have an ASP page that is using an XMLHTTP object to request various pages from my server. I keep a single session throughout the XMLHTTP requests by bassing the ASPSESSIONID cookie through the XMLHTTP object. However, when the page requested through the XML object makes a <%Response.Redirect()%> call, a new session is created each...
1
4039
by: Gramps | last post by:
Hi, I've generated a client proxy and web service stub using WSDL.exe. All appears ok. The client proxy .cs is in the client app running in VS2005 and the web service stub is running in another instance of VS2005. Both projects build and when debugging, brealpoints are hit. When the client app is using instantiated client proxy objects,...
0
1332
by: David G | last post by:
I have a web service originally written to use soap.tcp transport in WSE2 that now uses http transport under WSE3. The WSE2 method looked like public IndividualLookupResponse IndividualLookup( IndividualLookupRequest request ) The WSE3 method looks like
2
4505
by: =?Utf-8?B?U2Fs?= | last post by:
<I MOVED THIS POST TO ITS OWN THREAD. ORIGINAL POST FOUND HERE: http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.dotnet.framework.webservices&mid=22d09e8e-4390-46b2-b266-ff37405d68ba > I've been searching around the forums for answers to this but not finding anything substantial. My env is XP Pro / .NET...
10
2140
by: cjard | last post by:
I have a client and server that enjoy the following simple dialogue: Client connects Client sends request Server sends response Client disconnects This is the way it must be. The response must be wrapped in a start and end byte 0x02 and 0x03 resepctively.
0
7665
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7888
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7642
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6255
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.