Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Commit

Permalink
Update serf to 1.3.8 from 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffkaufman committed Nov 20, 2015
1 parent db226e9 commit 468997a
Show file tree
Hide file tree
Showing 10 changed files with 1,947 additions and 780 deletions.
2 changes: 1 addition & 1 deletion DEPS
Expand Up @@ -35,7 +35,7 @@ vars = {
"modspdy_src": "https://svn.apache.org/repos/asf/httpd/mod_spdy/trunk",
"modspdy_revision": "@1661925",

"serf_src": "https://svn.apache.org/repos/asf/serf/tags/1.1.0/",
"serf_src": "https://svn.apache.org/repos/asf/serf/tags/1.3.8/",
"serf_revision": "@head",

"apr_src": "https://svn.apache.org/repos/asf/apr/apr/tags/1.5.1/",
Expand Down
1 change: 1 addition & 0 deletions net/instaweb/instaweb.gyp
Expand Up @@ -1738,6 +1738,7 @@
'rewriter/cache_extender.cc',
'rewriter/cache_html_filter.cc',
'rewriter/cacheable_resource_base.cc',
'rewriter/central_controller.cc',
'rewriter/collect_flush_early_content_filter.cc',
'rewriter/common_filter.cc',
'rewriter/compute_visible_text_filter.cc',
Expand Down
21 changes: 13 additions & 8 deletions pagespeed/system/serf_url_async_fetcher.cc
Expand Up @@ -440,10 +440,10 @@ apr_status_t SerfFetch::HandleResponse(serf_bucket_t* response) {
return APR_EGENERAL;
}

// The response-handling code must be robust to packets coming in all at
// once, one byte at a time, or anything in between. EAGAIN indicates
// that more data is available in the socket so another read should
// be issued before returning.
// The response-handling code must be robust to packets coming in all at once,
// one byte at a time, or anything in between. If we get EAGAIN we need to
// return it to our caller so it can do more work and call us again. See the
// serf example code in serf_get.c.
apr_status_t status = APR_EAGAIN;
while (MoreDataAvailable(status) && (async_fetch_ != NULL) &&
!parser_.headers_complete()) {
Expand All @@ -458,6 +458,10 @@ apr_status_t SerfFetch::HandleResponse(serf_bucket_t* response) {
if (one_byte_read_ && !parser_.headers_complete()) {
status = ReadHeaders(response);
}

if (APR_STATUS_IS_EAGAIN(status)) {
return status;
}
}

if (parser_.headers_complete()) {
Expand Down Expand Up @@ -1170,13 +1174,14 @@ void SerfUrlAsyncFetcher::CancelActiveFetchesMutexHeld() {
}

bool SerfUrlAsyncFetcher::StartFetch(SerfFetch* fetch) {
active_fetches_.Add(fetch);
active_count_->Add(1);
bool started = !shutdown_ && fetch->Start(this);
if (started) {
active_fetches_.Add(fetch);
active_count_->Add(1);
} else {
if (!started) {
fetch->message_handler()->Message(kWarning, "Fetch failed to start: %s",
fetch->DebugInfo().c_str());
active_fetches_.Remove(fetch);
active_count_->Add(-1);
fetch->CallbackDone(false);
delete fetch;
}
Expand Down
3 changes: 3 additions & 0 deletions third_party/aprutil/aprutil.gyp
Expand Up @@ -84,6 +84,9 @@
'src/buckets/apr_buckets_refcount.c',
'src/buckets/apr_buckets_simple.c',
'src/buckets/apr_buckets_socket.c',
'src/crypto/apr_md5.c',
'src/crypto/getuuid.c',
'src/crypto/uuid.c',
'src/dbm/apr_dbm.c',
'src/dbm/apr_dbm_sdbm.c',
'src/dbm/sdbm/sdbm.c',
Expand Down

0 comments on commit 468997a

Please sign in to comment.