FAQ
Hi,
I do have .ep files, that deliver binary content from a database to
browsers (generated images which are requested via <img
src="showImage.ep?id=99">).

If an image isn't in the DB I am setting

$epreq->apache_req->status_line("404 Not found");
$http_headers_out{'Content-Type'} = "text/plain; charset=ISO-8859-1";
print OUT "The image can't be found";
exit;

And the browser get's an 404 and shows a broken image (or nothing nowadays).
This works like a charme in my development environment under Apache 2.0.55.

In the production environment under Apache 2.2.3 the status line isn't
set, so the browser gets an "200 OK" status.

In both environments EMBPERL_OPTIONS is 270338.
Embperl Version is 2.3.0

Is this an known issue?
Did the Apache API change?
Anything else that might be different?
Any thoughts welcome.

--
mit freundlichem Gruß,

Frank Wesemann
Fotofinder GmbH USt-IdNr. DE812854514
Software Entwicklung Web: http://www.fotofinder.com/
Potsdamer Str. 96 Tel: +49 30 25 79 28 90
10785 Berlin Fax: +49 30 25 79 28 999

Sitz: Berlin
Amtsgericht Berlin Charlottenburg (HRB 73099)
Geschäftsführer: Ali Paczensky

Search Discussions

  • Gerald Richter at Oct 18, 2013 at 10:47 am
    Hi Frank,


    doing an exit (404) should set the status code


    Gerald


    Von: Frank Wesemann
    Gesendet: Freitag, 11. Oktober 2013 21:59
    An: embperl@perl.apache.org
    Betreff: Can't set $epreq->apache_req->status on Apache 2.2


    Hi,

    I do have .ep files, that deliver binary content from a database to browsers (generated images which are requested via <img src="showImage.ep?id=99">).


    If an image isn't in the DB I am setting


    $epreq->apache_req->status_line("404 Not found");
    $http_headers_out{'Content-Type'} = "text/plain; charset=ISO-8859-1";

    print OUT "The image can't be found";

    exit;


    And the browser get's an 404 and shows a broken image (or nothing nowadays).

    This works like a charme in my development environment under Apache 2.0.55.

    In the production environment under Apache 2.2.3 the status line isn't set, so the browser gets an "200 OK" status.

    In both environments EMBPERL_OPTIONS is 270338.

    Embperl Version is 2.3.0


    Is this an known issue?

    Did the Apache API change?

    Anything else that might be different?

    Any thoughts welcome.


    --


    mit freundlichem Gruß,




    Frank Wesemann


    Fotofinder GmbH         USt-IdNr. DE812854514


    Software Entwicklung    Web: http://www.fotofinder.com/ <http://www.fotofinder.com/>


    Potsdamer Str. 96       Tel: +49 30 25 79 28 90


    10785 Berlin            Fax: +49 30 25 79 28 999




    Sitz: Berlin


    Amtsgericht Berlin Charlottenburg (HRB 73099)


    Geschäftsführer: Ali Paczensky

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupembperl @
categoriesmodperl, perl
postedOct 11, '13 at 7:59p
activeOct 18, '13 at 10:47a
posts2
users2
websiteperl.apache.org

2 users in discussion

Gerald Richter: 1 post Frank Wesemann: 1 post

People

Translate

site design / logo © 2018 Grokbase