gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 110/208: http: s/TINY_INITIAL_POST_SIZE/EXPECT_100_


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 110/208: http: s/TINY_INITIAL_POST_SIZE/EXPECT_100_THRESHOLD
Date: Wed, 09 Aug 2017 17:35:07 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to annotated tag gnurl-7.55.0
in repository gnurl.

commit b22f93dbb854efa8ab3af9c07d01bcd3664b255c
Author: Daniel Stenberg <address@hidden>
AuthorDate: Thu Jul 6 11:20:57 2017 +0200

    http: s/TINY_INITIAL_POST_SIZE/EXPECT_100_THRESHOLD
    
    Make the name reflect its use better, and add a short comment describing
    what it's for.
---
 lib/http.c |  2 +-
 lib/http.h | 11 ++++++++---
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/lib/http.c b/lib/http.c
index e611214fb..319a8192c 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -2600,7 +2600,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
       data->state.expect100header =
         Curl_compareheader(ptr, "Expect:", "100-continue");
     }
-    else if(postsize > TINY_INITIAL_POST_SIZE || postsize < 0) {
+    else if(postsize > EXPECT_100_THRESHOLD || postsize < 0) {
       result = expect100(data, conn, req_buffer);
       if(result)
         return result;
diff --git a/lib/http.h b/lib/http.h
index 7ce4bd9a0..a845f564d 100644
--- a/lib/http.h
+++ b/lib/http.h
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <address@hidden>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -115,8 +115,13 @@ CURLcode Curl_http_perhapsrewind(struct connectdata *conn);
 #define MAX_INITIAL_POST_SIZE (64*1024)
 #endif
 
-#ifndef TINY_INITIAL_POST_SIZE
-#define TINY_INITIAL_POST_SIZE 1024
+/* EXPECT_100_THRESHOLD is the request body size limit for when libcurl will
+ * automatically add an "Expect: 100-continue" header in HTTP requests. When
+ * the size is unknown, it will always add it.
+ *
+ */
+#ifndef EXPECT_100_THRESHOLD
+#define EXPECT_100_THRESHOLD 1024
 #endif
 
 #endif /* CURL_DISABLE_HTTP */

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]