serf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Kaufman <>
Subject Re: Spin when fetching resources over SSL
Date Wed, 28 Oct 2015 19:50:02 GMT
Jeff Kaufman wrote:
> when I try to fetch anything over https it spins in ssl_buckets.c

I have a bit more detail now: I was wrong before, and the loop is not
entirely within serf.  I was misunderstanding what the debugger was
telling me; sorry!

The relevant code is essentially:

  handle_response() {
    status = EAGAIN;
    while (APR_STATUS_IS_EAGAIN(status)) {
      // The response-handling code must be robust to packets coming
in all at
      // once, one byte at a time, or anything in between.  EAGAIN
      // that more data is available in the socket so another read
      // be issued before returning.
      status = serf_bucket_response_status(...);

Looking at serf_get.c I see that if serf_bucket_response_status()
returns any non-zero status at all then serf_get:handle_response
passes that status up to the caller.  So I think our comment is wrong,
and we should be letting the caller handle this case.  I've changed
our code to do the same thing as serf_get.c and https fetching now

I don't know why this worked in 1.1.0 and not in 1.3.8, but I now have
our serf integration working again.


View raw message