[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Phptest-users] Minor bug adding test question
From: |
dank |
Subject: |
Re: [Phptest-users] Minor bug adding test question |
Date: |
Sun, 04 Aug 2002 20:08:16 -0700 |
Brandon Tallent wrote:
> --- address@hidden wrote:
> > In 0.6.1, each time I add a test question, I get a
> > dialog box from my web browser saying
> > "The document contained no data.
> > Try again later, or contact the server's
> > administrator."
> > Meanwhile, the browser has happily gone to the page
> > http://.../view_questions.php?feedback=Question+successfully+added
> > and the question is happily added.
> >
> > Anyone know what the fix for this minor glitch is?
>
> I haven't seen this before, so I'm not sure what's
> causing the problem. If you find anything else about
> it let me know.
OK, here's more info. It only happens in Netscape 4.7x; Mozilla 0.99
doesn't display the error dialog box. I have a packet trace of
the response of the server to an 'add question' request from Netscape
4.7x that shows the problem; it's appended below. I suspect the problem
is one of the two extra HTTP transactions that phptest seems to
want to do.
For some reason, phptest doesn't just return a web
page after 'add question'; add question's response is a redirect to
http://www.kegel.com/phptest/set_cookie.php?hash=04ba52da7edccbe519bbf447a1986e9e&cookie_name=cookie_q_skill_level&cookie_value=Economics&url=view_questions
php&feedback=Question+successfully+added&op=create
Fine, that adds one round trip, but should work ok.
It's the response to set_cookie.php that causes the trouble, I bet.
Here it is:
HTTP/1.1 200 OK
Date: Mon, 05 Aug 2002 02:46:20 GMT
Server: Apache/1.3.26
X-Powered-By: PHP/4.1.2
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: cookie_q_skill_level=Economics; expires=Mon, 08-Jul-02 02:46:20 GMT
Set-Cookie: cookie_q_skill_level=Economics; expires=Mon, 02-Sep-02 02:46:20 GMT
Refresh: 0;url=view_questions.php?feedback=Question+successfully+added
Connection: close
Content-Type: text/html
There you have it: a web page with no content. Mozilla's smart enough not to
complain, but Netscape gets upset, and I don't really blame it.
(BTW, note the extra Set-Cookie, tsk.)
Can you replace that Refresh: with a Location: header? That ought to fix it.
Or better yet, don't make the browser do those extra two transactions...
why are they needed, anyway?
Thanks,
Dan
Re: [Phptest-users] Minor bug adding test question, John Lacey, 2002/08/04