Hi Mongoose Web Server Forum.
please may I ask for your assitance to overtcome the error message I have with my secure web-server project, (E event.c:18:mg_error 5 HTTP parse:).
My goal is: [describe your goal]: a secure and simple web server on Windows 10.
My actions are: [describe your actions - code, commands, etc]: I have had success with a simple web server with the std settings but have problems with a SSL crypto port 443s server.
The result I see is: [show the result - log, etc]: I have included my Mongoose Config file, log file, Chrome output, and my test RSA certificate, below.
My expectation & question is: [describe your expectation and your question]: What am I doing wrong here. Do I need to import the cert below onto the requesting Win PC or what?
CONFIG FILE:
-d C:\Users\MeLe\Desktop\WebServer
-a log_file.txt
-i 2b9v6045afogfjvk
-l http://0.0.0.0:443s:cert.pem
-g yes
LOG FILE:
2021-09-06 13:50:32 I main.c:114:cfg Setting option [-a] to [log_file.txt]
2021-09-06 13:50:32 I main.c:114:cfg Setting option [-i] to [2b9v6045afogfjvk]
2021-09-06 13:50:32 I main.c:114:cfg Setting option [-l] to [http://0.0.0.0:443s:cert.pem]
2021-09-06 13:50:32 I main.c:114:cfg Setting option [-g] to [yes]
2021-09-06 13:50:32 I sock.c:481:mg_listen 1 accepting on http://0.0.0.0:443s:cert.pem (port 443)
2021-09-06 13:50:32 I main.c:353:init_mongoose Starting Mongoose v7.3.3, serving C:\Users\MeLe\Desktop\WebServer
2021-09-06 13:50:32 I main.c:355:init_mongoose Local URL: http://192.168.1.64:443
2021-09-06 13:50:32 I main.c:357:init_mongoose Global URL: https://62f7d91a1ea2ef.share.mongoose.ws
2021-09-06 13:50:33 I main.c:262:tun_fn Tunnel opened, name: 62f7d91a1ea2ef
2021-09-06 13:50:44 E event.c:18:mg_error 6 HTTP parse:
2021-09-06 13:50:44 E event.c:18:mg_error 5 HTTP parse: <------ please could you analyse this error meessage
2021-09-06 13:50:44 E event.c:18:mg_error 8 HTTP parse:
2021-09-06 13:50:44 E event.c:18:mg_error 7 HTTP parse:
2021-09-06 13:50:45 E event.c:18:mg_error 9 HTTP parse:
Other Win 10 PC message:
Chrome replied with the following message after accessing https://31.125.166.xxx
‘This site can’t be reached 31.125.166.xxx unexpectedly closed the connection.’
TEST CERT located in the same folder as mongoose.exe:
cert.pem: (a test RSA certificate downloded from https://fm4dd.com/openssl/certexamples.shtm )
-----BEGIN RSA PRIVATE KEY-----
MIIBOwIBAAJBAJv8ZpB5hEK7qxP9K3v43hUS5fGT4waKe7ix4Z4mu5UBv+cw7WSF
At0Vaag0sAbsPzU8Hhsrj/qPABvfB8asUwcCAwEAAQJAG0r3ezH35WFG1tGGaUOr
QA61cyaII53ZdgCR1IU8bx7AUevmkFtBf+aqMWusWVOWJvGu2r5VpHVAIl8nF6DS
kQIhAMjEJ3zVYa2/Mo4ey+iU9J9Vd+WoyXDQD4EEtwmyG1PpAiEAxuZlvhDIbbce
7o5BvOhnCZ2N7kYb1ZC57g3F+cbJyW8CIQCbsDGHBto2qJyFxbAO7uQ8Y0UVHa0J
BO/g900SAcJbcQIgRtEljIShOB8pDjrsQPxmI1BLhnjD1EhRSubwhDw5AFUCIQCN
A24pDtdOHydwtSB5+zFqFLfmVZplQM/g5kb4so70Yw==
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIICEjCCAXsCAg36MA0GCSqGSIb3DQEBBQUAMIGbMQswCQYDVQQGEwJKUDEOMAwG
A1UECBMFVG9reW8xEDAOBgNVBAcTB0NodW8ta3UxETAPBgNVBAoTCEZyYW5rNERE
MRgwFgYDVQQLEw9XZWJDZXJ0IFN1cHBvcnQxGDAWBgNVBAMTD0ZyYW5rNEREIFdl
YiBDQTEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBmcmFuazRkZC5jb20wHhcNMTIw
ODIyMDUyNjU0WhcNMTcwODIxMDUyNjU0WjBKMQswCQYDVQQGEwJKUDEOMAwGA1UE
CAwFVG9reW8xETAPBgNVBAoMCEZyYW5rNEREMRgwFgYDVQQDDA93d3cuZXhhbXBs
ZS5jb20wXDANBgkqhkiG9w0BAQEFAANLADBIAkEAm/xmkHmEQrurE/0re/jeFRLl
8ZPjBop7u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