The SegmentConsumer has a bug that causes Simple to close the connection to the client. The bug occurs when the request, including headers, have a length of 1024+n*512.
A unit test reproducing the bug
You seem to have CSS turned off. Please don't fill out this field.
Run the attached unit test to reproduce the bug
The bug is fixed by replacing the SegmentConsumer.value() method to:
private void value() { Token token = new Token(pos, 0);
scan: for(int mark = 0; pos < count;){ if(terminal(array[pos])) { /* CR or LF */ for(int i = 0; pos < count; i++){ if(array[pos++] == 10) { /* skip the LF */ if(pos < array.length && space(array[pos])) { mark += i + 1; /* account for bytes examined */ break; /* folding line */ } break scan; /* not a folding line */ } } } else { if(!space(array[pos])){ token.size = ++mark; } else { mark++; } pos++; } } value = token.text(); }
Can u provide more info???
The bug causes Simple to close the connection to the client. I have attached a unittest reproducing the issue
Log in to post a comment.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
A unit test reproducing the bug
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Run the attached unit test to reproduce the bug
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
The bug is fixed by replacing the SegmentConsumer.value() method to:
private void value() {
Token token = new Token(pos, 0);
scan: for(int mark = 0; pos < count;){
if(terminal(array[pos])) { /* CR or LF */
for(int i = 0; pos < count; i++){
if(array[pos++] == 10) { /* skip the LF */
if(pos < array.length && space(array[pos])) {
mark += i + 1; /* account for bytes examined */
break; /* folding line */
}
break scan; /* not a folding line */
}
}
} else {
if(!space(array[pos])){
token.size = ++mark;
} else {
mark++;
}
pos++;
}
}
value = token.text();
}
Can u provide more info???
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
The bug causes Simple to close the connection to the client. I have attached a unittest reproducing the issue