kakwa / uts-server

Micro RFC 3161 Time-Stamp server written in C.
http://uts-server.readthedocs.org/en/latest/
MIT License
75 stars 21 forks source link

Fix wrong Content-Length #16

Open fashberg opened 3 years ago

fashberg commented 3 years ago

Hey!

The static page sets Content-Length to a wrong size resulting in endless loops or errors when requesting.

Based on https://github.com/nicholasamorim/dockerfile-uts-server i'm running uts-server in a kubernetes-cluster and k8s health check fails with this content-length bug.

I suggest just removing Content-Length, it is not required at all (https://datatracker.ietf.org/doc/html/rfc2616#section-14.13 SHOULD)

# wget http://10.42.0.70:2020
--2021-05-20 14:51:06--  http://10.42.0.70:2020/
Connecting to 10.42.0.70:2020... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2774 (2.7K) [text/html]
Saving to: ‘index.html’

index.html                                                           96%[==========================================================================================================================================================>       ]   2.61K  --.-KB/s    in 0s

2021-05-20 14:51:06 (542 MB/s) - Connection closed at byte 2670. Retrying.

--2021-05-20 14:51:07--  (try: 2)  http://10.42.0.70:2020/
Connecting to 10.42.0.70:2020... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2774 (2.7K) [text/html]