From: Chris W. <ch...@cw...> - 2003-10-29 15:59:39
|
forehead wrote: >> Do you mean you should *remove* this line? OI2 should take >> care of all the headers for you -- it's one of the last >> things done in OI2::Response::Apache->send(). > > I meadn *add* this line into Location container. > > default as your sample, OI's http header will print on > browser's screen, then the cookie can not properly set. add > the line, everything is ok. > > env: apache + mod_perl Oh, I see. We're telling Apache that we'll be sending the headers. What's confusing me is that we don't have to do this (add PerlSendHeader) for OI 1.x. That is, in OI 1.x we have: OpenInteract.pm: ---------------------------------------- sub send_html { my ( $class, $apache, $content, $R ) = @_; ... my $content_type = $R->{page}{content_type} || $apache->content_type || 'text/html'; $content_type = ( $content_type eq 'httpd/unix-directory' ) ? 'text/html' : $content_type; $apache->send_http_header( $content_type ); $apache->print( $content ); } ---------------------------------------- And in OI 2.x we have: OpenInteract2::Response::Apache: ---------------------------------------- sub send { ... $self->send_header( $apache ); $apache->print( $self->content ); } sub send_header { my ( $self, $apache ) = @_; unless ( $self->content_type ) { $self->content_type( 'text/html' ); } unless ( $self->status ) { $self->status( RC_OK ); } if ( CTX->server_config->{promote_oi} eq 'yes' ) { $apache->headers_out->add( 'X-Powered-By', "OpenInteract " . CTX->version ); } $apache->send_http_header( $self->content_type ); } ---------------------------------------- These are pretty much the same thing. So I'm puzzled. Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |