OSDN Git Service

Merge branch 'branch_0.13.0' into branch_0.13.0-svn
authorkonn <konn@1a406e8e-add9-4483-a2c8-d8cac5b7c224>
Sun, 19 Jul 2009 16:22:07 +0000 (16:22 +0000)
committerkonn <konn@1a406e8e-add9-4483-a2c8-d8cac5b7c224>
Sun, 19 Jul 2009 16:22:07 +0000 (16:22 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/modchxj/mod_chxj/branches/RELEASE_0_13_0@4817 1a406e8e-add9-4483-a2c8-d8cac5b7c224

ChangeLog
debian-sarge/changelog
debian/changelog
src/chxj_serf.c
src/serf/buckets/ssl_buckets.c

index 347fd16..754ed50 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,7 +7,10 @@ libapache2-mod-chxj (0.12.37-1) unstable; urgency=low
     - Content-Type is not seen when there is Location header.
   * Fixed Bug.
     - Cookie is deleted though it is not CookieOn.
+      (Reported by isssk. Thanks!)
     - Fixed url dencode bug.
+    - received SIGSEGV when connection was refused within libserf-0.2.0.
+      (Reported by kamiya. Thanks!)
 
  -- Atsushi Konno <konn@users.sourceforge.jp>  Mon, 15 Jun 2009 09:48:10 +0900
 
index 864fdca..53805ee 100644 (file)
@@ -7,7 +7,10 @@ libapache2-mod-chxj (0.12.37-1) unstable; urgency=low
     - Content-Type is not seen when there is Location header.
   * Fixed Bug.
     - Cookie is deleted though it is not CookieOn.
+      (Reported by isssk. Thanks!)
     - Fixed url dencode bug.
+    - received SIGSEGV when connection was refused within libserf-0.2.0.
+      (Reported by kamiya. Thanks!)
 
  -- Atsushi Konno <konn@users.sourceforge.jp>  Mon, 15 Jun 2009 09:48:10 +0900
 
index 9e038d5..6b9523f 100644 (file)
@@ -7,7 +7,10 @@ libapache2-mod-chxj (0.12.37-1) unstable; urgency=low
     - Content-Type is not seen when there is Location header.
   * Fixed Bug.
     - Cookie is deleted though it is not CookieOn.
+      (Reported by isssk. Thanks!)
     - Fixed url dencode bug.
+    - received SIGSEGV when connection was refused within libserf-0.2.0.
+      (Reported by kamiya. Thanks!)
 
  -- Atsushi Konno <konn@users.sourceforge.jp>  Mon, 15 Jun 2009 09:48:10 +0900
 
index 67582cd..1b89ec5 100644 (file)
@@ -485,7 +485,7 @@ default_chxj_serf_post(request_rec *r, apr_pool_t *ppool, const char *url_path,
   else {
     ret = apr_pstrdup(ppool, "");
   }
-  if (set_headers_flag) {
+  if (set_headers_flag && !rv) {
     r->headers_out = apr_table_copy(pool, handler_ctx.headers_out);
     *response_len = handler_ctx.response_len;
     char *contentType = (char *)apr_table_get(handler_ctx.headers_out, "Content-Type");
@@ -494,6 +494,9 @@ default_chxj_serf_post(request_rec *r, apr_pool_t *ppool, const char *url_path,
       chxj_set_content_type(r, apr_pstrdup(r->pool, contentType));
     }
   }
+  if (rv) {
+    *response_len = 0;
+  }
   *response_code = handler_ctx.response_code;
   DBG(r, "REQ:[%X] end chxj_serf_post()", (unsigned int)(apr_size_t)r);
   return ret;
index 1cea83c..bbf31a1 100644 (file)
@@ -215,19 +215,20 @@ static int bio_bucket_read(BIO *bio, char *in, int inlen)
 static int bio_bucket_write(BIO *bio, const char *in, int inl)
 {
     serf_ssl_context_t *ctx = bio->ptr;
-    serf_bucket_t *tmp;
+    serf_bucket_t *tmp = NULL;
 
 #ifdef SSL_VERBOSE
     printf("bio_bucket_write called for %d bytes\n", inl);
 #endif
     BIO_clear_retry_flags(bio);
 
-    tmp = serf_bucket_simple_copy_create(in, inl,
-                                         ctx->encrypt.pending->allocator);
-
-    serf_bucket_aggregate_append(ctx->encrypt.pending, tmp);
-
-    return inl;
+    if (ctx && ctx->encrypt.pending && ctx->encrypt.pending->allocator) {
+      tmp = serf_bucket_simple_copy_create(in, inl,
+                                           ctx->encrypt.pending->allocator);
+      serf_bucket_aggregate_append(ctx->encrypt.pending, tmp);
+      return inl;
+    }
+    return 0;
 }
 
 /* Returns the amount read. */