Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem when action request doesn't have Content-Length header
31-07-2013, 07:19 PM
Post: #21
RE: Problem when action request doesn't have Content-Length header
(31-07-2013 03:12 PM)simonc Wrote:  Now committed so will hopefully be available to you this evening.

Thanks again for diagnosing and fixing this - its much appreciated.

You're most welcome, and thanks for doing this so quickly.

I noticed one small change in the code you committed:

Code:
if (iOffset > 0 && iBytes == iMaxBytes) { // so move everything down

Your code is correct, as iBytes can't be greater than iMaxBytes. I nearly used this == comparison in my patch, but I chose to use >= for consistency with the code that follows this:

Code:
if (iBytes >= iMaxBytes) { // buffer full and no separator
    THROW(ReaderError);
}

In this code also, iBytes can't be greater than iMaxBytes. It might be worth changing the >= to == to make all the code in this method consistent.
Find all posts by this user
01-08-2013, 02:31 PM
Post: #22
RE: Problem when action request doesn't have Content-Length header
(31-07-2013 07:19 PM)simoncn Wrote:  Your code is correct, as iBytes can't be greater than iMaxBytes. I nearly used this == comparison in my patch, but I chose to use >= for consistency with the code that follows this:

Code:
if (iBytes >= iMaxBytes) { // buffer full and no separator
    THROW(ReaderError);
}

In this code also, iBytes can't be greater than iMaxBytes. It might be worth changing the >= to == to make all the code in this method consistent.

Good point, I'll do this.
Find all posts by this user


Forum Jump: