A workaround is to set the cookie with javascript. Javascript will allow you to set a cookie after the content header has already been sent (as in your case). So /cgi-bin/myscript.cgi could print the javascript html code setting the cookie/s you need.
Although this isn't perl, here's some javascript for setting a cookie. It's a function followed by the call. This script sets a cookie called myName to Bubba. You set the cookie just like you would in perl. Specifying all the cookie parameters you need. Again, this snippet is javascript, not perl.
jtruefunction setCookie(name, value, expires, path, domain, secure) { var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); document.cookie = curCookie; } now=new Date(); now.setFullYear(now.getFullYear()+1); setCookie("myName", "Bubba", now, "/" ,".yourdomain.com");
In reply to Re: Re: Re: What's the path when setting cookie via an exec cgi include?
by true
in thread What's the path when setting cookie via an exec cgi include?
by Cody Pendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |