472,783 Members | 1,016 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,783 software developers and data experts.

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.sockets.
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 2163
Hi figelwump,

Can you view the source of the response page?(View>Source 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*******@gmail.comwrote in message
news:11**********************@v33g2000cwv.googlegr oups.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.sockets.
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...@hotmail.comwrote:
Hi figelwump,

Can you view the source of the response page?(View>Source 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.comwrote in messagenews:11**********************@v33g2000cwv.g ooglegroups.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.sockets.
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*******@gmail.comwrote in message
news:11**********************@v33g2000cwv.googlegr oups.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.sockets.
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.sockets.
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********@joergjooss.de
Jan 25 '07 #5

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

Similar topics

2
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 =...
2
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...
4
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....
4
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...
4
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...
1
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...
0
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...
2
by: =?Utf-8?B?U2Fs?= | last post by:
<I MOVED THIS POST TO ITS OWN THREAD. ORIGINAL POST FOUND HERE:...
10
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...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.