]> granicus.if.org Git - curl/commitdiff
make sure that a regular POST using the read callback works
authorDaniel Stenberg <daniel@haxx.se>
Tue, 7 Oct 2003 14:39:32 +0000 (14:39 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 7 Oct 2003 14:39:32 +0000 (14:39 +0000)
lib/http.c

index e0a280e289fdce8d6849591d3e4ada0c7a9e59b9..ff6e432aa0faab9784aad3f0cf3ef945ef730ff1 100644 (file)
@@ -1568,11 +1568,15 @@ CURLcode Curl_http(struct connectdata *conn)
           Curl_pgrsSetUploadSize(data, http->postsize);
         }
       }
-      else
+      else {
         /* set the upload size to the progress meter */
         Curl_pgrsSetUploadSize(data, data->set.infilesize);
 
-      /* issue the request, headers-only */
+        /* set the pointer to mark that we will send the post body using
+           the read callback */
+        http->postdata = (char *)&http->postdata;
+      }
+      /* issue the request */
       result = add_buffer_send(req_buffer, conn->firstsocket, conn,
                                &data->info.request_size);