WebAPI broken redirects
I have encountered bug with using WebAPI to retrieve information from the samweb servers. The overall issue loooks like this:
1. WebAPI sends a GET request via http to `samweb.fnal.gov`
2. 'samweb` redirects to the https version and sends a new location in the http header.
3. WebAPI incorrectly parses new location -- the location gets truncated.
4. WebAPI retries GET request using the new incorrectly parsed https location and fails.
The log of the connection is attached.
The issue is caused by a small buffer size WebAPI.cc:443: `_fromsite.getline(buf, 512);` which truncates redirect link at 512 characters.