[Top][All Lists]

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

Re[2]: [help-cgicc] debugging suggestions

From: Igor
Subject: Re[2]: [help-cgicc] debugging suggestions
Date: Sat, 23 Aug 2008 16:14:50 +0400

Hello Jay,

Saturday, August 23, 2008, 3:18:06 AM, you wrote:

>>    * you're actually sending HTTP response in AJAX mode to cout
>>    * there is no other text that has been sent to cout before you
>>      sent HTTP header
>>    * your streams are rerouted to FastCGI handler
>>    * fastcgi.dll is in path and could be loaded by your fcgi app at
>>      runtime
>>    * cgicc.dll is in path and could be loaded by your fcgi app at
>>      runtime

JS> The only time I get an error seems to be when I include a response
JS> header. By that I mean:

JS> this does NOT work (for any content type I tried)
JS> HTTP/1.0 200 OK
JS> Content-Type: text/html
JS> ..snip..

    virtual void render(std::ostream& out) const;

    unless you're wrong in passing standard (not fcgi) stream into this
    function you might check out that the reason (OK) is set and that
    you're sending HTTP/1.1 not HTTP/1.0, as far as I remember ISS
    doesn't like 1.0 in protocol version. (it doesn't support it, just
    a guess)

JS> This does work:
JS> Content-Type: text/html
JS> ..snip..

    It might be because you do not specify protocol version and by
    default it is HTTP/1.1

JS> A bit of googling turned up multiple complaints about IIS 5.x
JS> not being able to parse http headers that include the response
JS> code.

JS> How do you communicate the http response code to the web
JS> server using cgicc if not through header text?

    You might set it via HTTP header or via configs of HTTP server modules.
    The most common way is to set it via HTTP header (what you're
    trying to do)

>>    * there is such a remarkable thing under windows|Visual Studio as
>>      DebugBreak() - use it

JS> I'll have to look that up. I assume that's something to cause an
JS> interactive debugging breakpoint? How do you use a break point for a 
process that times out while
JS> you're stepping through it and is started by the web server not your 

    When you use it the question will explain itself. DebugBreak() is a
    way how the services are debugged, a very useful, powerful, easy
    to use way etc.

JS> Never learned about it in the first place... Something else to google.

  while(FCGX_Accept_r(&request) == 0) {

  FastCGI is a kind of design strategy, contrary to CGI it turns your app
  into a daemon/service. Depending on experience you might benefit a lot
  from that. But remember - your CGI app is no longer one timer, it will
  last as a service|daemon therefore a novice will have to fight for
  some time with possible variable stack|memory leaks.

  There is a similar native technology for IIS that is called ISAPI. I'm
  not sure weather ISAPI has a built in load balancer or how ISAPI is
  synchronizing the threads.

Best regards,
 Igor                            mailto:address@hidden

reply via email to

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