Skip to content

Commit

Permalink
Fix a very old bug in the header buckets readline that we somehow never
Browse files Browse the repository at this point in the history
noticed in our previous uses of this bucket.

Reading the header buckets as an incoming request triggered this bug
while testing the fcgi code. (Assuming the next commit)

* buckets/headers_buckets.c
  (serf_headers_readline): Calculate the kind of newline *before*
    changing the state for the next read.


git-svn-id: https://svn.apache.org/repos/asf/serf/trunk@1714781 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
rhuijben committed Nov 17, 2015
1 parent fe37005 commit c9292cb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions buckets/headers_buckets.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,12 +407,12 @@ static apr_status_t serf_headers_readline(serf_bucket_t *bucket,
return APR_EOF;
}

/* we consumed this chunk. advance the state. */
status = consume_chunk(ctx);

/* the type of newline found is easy... */
*found = (ctx->state == READ_CRLF || ctx->state == READ_TERM)
? SERF_NEWLINE_CRLF : SERF_NEWLINE_NONE;
? SERF_NEWLINE_CRLF : SERF_NEWLINE_NONE;

/* we consumed this chunk. advance the state. */
status = consume_chunk(ctx);

return status;
}
Expand Down

0 comments on commit c9292cb

Please sign in to comment.