phptest-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phptest-users] Minor bug adding test question


From: Brandon Tallent
Subject: Re: [Phptest-users] Minor bug adding test question
Date: Sun, 4 Aug 2002 20:24:56 -0700 (PDT)

 
> 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.

Yup, this is correct behaviour.

> 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?

The reason Refresh: is used instead of Location: is
because with IIS if a cookie and redirect are sent in
the same header, the cookie is completely ignored. 
Definitly an annoying bug but I use IIS for
development so I've gotta have a workaround.  The
Set-Cookie header is sent twice intentionally, the
first is to kill the old cookie with the value, and
the second renews it with the current value.  The
reason that add_muliple et al. redirects to set_cookie
is to save the skill level dropdown, so if you are
adding a bunch of questions for one particular type
you don't have to keep changing the dropdown value.

Netscape is incorrect to display the document contains
no data page.  The page simply sets the cookie and
sends a refresh to a different page, which is
perfectly valid xhtml behaviour.  I'm suprised that
the rest of phpTest works at all w/ netscape, that
browser has major issues with CSS as well.  I don't
plan to alter phptest at all to workaround netscape
quirks.  

If you find this behaviour particuarly annoying, you
can always change the redirect command in
add_multiple.php et al. to redirect directly to
view_questions.php insteead of set_cookie.php.  But
then you're stuck with the problem of having to
reselect the skill level for each question you add.  

Thanks,
Brandon

> 
> Thanks,
> Dan
> 
> _______________________________________________
> Phptest-users mailing list
> address@hidden
>
http://mail.freesoftware.fsf.org/mailman/listinfo/phptest-users


__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]