http-party / http-server

a simple zero-configuration command-line http server
MIT License
13.42k stars 1.48k forks source link

RangeError: Invalid time value #855

Closed babadoctor closed 1 year ago

babadoctor commented 1 year ago

Environment Versions

  1. OS Type Linux diode 5.10.0-9-amd64 #1 SMP Debian 5.10.70-1 (2021-09-30) x86_64 GNU/Linux (debian bullseye)

  2. Node version: $ node --version v12.22.12

  3. http-server version: $ http-server --version v14.1.1

Steps to reproduce

sudo http-server -p 80 --log-ip

Expected result

runs like normal

Actual result

for some unknown reason http-server quits with error, this was caused when a vulnerability scanner did something to it and it crashed. Screen_Shot_2023-04-10_at_5 42 34_PM

...

Other information

zbynek commented 1 year ago

Do you have index.html in your root folder? What is the last modification date of it? I can reproduce the error if I manually set the modification date of index.html to some nonsense (e.g. using touch -d '1937-01-31 8:46:26' index.html on Linux).

babadoctor commented 1 year ago

Do you have index.html in your root folder? What is the last modification date of it? I can reproduce the error if I manually set the modification date of index.html to some nonsense (e.g. using touch -d '1937-01-31 8:46:26' index.html on Linux).

I am running a hugo static webpage and in the root directory of the webpage I am running http-server, and it seems to work.

The index.html file is in a folder within the root directory called "public".

Screen Shot 2023-04-11 at 5 08 09 PM
babadoctor commented 1 year ago

I'm just going to chalk this up to hugo doing something weird with the modification date of the files, and will resolve to not leave it running for extended periods of time.