iisproxy
iisproxy copied to clipboard
File size seems to cause failed response
What steps will reproduce the problem?
Dynamic pages fail if response exceeds an undetermined size (not very big
either)
What is the expected output? What do you see instead?
Page contents expected but no response. HTTPFox in FF shows
NS_ERROR_UNEXPECTED
What version of the product are you using? On what operating system?
v4 on IIS 6.0 retreiving from Apache on XAMPP server.
Please provide any additional information below.
All features seem to work fine.
Setup was a breeze.
Large .js files have no issue, but text/html files that exceed ~6k simply
never respond.
Thought it might be a timeout issue or something, but have no idea where
to look. Have you seen anything like this?
Original issue reported on code.google.com by [email protected] on 5 Sep 2009 at 12:50
Did some testing, definitely seems related to the Apache (XAMPP) response.
Similar
code running as ASP from the same server passes through just fine. I'm not too
with
the subtleties of http response/headers and how to compare them for differences.
Bt it seems to me that I must need to change configuration in my PHP or Apache
configuration?
Original comment by [email protected] on 6 Sep 2009 at 2:33
Compared response headers of the ASP and PHP versions. Seems related to
content "chunking" and/or a lack of content-length response in the Apache/PHP
pages.
Google searches on changing these settings don't look simple at first glance.
Will
report back if I can find the solution.
Original comment by [email protected] on 7 Sep 2009 at 2:54
I am having the same issue. Is their a work around or a fix yet?
Original comment by [email protected] on 12 Oct 2009 at 1:15
I ended up having success with the Managed Fusion URL Rewriter Solution:
http://www.managedfusion.com/products/url-rewriter/default.aspx
Although I should point out that its critical to have the .NET framework v2.0
SP2
installed for it to work.
I simply wasn't talented enough to figure out how to disable chunking in my
XAMPP
install.
Original comment by [email protected] on 12 Oct 2009 at 2:28
It has been a long time, nobody has posted a fix.
I've fixed it.
The problem is that the response we GET was chunked, and we copy
that header in our response, but we do NOT send it chunked. So the
browser does not appreciate that.
So we need to discover this header, remove it, and in its
place put a Content-Length header instead. Very simple once
I figured it out!
Near the end of the main method is the following:
foreach(String each in response.Headers)
if(each != "Location")
context.Response.AddHeader(each, response.Headers.Get(each));
CopyStream(response.GetResponseStream(), context.Response.OutputStream);
response.Close();
context.Response.End();
Change this to:
// need to know if response was chunked. If so,
// we need to REMOVE that header and ADD Content-Length header instead.
bool isChunked = false;
foreach (String each in response.Headers)
if (each != "Location")
{
// DO NOT write the chunked transfer encoding header. We will replace with Content-Length
if (each == "Transfer-Encoding" && response.Headers.Get(each) == "chunked")
isChunked = true;
else
context.Response.AddHeader(each, response.Headers.Get(each));
}
CopyStream(response.GetResponseStream(), context.Response.OutputStream);
if (isChunked)
{
context.Response.AddHeader("Content-Length", context.Response.OutputStream.Length.ToString());
}
response.Close();
context.Response.End();
Original comment by [email protected] on 11 Jul 2011 at 6:41