Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: JeffS on January 30, 2020, 03:12:27 PM

Title: HTTPCMD Body Byte Buffer
Post by: JeffS on January 30, 2020, 03:12:27 PM
I have an API that currently works with a remote server, but wanted expand it a bit to be able to send more than 1024 characters if needed.  The only thing I changed is that I now compile my body into a byte buffer rather than a string and though nothing else has changed I am getting 411 error responses from the server stating no Length was supplied.  If I swap back to a string then it works fine again.  The contents of the byte buffer match the contents of the string exactly.

Code: [Select]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">..<HTML><HEAD><TITLE>Length Required</TITLE>..<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>..<BODY><h2>Length Required</h2>..<hr><p>HTTP Error 411. The request must be chunked or have a content length.</p>..</BODY></HTML>..
Title: Re: HTTPCMD Body Byte Buffer
Post by: BobO on January 30, 2020, 04:20:40 PM
Not sure. At the low level that sends out the length, there is no difference between the string and buffer. Even if the number of bytes field was wrong, I would think it would still send the length field. Is this something publicly accessible? I'm happy to dig further.
Title: Re: HTTPCMD Body Byte Buffer
Post by: ADC Product Engineer on February 03, 2020, 07:54:29 AM
Is your firmware up to date?
Title: Re: HTTPCMD Body Byte Buffer
Post by: BobO on February 03, 2020, 09:02:00 AM
Is your firmware up to date?

It is. He and I have been working on it. It's broken.