xmlhttprequest to get dynamically generated data seems to have a size limit

T

Thomas 'PointedEars' Lahn

VK said:
Sorry, but this is a kind of paranoia now.

No, it is much more competent people than you telling you again and
again that and why you are wrong, and that what you quote has exactly
no relevance to the problem discussed. And you acting stupid enough
not to take any note of that.
I show you *official* MSDN behavior documentation, but *I* myself also
have to prove that it is not a conspiracy between VK and Microsoft.
[...]

Will you understand that the (maybe limited) length of the URI used in
a HTTP GET _request_ has no relevance to the _length_ of the resulting
HTTP _response_? Probably not.

Try to access _any_ Web resource greater than 2083 bytes and you will
succeed. Since you believe only what Microsoft says, observe the byte
length of one response to one GET request using one URI you have been
posting repeatedly to try and fail to make your point and see that it
is far greater than 2083 (which is BTW the reason why you could read
and quote it):

| $ telnet support.microsoft.com http
| Trying 207.46.248.248...
| Connected to support.microsoft.akadns.net.
| Escape character is '^]'.
| GET http://support.microsoft.com/default.aspx?scid=KB;en-us;q208427 HTTP/1.1
| Host: support.microsoft.com
|
| HTTP/1.1 200 OK
| Date: Tue, 17 Jan 2006 11:31:49 GMT
| Server: Microsoft-IIS/6.0
| P3P: CP="ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI"
| X-Powered-By: ASP.NET
| X-AspNet-Version: 1.1.4322
| Cache-Control: private
| Content-Type: text/html; charset=utf-8
| Content-Length: 19007
^^^^^
|
| [content]

Try to download a file greater than 2083 bytes from any HTTP site and
you will succeed in downloading it completely even in IE (unless you
run out of disk space before), of course.

Either you simply have no clue what you are talking about, or you have
and you are trolling here.


PointedEars
 
T

ted benedict

thanks to all for your many responses. ok i will post detailed code in
my next post, as this seems the best way to give insight on the problem.
 
T

ted benedict

i want to answer you all:

- Dag Sunde. thanks for asking about the code, yes i will post
everything as soon as i can make it short and readable not to spam this
thread :)

- Martin Honnen. thanks for reminding! yes i do insert the xml tags for
version etc like this:
header("Content-Type: text/xml; charset=ISO8859-1");

echo('<?xml version="1.0" encoding="ISO8859-1"?>');
echo('<entries xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="entries.xsd">');

the header(...) seems to be necessary or ie and ff parse it as text and
display only the tag values..

- Thomas 'PointedEars' Lahn: thanks for pointing that out, yeah i
should move the normal "text" out of php interpreter's reach, this is a
good optimization, thanks for the advice!
and yes, you're right, the problem can't be in the GET url request
length limit as the request url is only a few characters long (the
script name, a few params etc), so there must be a problem in the
response :(

- Jasen Betts: i'm using ie and firefox. i don't set any content lenght
manually so i'm not sure why should it be wrong? (too short)

thanks alot for your many responses and thoughts, greatly appreciated.

----------------------
here is one test php script i wrote for this problem:
to trigger the bug or error (my fault?), just make counter go up to
2000.
<?php
header("Content-Type: text/xml; charset=ISO8859-1");

echo('<?xml version="1.0" encoding="ISO8859-1"?>');
echo('<entries xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="entries.xsd">');
for ($count = 0; $count<2000; $count += 1) {
echo("\t <entry> \n");
echo("\t \t <name>bla</name> \n");
echo("\t </entry> \n");
}
echo('</entries>');
?>

now when accessing the file even __in the browser__ (ie), an error
occurs displaying the xml file (if the counter in the for loop is
limited by 2000), but when testing the SAME php with a smaller limit
for the counter, e.g. 100, it works!! isn't this weirdo?
and if i access the file in firefox, (counter limited by 2000), there
is sometimes an error, and sometimes it displays the file. (using
telnet, there sometimes the whole file can be received, and sometimes
there are random special characters in the middle of the file
somewhere...)

i have no clue about this random behaviour ... maybe hardware problem?
or php 4 problem?

greetings to you all! and thanks for reading this :)
 
T

ted benedict

i tried to run the script on another web server with another php
installation, it worked. so i will investigate this further, it seems
to be a problem of my specific php version (php 4.3.4)
 
T

ted benedict

thanks for your posts, jasen betts. yeah, i think the problem may lie
somewhere in php. i'm reporting when i fixed it :)

best,
ted
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top