[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [help-cgicc] how to retrieve cookies
From: |
Alexander J. Oss |
Subject: |
Re: [help-cgicc] how to retrieve cookies |
Date: |
Mon, 25 Apr 2005 20:59:34 -0400 |
Are you absolutely sure that your browser is sending the cookie data? Check
the logs for the web server process to see if it's in there.
----- Original Message -----
From: "Ben Kuang" <address@hidden>
To: <address@hidden>
Sent: Wednesday, April 20, 2005 3:45 AM
Subject: [help-cgicc] how to retrieve cookies
Hi:
I am using the following code to retrieve cookies, however, nothing
gets printed into the browser.
The cgi program is here: http://pdc-lab.poly.edu/~rkuang01/ret.cgi
I made sure that apache can recognize this as a cgi and it's in the
right directory.
And I made sure that there are cookies in my firefox browser.
The code is as below:
#include<iostream>
#include<vector>
#include<string>
#include "cgicc/Cgicc.h"
#include "cgicc/HTTPHTMLHeader.h"
#include "cgicc/CgiInput.h"
#include "cgicc/HTMLClasses.h"
#include "cgicc/HTTPCookie.h"
using namespace cgicc;
using namespace std;
int main(){
try{
vector<HTTPCookie> cookie;
cookie = HTTPHTMLHeader().getCookies();
cout << HTTPHTMLHeader() << endl;
cout << html() << body() << endl;
for(int i=0; i= cookie.size(); i++){
cout << cookie[i].getName() << endl;
}
cout << body() << html() << endl;
}//end try
catch (exception& e){
//exception
}
}
Did I do anything wrong? Can someone pls help me? Thanks in advance.
Regards,
Ben
_______________________________________________
help-cgicc mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-cgicc