Closed
Bug 77978
Opened 24 years ago
Closed 23 years ago
Response time from CGI is over 30 seconds for simple CGI.
Categories
(Core :: Networking: HTTP, defect, P4)
Tracking
()
RESOLVED
INVALID
mozilla0.9.7
People
(Reporter: desale, Assigned: gagan)
References
()
Details
(Keywords: perf)
I found this bug while investigating bug# 75637.
BUILDS:
2001-04-25-04
STEPS TO REPRODUCE:
1] Please visit URL above.
2] Select any option from select.
3] Click "Submit"
EXPECTED RESULTS:
Form should be submitted & reponse from CGI should arrive quickly.
Text Box Value is: TextValue
Select Value is: SelectValue2 [ASSUMING YOU SELECT OPTION2]
ACTUAL RESULTS:
It takes more than 30 seconds to submit form & to get response from CGI.
ACTUAL FAILURE:
The CGI used for this is like following.
********************************************************************************
#!/usr/local/bin/perl
require "cgi-lib.pl";
print "HTTP/1.1 200 OK";
print "Content-type: text/html\n\n";
MAIN:
{
&ReadParse(*input);
$resultsdir = "results";
$textval = $input{'temptext'};
$selval = $input{'tempsel'};
print "<HTML>\n";
print "<HEAD>\n";
print "<TITLE>CGI Test</TITLE>\n";
print "</HEAD>\n";
print "<BODY>\n";
print "<H2>Text Box Value is: $textval</H2><br>\n";
print "<H2>Select Value is: $selval</H2><br>\n";
print "</BODY>\n";
print "</HTML>\n";
}
exit(0);
********************************************************************************
if we do NOT use line [print "HTTP/1.1 200 OK";] in above CGI then it works
fine, [but in that case bug# 75637 shows up]
This bug occurs if we use line [print "HTTP/1.1 200 OK";] or if we completely
take out both lines [print "HTTP/1.1 200 OK"; print "Content-type:
text/html\n\n";] from code.
RESPONSE TIME IS HUGE.
Darin,
This happens when even when we do not have the following two lines in the
script.
print "HTTP/1.1 200 OK";
print "Content-type: text/html\n\n";
Turning off Keep Alive, causes the page to load fast and we do not see the
problem.
********************************************************************************
#!/usr/local/bin/perl
require "cgi-lib.pl";
MAIN:
{
&ReadParse(*input);
$resultsdir = "results";
$textval = $input{'temptext'};
$selval = $input{'tempsel'};
print "<HTML>\n";
print "<HEAD>\n";
print "<TITLE>CGI Test</TITLE>\n";
print "</HEAD>\n";
print "<BODY>\n";
print "<H2>Text Box Value is: $textval</H2><br>\n";
print "<H2>Select Value is: $selval</H2><br>\n";
print "</BODY>\n";
print "</HTML>\n";
}
exit(0);
********************************************************************************
from mtg w/gagan: move target milestone to 0.9.2. If after investigation, will
move back to 0.9.1 time permitting.
Keywords: perf
Target Milestone: mozilla0.9.1 → mozilla0.9.2
I don't think the HTTP header line at the top matters since the apache server
would strip it out and add its own (and so you shouldn't even be adding that)
but what is interesting is that layout doesn't start drawing anything till the
network (keep-alive) times out.
Comment 8•23 years ago
|
||
http/1.1 servers are not required to send a content-length header.
there are three ways of detecting EOF:
1- content-length header
2- chunked transfer encoding
3- server closes the socket connection
Comment 11•23 years ago
|
||
This bug is invalid. It is a server/cgi problem.
Attached is the results of proxying via ssltap. Note that the server responded
with a keep-alive header but without either sending a content-length or chunking it.
Not much that the client can do in that case.
U should use iWS60 or iWS41 to get HTTP complicance wrt keep-alives and chunking.
I'am using the same test case as mentioned in the above URL but proxying using
ssltap via vault:2000.
GET /desale/cgi-bin/foo3.cgi?temptext=fdgdfgfd&tempsel=SelectValue1 HTTP/1.1
Host: vault:2000
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.6+) Gecko/200
11128
Accept: text/xml, application/xml, application/xhtml+xml, text/html;q=0.9, image
/png, image/jpeg, image/gif;q=0.2, text/plain;q=0.8, text/css, */*;q=0.1
Accept-Language: en-us
Accept-Encoding: gzip, deflate, compress;q=0.9
Accept-Charset: ISO-8859-1, utf-8;q=0.66, *;q=0.66
Keep-Alive: 300
Connection: keep-alive
]
<-- [
HTTP/1.1 200 OK
Server: Netscape-Enterprise/3.0
Date: Fri, 30 Nov 2001 03:42:06 GMT
Connection: keep-alive
]
<-- [
Content-type: text/html
<HTML>
<HEAD>
<TITLE>CGI Test</TITLE>
</HEAD>
<BODY>
<H2>Text Box Value is: fdgdfgfd</H2><br>
<H2>Select Value is: SelectValue1</H2><br>
</BODY>
</HTML>
]
Error -5961: TCP connection reset by peer.: error on server-side socket.
Connection 3 Complete
Comment 12•23 years ago
|
||
Gagan
Since u r the bug owner, I leave it to u to change the bug status.
Assignee | ||
Comment 13•23 years ago
|
||
marking as invalid per vinay's investigation. Thanks vinay!
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•