Commit 3a499099 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

- Test cases 1051, 1052 and 1055 were added by Daniel Fandrich on July 30 and

  proved how PUT and POST with a redirect could lead to a "hang" due to the
  data stream not being rewound properly when it had to in order to get sent
  properly (again) to the subsequent URL. This is now fixed and these test
  cases are no longer disabled.
parent 931fc45f
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -6,6 +6,13 @@

                                  Changelog

Daniel Stenberg (4 Aug 2008)
- Test cases 1051, 1052 and 1055 were added by Daniel Fandrich on July 30 and
  proved how PUT and POST with a redirect could lead to a "hang" due to the
  data stream not being rewound properly when it had to in order to get sent
  properly (again) to the subsequent URL. This is now fixed and these test
  cases are no longer disabled.

Yang Tse (4 Aug 2008)
- Autoconf 2.62 has changed the behaviour of the AC_AIX macro which we use.
  Prior versions of autoconf defined _ALL_SOURCE if _AIX was defined. 2.62
@@ -14,9 +21,8 @@ Yang Tse (4 Aug 2008)
  and an uniform one across autoconf versions AC_AIX is replaced with our
  own internal macro CURL_CHECK_AIX_ALL_SOURCE.


Daniel Stenberg (4 Aug 2008)
- Test case 1041 (added by Daniel Fandrich April 14th) proved a bug where PUT
- Test case 1041 (added by Daniel Fandrich July 14th) proved a bug where PUT
  with -C - sent garbage in the Content-Range: header. I fixed this problem by
  making sure libcurl always sets the size of the _entire_ upload if an app
  attemps to do resumed uploads since libcurl simply cannot know the size of
+2 −1
Original line number Diff line number Diff line
@@ -45,7 +45,8 @@ This release includes the following bugfixes:
 o a user name in a proxy URL without a password was parsed incorrectly
 o library will now be built with _REENTRANT symbol defined only if needed
 o no longer link with gdi32 on Windows cross-compiled targets
 o PUT with -C - sent bad Content-Range: header
 o HTTP PUT with -C - sent bad Content-Range: header
 o HTTP PUT or POST with redirect could lead to hang

This release includes the following known bugs:

+0 −3
Original line number Diff line number Diff line
@@ -29,7 +29,4 @@ To be addressed before 7.19.0 (planned release: August 2008)
         tests on the system might allow determination of the problem origin.
         Solaris AutoBuilds suceeded on August 2 and 3.

151 - PUT with -L hangs after receiving a redirect (test case 1051, but the
      test harness has a problem with this, too)

152 - 
+16 −5
Original line number Diff line number Diff line
@@ -309,7 +309,7 @@ static bool pickoneauth(struct auth *pick)
}

/*
 * perhapsrewind()
 * Curl_http_perhapsrewind()
 *
 * If we are doing POST or PUT {
 *   If we have more data to send {
@@ -331,17 +331,28 @@ static bool pickoneauth(struct auth *pick)
 *   }
 * }
 */
static CURLcode perhapsrewind(struct connectdata *conn)
CURLcode Curl_http_perhapsrewind(struct connectdata *conn)
{
  struct SessionHandle *data = conn->data;
  struct HTTP *http = data->state.proto.http;
  curl_off_t bytessent;
  curl_off_t expectsend = -1; /* default is unknown */

  if(!http)
  if(!http || !(conn->protocol & PROT_HTTP))
    /* If this is still NULL, we have not reach very far and we can
       safely skip this rewinding stuff */
       safely skip this rewinding stuff, or this is attempted to get used
       when HTTP isn't activated */
    return CURLE_OK;

  infof(data, "now in %s\n", __func__);

  switch(data->set.httpreq) {
  case HTTPREQ_GET:
  case HTTPREQ_HEAD:
    return CURLE_OK;
  default:
    break;
  }

  bytessent = http->writebytecount;

@@ -453,7 +464,7 @@ CURLcode Curl_http_auth_act(struct connectdata *conn)
    if((data->set.httpreq != HTTPREQ_GET) &&
       (data->set.httpreq != HTTPREQ_HEAD) &&
       !conn->bits.rewindaftersend) {
      code = perhapsrewind(conn);
      code = Curl_http_perhapsrewind(conn);
      if(code)
        return code;
    }
+2 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
 * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
@@ -57,6 +57,7 @@ void Curl_http_auth_stage(struct SessionHandle *data, int stage);
CURLcode Curl_http_input_auth(struct connectdata *conn,
                              int httpcode, const char *header);
CURLcode Curl_http_auth_act(struct connectdata *conn);
CURLcode Curl_http_perhapsrewind(struct connectdata *conn);

int Curl_http_should_fail(struct connectdata *conn);

Loading