cookies

What web servers use `COOKIE` instead of `HTTP_COOKIE`?

In the source code of the Perl module CGI.pm, in the submodule CGI::Cookies.pm, there is the following line: $raw_cookie = $ENV{HTTP_COOKIE} || $ENV{COOKIE}; I'm interested in $ENV{COOKIE} here. Are there any web servers (obsolete or otherwise) which transmit cookie information using the COOKIE environment variable instead of the HTTP...

Why can't I set a cookie and redirect?

I´m having a problem setting a cookie and doing a 302 redirect In chrome the cookie is not being set (I haven't tested safari), in other browsers I was having the same problem until I added Path=/ to the cookie an now it works. This is how the header looks; the status is 302 Found Content-Type text/html; charset=iso-8859-1 Expires ...

Django Cookies, how can I set them?

I have a web site which shows different content based on a location the visitor chooses. e.g: User enters in 55812 as the zip. I know what city and area lat/long. that is and give them their content pertinent to that area. My question is how can I store this in a cookie so that when they return they are not required to always enter their...

How session and cookie works?

When i create a session variable where is saved username and password, how does it works internally? Same question about regular cookies where information is saved. Which type of information are included in coookie and session? What is the difference between them? ...

i can't delete a cookie with jquery plugin?

First showing the cookie, use this code from: electrictoolbox.com/javascript-get-all-cookies/ Then i made a form to add some cookie <form class="cokies" method="post"> <input class="query" name="q" type="text" /> <input type="submit" name="save" value="saving"> <a>Delete Cookies</a> </form> $(document).ready(function(){ $('.cokies a'...

PHP and cURL cookies

I am trying to setup a php page which uses cURL to hit a third party server to log them in. Right now my code does successfully log in to the third party server, but since cURL is not sending the SESSION cookies to the user, the user must login in themselves How can I get cURL to forward cookies to the client. Thanks ...

iPhone Dev - How to Access NSHTTPCookie Later in App?

I am using my App to login to a website and access information from there. I have a few questions... I am using multiple files / screens to access information after I have logged in. On the page which does the login, I am able to output all the Cookie data to an NSLog. The Cookie consists of a SESSIONID. I am then able to navigate throu...

Garbled characters in cookie

I store Chinese characters in cookie but the cookie value changes to garbled characters. What should I do? function createCookie(name, value, days) { if (days) { var date = new Date(); date.setTime(date.getTime() + (days * 1000 * 60 * 60 * 24)); var expires = "; expires=" + date.toGMTString(); } else ...

Apache mod_rewrite question

Hi! I have an application running under tomcat 6. In front of it I have an apache server which is forwarding all requests. That is, the user "talks" to the apache and not to tomcat. For some reasons the it is requested the following: when the apache server receives a request of the form http://www.mydomain.com/myApp then it has to ...

Do we still need to worry about users turning off cookies?

I've noticed that a lot of sites don't bother anymore with work-arounds so users who have turned their cookies off can still get the same experience on the site. Has that problem just gone away in modern web development? Have we gotten to a point where nobody does it, so we don't need to bother? ...

FormsAuthentication.SetAuthCookie

hi we are using FormsAuthentication.SetAuthCookie(profile.Id, false); Now the question is when does this cookie expires? It ofcourse expires once i close all the browsers but it doesn't i keep the browser open and i dont know the timelimit. ...

How to prevent cookie poisoning

I save data in a cookie to authenticate users for the next login (remember me option). This data is encrypted and hashed. But here's the problem: Anyone can take this cookie and put it on another machine and it will work. I heard that is called cookie poisoning How do I overcome this? ...

Facebook Connect not setting cookies

I'm trying to implement Facebook Connect on a website with .NET MVC using C#. I've followed the instructions here: http://wiki.developers.facebook.com/index.php/Trying_Out_Facebook_Connect step by step. I can make the login work as in that when I log in through the site I'm also logged into Facebook. In order to work with this in the ...

What is the best practice for using Cookies for authentication with PHP?

I'm looking for tips and ideas on how to best incorporate authentication with PHP using Cookies. Should each php script check for the cookie value to determine if the user is still logged in? Should there be one script that does this check and Include that script from each of the other scripts? Can the cookie value be seen by php fr...

Cookies are required to use this site. HttpWebRequest/HttpWebResponse Cookies

I am using the following code to make a HttpWebRequest and render the XML from the response stream. ` HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(url); req.Accept = "/"; req.Headers.Add("UA-CPU", "x86"); req.UserAgent = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; MS-RTC LM 8)"; req.CookieContainer = new Cookie...

How do I remove/delete/expire a cookie immediately?

I want to remove a cookie I set. If I do this by giving it a expiration date sometime in the past it gets marked as "expires: at end of session". I've noticed that other sites manage to delete the cookie immediately somehow. For example when you logout here on stackoverflow the "user" cookie disappears right away. How? ...

App engine's development server behaves strangely with cookies. Is it caching them or something?

I've noticed google app engine's development server handling cookies very strangely. Basically, they don't always to go away when they should. Hopefully somebody else knows what's going on and can enlighten me. Here's a rough outline of the steps to reproduce. First, create three RequestHandlers: setcookie, deletecookie and display...

jQuery - two columns - sortable and cookie?

Hello everybody! On my page I have two kind of columns with several conainers in it. Now I want to be able to sort these containers in these two columns. This was not really a problem. I can sort my containers in the two colums and toggle it on or off. But now my problem: I want to sort my containers on reload. I want to sort and toggle...

ASP.NET authentication cookie not deleting after Firefox is closed

Hello everyone. Im developing a small web aplication, used in a shared computer. When the user closes the browser window, i want the session and the authentication to be deleted. In the Login page i use something like this to authenticate the user: FormsAuthenticationTicket authTicket = new FormsAuthenticationTicket(1,txtUser.T...

Rails CookieStore::CookieOverflow, not for all users, only in production

I have a couple users that are getting this CookieStore::CookieOverflow error. I'm suspicious of nginx/passenger because I just switched to that last week (from nginx/thin) and now these are happening. It's always a particular action, but it doesn't happen for all users. I checked to see what I'm storing in the session and I'm not sav...