Is there a publically accessible site that exhibits this problem?

I've set up a small example which illustrates the problem. Files can be found at http://dev.mesca.net/wget/ (using demo:test as login).


Three files:

setcookie.php:
--------------
<? setcookie("wget","I love it!"); ?>

getcookie.php:
--------------
<? header('Location: getcookie-redirect.php'); ?>

get-cookie-redirect.php:
------------------------
<?
        if(isset($_COOKIE['wget'])){
                echo "Ok, I can read the cookie: [wget] ".$_COOKIE['wget'];
        }else{
                echo "Cookie is not set.";
        }
?>

We first set the cookie by wgetting setcookie.php.
Then, we're trying to read the cookie by querying getcookie.php, which redirects to get-cookie-redirect.php: wget can't read it.


$ wget --http-user=demo --http-passwd=test --cookies=on --save-cookies=cookie.txt http://dev.mesca.net/wget/setcookie.php
$ wget --http-user=demo --http-passwd=test --cookies=on --load-cookies=cookie.txt http://dev.mesca.net/wget/getcookie.php


Note: tests were made using the latest version from the CVS (1.10-alpha2+cvs-dev).

Le 26 avr. 05, � 00:09, Hrvoje Niksic a �crit :

- The server responds with a "Location: http://host.com/member.php"; in
headers. Here is the point : member.php requires cookies defined by
index.php and checkuser.php. However these cookies are not resended by
Wget.

That sounds like a bug. Wget is supposed to resend the cookies.

Could you provide any kind of debug information?  The contents of the
cookies is not important, but the "path" parameter and the expiry date
is.

According to my tests, the problem is still reproducible whatever "Path" and "Expiry date" contain.


Regards,

Pierre



Reply via email to