help-cgicc
[Top][All Lists]
Advanced

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

Re: [help-cgicc] (no subject)


From: Quintin Connell
Subject: Re: [help-cgicc] (no subject)
Date: Tue, 03 Dec 2002 16:48:07 +0200 (SAST)
User-agent: IMP/PHP IMAP webmail program 2.2.6

There doesn't seem to anything wrong with your code other than that you will 
need to #include "cgicc/HTTPHTMLHeader.h" instead of the HTTPHeaders.h at some 
stage.

The problem may be with the interaction of the script with your web server 
software (you didn't say what you were using). I would suggest you remove the 
<< endl; at the end of the header line and let the class itself put in the 
correct lf/cr's. If you use printf you will need to do this yourself ie printf
("Content-Type: text/html\r\n\r\n");

See if that helps
Quintin


Quoting óÅÒÇÅÊ ïÓÔÒÏ×ÓËÉÊ <address@hidden>:

> Hello Friends,
> 
>       could anyone tell me what i did wrong?
> 
>       here is error:
> 
> --
>       CGI Error
>       The specified CGI application misbehaved by not returning a
> complete set of HTTP headers. The headers it did return are:
> --
> 
>       here is my cgi program:
> 
> --      
> #include <iostream>
> #include <vector>
> #include <string>
> 
> #include "cgicc/Cgicc.h"
> #include "cgicc/HTMLClasses.h"
> #include "cgicc/HTTPHeaders.h"
> 
> using namespace std;
> using namespace cgicc;
> 
> int 
> main(int argc, 
>      char **argv)
> {
>    try {
>       Cgicc cgi;
> 
>       // Send HTTP header
>       cout << HTTPHTMLHeader() << endl;
> 
>       // Set up the HTML document
>       cout << html() << head(title("Cgicc example")) << endl;
>       cout << body() << endl;
> 
>       cout << h1("Hi! I Am a CGI") << endl;
> 
>       // Close the HTML document
>       cout << body() << html();
>    }
>    catch(exception& e) {
>       // handle any errors - omitted for brevity
>    }
>    return 0;
> }
> 
>    the error occurs even if i try to send headers by this way:
>    printf("Content-Type: text/html\n");
> 
> -- 
> 
> 
> 
> _______________________________________________
> help-cgicc mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/help-cgicc
> 
> 




reply via email to

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