Project

General

Profile

lighttpd-1.4.51 have issue givining an error:- (request.c.400) missing CR before LF in header -> 400

Added by amit1.kr almost 4 years ago

Dear, I am using lighttpd-1.4.51 , I am getting an errors while webserver getting request from client apps it show an error:- missing CR before LF in header", error logs show ssl config-key ignore also, error logs:-

/********************************************************************************************/

(server.c.1535) server started (lighttpd/1.4.51)
----In the function mod_fastcgi_set_defaults-----
(server.c.1564) WARNING: unknown config-key: debug.log-ssl-noise (ignored)
(server.c.1564) WARNING: unknown config-key: fastcgi.plugin (ignored)
(server.c.1564) WARNING: unknown config-key: ssl.cipher-list (ignored)
(server.c.1564) WARNING: unknown config-key: ssl.dh-file (ignored)
(server.c.1564) WARNING: unknown config-key: ssl.pemfile (ignored)
(server.c.1564) WARNING: unknown config-key: ssl.use-sslv3 (ignored)
(server.c.1564) WARNING: unknown config-key: ssl.pemfile (ignored)*
(connections.c.1585) state at start 15 req-start
(connections.c.1584) state at start 17 req-end
   (connections.c.1594) state for fd 17 req-end
    In the function connection_state_machine(), state :: 3
   (request.c.581) fd: 17 request-len: 80 \n\x16\x03\x01\x00\xc3\x01\x00\x00\xbf\x03\x03\xbe\x89\xfc\x1e\x19\xb7\x10\xdd\x9d\xdd$ }h\xce\x06e\xd4\xb7\x00\x97;\x03\9.fJI\r\xf9\x1e\x00\x00\x1c\xda\xda\xc0+\xc0/\xc0,\xc00\xcc\xa9\xcc\xa8\xc0\x13\xc0\x14\x00\x9c\x00\x9d\x00/\x005\x00\n\x01\x00\x00z\n\n
   (request.c.400) *missing CR before LF in header -> 400*
   (request.c.401) request-header:\n\x16\x03\x01\x00\xc3\x01\x00\x00\xbf\x03\x03\xbe\x89\xfc\x1e\x19\xb7\x10\xdd\x9d\xdd$ }h\xce\x06e\xd4\xb7\x00\x97;\x03\9.fJI\r\xf9\x1e\x00\x00\x1c\xda\xda\xc0+\xc0/\xc0,\xc00\xcc\xa9\xcc\xa8\xc0\x13\xc0\x14\x00\x9c\x00\x9d\x00/\x005\x00\n\x01\x00\x00z\n\n
   (connections.c.1594) state for fd 17 handle-req
    In the function connection_state_machine(), state :: 5
   (connections.c.1594) state for fd 17 resp-start
    In the function connection_state_machine(), state :: 6
   (response.c.117) Response-Header: \nHTTP/1.0 400 Bad Request\r\nContent-Type: text/html\r\nContent-Length: 345\r\nConnection: close\r\nDate: Wed, 06 May 2020 10:23:16 GMT\r\nServer: WebServer\r\n\r\n
   (connections.c.1594) state for fd 17 write
    In the function connection_state_machine(), state :: 7

SSL Configuration in lighttpd.conf(this configuration working in lighttpd-1.4.39) file:-

$SERVER["socket"] == "127.0.0.1:8443" {
        ssl.engine = "enable" 
        ssl.cipher-list = "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-A..." 
        ssl.dh-file = "/usr/apps/org.tizen.webserver/certificates/vdWSDH" 
        ssl.pemfile = "/usr/apps/org.tizen.webserver/certificates/vdWSCert" 
#       ssl.ca-file = "/usr/apps/org.tizen.webserver/certificates/vdWSCA" 
#       ssl.verifyclient.activate = "enable" 
#       ssl.verifyclient.enforce = "enable" 
#       ssl.verifyclient.depth = 2
        ssl.use-sslv3 = "disable" 
        $HTTP["host"] == "localhost" {
                ssl.pemfile = "/usr/apps/org.tizen.webserver/certificates/vdWSCert" 
#               ssl.ca-file = "/usr/apps/org.tizen.webserver/certificates/vdWSCA" 
        }
}

Please give me some pointer(I am novice in lighttpd), thank in Advance.


Replies (1)

RE: lighttpd-1.4.51 have issue givining an error:- (request.c.400) missing CR before LF in header -> 400 - Added by gstrauss almost 4 years ago

This was already answered 5 days ago in #3012. It's not a bug in lighttpd.

You probably failed to configure TLS properly. The data you provided does not show an ASCII HTTP request.

WARNING: unknown config-key: debug.log-ssl-noise (ignored)
(server.c.1564) WARNING: unknown config-key: fastcgi.plugin (ignored)
(server.c.1564) WARNING: unknown config-key: ssl.cipher-list (ignored)
(server.c.1564) WARNING: unknown config-key: ssl.dh-file (ignored)
(server.c.1564) WARNING: unknown config-key: ssl.pemfile (ignored)
(server.c.1564) WARNING: unknown config-key: ssl.use-sslv3 (ignored)
(server.c.1564) WARNING: unknown config-key: ssl.pemfile (ignored)

You need to fix those. Add "mod_openssl" to server.modules Read the doc for mod_openssl and mod_fastcgi

    (1-1/1)