Forum: NGINX Re: bug report: SSI -> signal 10 (nginx 0.7.10, Solaris 10)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
D8e5da0911e7b2c66f07a1b60fa2d65b?d=identicon&s=25 Hannes Haug (Guest)
on 2008-11-06 08:11
(Received via mailing list)
Yes Maxim,

your patch fixes the problem. But there remains an issue:
Errors on subrequests (e.g. 404) result in the inclusion of the error
pages in the main page.
I.e. in the body of the main page there starts a new html document
with the error message.

Regards
  Hannes
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2008-11-06 11:56
(Received via mailing list)
Hello!

On Thu, Nov 06, 2008 at 08:01:58AM +0100, Hannes Haug wrote:

> Yes Maxim,
>
> your patch fixes the problem.

Thanks for testing.

> But there remains an issue:
> Errors on subrequests (e.g. 404) result in the inclusion of the error
> pages in the main page.
> I.e. in the body of the main page there starts a new html document
> with the error message.

It's by design.  Subrequests are just included into main page as
is, regardless of the error code.  If you don't want error replies
to be included you have to write in your config something like
this:

    location /include/ {
        error_page  404  /empty;
    }
    location = /empty {
        return  204;
    }

So if you use <!--#include virtual="/include/file" --> and
there is no "/include/file" - nginx will return empty page
instead, and no output will appear in main document.

See http://wiki.codemongers.com/NginxHttpCoreModule#error_page for
details.

Maxim Dounin
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2008-11-06 11:59
(Received via mailing list)
On Thu, Nov 06, 2008 at 01:50:22PM +0300, Maxim Dounin wrote:

> > But there remains an issue:
>     location /include/ {
>         error_page  404  /empty;

-         error_page  404  /empty;
+         error_page  404  = /empty;
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2008-11-06 12:25
(Received via mailing list)
Hello!

On Thu, Nov 06, 2008 at 01:51:22PM +0300, Igor Sysoev wrote:

> > Thanks for testing.
> > this:
> >
> >     location /include/ {
> >         error_page  404  /empty;
>
> -         error_page  404  /empty;
> +         error_page  404  = /empty;

It does it's job in both cases, actually.  From semantic point of
view '=' may be better, but it shouldn't influence real work
anyway.  Or I missed something?

BTW, did you picked alignment patch?

Maxim Dounin
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2008-11-06 14:05
(Received via mailing list)
On Thu, Nov 06, 2008 at 02:17:43PM +0300, Maxim Dounin wrote:

> > > > Yes Maxim,
> > >
>
> It does it's job in both cases, actually.  From semantic point of
> view '=' may be better, but it shouldn't influence real work
> anyway.  Or I missed something?

You are right.

> BTW, did you picked alignment patch?

Yes, thank you.
This topic is locked and can not be replied to.