smimesign icon indicating copy to clipboard operation
smimesign copied to clipboard

Fix timestamp response buffer allocation if response size is unknown.

Open wlynch opened this issue 3 years ago • 0 comments

When trying this out against freetsa.org, I got the following error:

runtime error: makeslice: cap out of range

This seems to stem from the buffer allocation if ContentLength = -1. From the net/http docs:

ContentLength records the length of the associated content. The
value -1 indicates that the length is unknown.

Not sure why working with freetsa is causing a -1 to be returned, but this changes the behavior to work in either case.

wlynch avatar Sep 26 '22 13:09 wlynch