Project

General

Profile

Actions

Bug #757

closed

internal server error gives 200 OK sometimes

Added by Anonymous over 17 years ago. Updated about 8 years ago.

Status:
Duplicate
Priority:
Normal
Category:
mod_cgi
Target version:
-
ASK QUESTIONS IN Forums:

Description

Config: OSX/freebsd-kqueue/cgi/setenv
Perl: v5.8.6

If the CGI script fails, it somitimes gives a 200 with empty page instead of 500, the errors to STDOUT clearly come into the log that an error DID happen.

script:


#!/usr/bin/perl

use base 'some_module_not_found';

print "Content-Type: text/plain\r\n\r\n";
print "You really have some_module_not_found.pm ?!\n";

tcpdump:


15:02:42.591010 IP localhost.8081 > localhost.49738: P 1:94(93) ack 242 win 65535 <nop,nop,timestamp 605651062 605651062>
        0x0000:  4500 0091 c788 4000 4006 0000 7f00 0001  E.....@.@.......
        0x0010:  7f00 0001 1f91 c24a b6b0 64cd 4ca9 f9c6  .......J..d.L...
        0x0020:  8018 ffff fe85 0000 0101 080a 2419 8076  ............$..v
        0x0030:  2419 8076 4854 5450 2f31 2e31 2032 3030  $..vHTTP/1.1.200
        0x0040:  204f 4b0d 0a43 6f6e 7465 6e74 2d4c 656e  .OK..Content-Len
        0x0050:  6774 683a 2030 0d0a 4461 7465 3a20 4d6f  gth:.0..Date:.Mo
        0x0060:  6e2c 2031 3720 4a75 6c20 3230 3036 2031  n,.17.Jul.2006.1
        0x0070:  333a 3032 3a34 3220 474d 540d 0a53 6572  3:02:42.GMT..Ser
        0x0080:  7665 723a 206c 6967 6874 7470 640d 0a0d  ver:.lighttpd...
        0x0090:  0a         

My config:


# lighttpd configuration file
#

## modules to load
# at least mod_access and mod_accesslog should be loaded
server.modules = (
        "mod_rewrite",
#       "mod_redirect",
#       "mod_alias",
        "mod_access",
#       "mod_cml",
#       "mod_trigger_b4_dl",
#       "mod_auth",
#       "mod_status",
        "mod_setenv",
#       "mod_fastcgi",
#       "mod_proxy",
#       "mod_simple_vhost",
#       "mod_evhost",
#       "mod_userdir",
        "mod_cgi",
#       "mod_compress",
#       "mod_ssi",
#       "mod_usertrack",
#       "mod_expire",
#       "mod_secdownload",
#       "mod_rrdtool",
        "mod_accesslog" )

server.tag              = "lighttpd" 
server.port             = 8081
server.bind             = "localhost" 

server.document-root    = "/Users/jimmy/Work/devbox-www-backup" 
server.pid-file         = "/Users/jimmy/UNIX/var/run/lighttpd.pid" 
server.errorlog         = "/Users/jimmy/UNIX/var/log/lighttpd.error.log" 
accesslog.filename      = "/Users/jimmy/UNIX/var/log/lighttpd.access.log" 

server.event-handler    = "freebsd-kqueue" 

index-file.names        = ( "index.pl", "index.cgi",
                            "index.html", "index.htm" )

url.access-deny         = ( "~", ".pm" )
static-file.exclude-extensions  = ( ".pl", ".cgi" )

cgi.assign              = ( ".pl"  => "",
                            ".cgi" => "" )

setenv.add-environment  = (
        "PERLLIB" => "/Users/jimmy/UNIX/lib/perl5/site_perl" 
)

#dir-listing.activate   = "enable" 

mimetype.assign = (
        ".pdf"          =>      "application/pdf",
        ".sig"          =>      "application/pgp-signature",
        ".spl"          =>      "application/futuresplash",
        ".class"        =>      "application/octet-stream",
        ".ps"           =>      "application/postscript",
        ".torrent"      =>      "application/x-bittorrent",
        ".dvi"          =>      "application/x-dvi",
        ".gz"           =>      "application/x-gzip",
        ".pac"          =>      "application/x-ns-proxy-autoconfig",
        ".swf"          =>      "application/x-shockwave-flash",
        ".tar.gz"       =>      "application/x-tgz",
        ".tgz"          =>      "application/x-tgz",
        ".tar"          =>      "application/x-tar",
        ".zip"          =>      "application/zip",
        ".mp3"          =>      "audio/mpeg",
        ".m3u"          =>      "audio/x-mpegurl",
        ".wma"          =>      "audio/x-ms-wma",
        ".wax"          =>      "audio/x-ms-wax",
        ".ogg"          =>      "application/ogg",
        ".wav"          =>      "audio/x-wav",
        ".gif"          =>      "image/gif",
        ".jpg"          =>      "image/jpeg",
        ".jpeg"         =>      "image/jpeg",
        ".png"          =>      "image/png",
        ".xbm"          =>      "image/x-xbitmap",
        ".xpm"          =>      "image/x-xpixmap",
        ".xwd"          =>      "image/x-xwindowdump",
        ".css"          =>      "text/css",
        ".html"         =>      "text/html",
        ".htm"          =>      "text/html",
        ".js"           =>      "text/javascript",
        ".asc"          =>      "text/plain",
        ".c"            =>      "text/plain",
        ".cpp"          =>      "text/plain",
        ".log"          =>      "text/plain",
        ".conf"         =>      "text/plain",
        ".text"         =>      "text/plain",
        ".txt"          =>      "text/plain",
        ".dtd"          =>      "text/xml",
        ".xml"          =>      "text/xml",
        ".mpeg"         =>      "video/mpeg",
        ".mpg"          =>      "video/mpeg",
        ".mov"          =>      "video/quicktime",
        ".qt"           =>      "video/quicktime",
        ".avi"          =>      "video/x-msvideo",
        ".asf"          =>      "video/x-ms-asf",
        ".asx"          =>      "video/x-ms-asf",
        ".wmv"          =>      "video/x-ms-wmv",
        ".bz2"          =>      "application/x-bzip",
        ".tbz"          =>      "application/x-bzip-compressed-tar",
        ".tar.bz2"      =>      "application/x-bzip-compressed-tar" 
)

-- jimmy


Related issues 1 (0 open1 closed)

Related to Bug #2542: Race leads to incorrect output in some circumstancesFixed2013-12-26Actions
Actions #1

Updated by Anonymous over 17 years ago

I just notices mod_rewrite was enabled, after disabling it, the problem was away

-- jimmy

Actions #2

Updated by Anonymous over 17 years ago

after enabling it back again, the problem was not back, which is odd...

-- jimmy

Actions #3

Updated by Anonymous over 17 years ago

after some time running (10 minutes), the problem came back, it randomly gives 200/500

-- jimmy

Actions #4

Updated by Anonymous over 17 years ago

See bug report 756, problem seems to be also gone with that solution

-- jimmy

Actions #5

Updated by gstrauss about 8 years ago

Potentially same or similar issue as that reported in https://redmine.lighttpd.net/issues/2542

Actions #6

Updated by stbuehler about 8 years ago

  • Related to Bug #2542: Race leads to incorrect output in some circumstances added
Actions #8

Updated by stbuehler about 8 years ago

  • Description updated (diff)
  • Category changed from core to mod_cgi
  • Status changed from New to Duplicate
  • Assignee deleted (jan)
Actions

Also available in: Atom