diff options
author | Daniel Stenberg <daniel@haxx.se> | 2008-03-31 10:16:34 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2008-03-31 10:16:34 +0000 |
commit | f1c69192da0a7326329629550795101e40092438 (patch) | |
tree | 184ba162e77fff36f4776c7ca97d71f835792241 | |
parent | a2314225e02ea2f3bd49dc8557f2452846e49b19 (diff) |
expanded a comment around some of the new formpost callback usage
-rw-r--r-- | lib/http.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/http.c b/lib/http.c index 356741fe8..cb330c6cf 100644 --- a/lib/http.c +++ b/lib/http.c @@ -2506,9 +2506,14 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) return CURLE_HTTP_POST_ERROR; } - /* set the read function to read from the generated form data */ - http->form.fread_func = conn->fread_func; /* get the previously set callback - function pointer */ + /* Get the currently set callback function pointer and store that in the + form struct since we might want the actual user-provided callback later + on. The conn->fread_func pointer itself will be changed for the + multipart case to the function that returns a multipart formatted + stream. */ + http->form.fread_func = conn->fread_func; + + /* Set the read function to read from the generated form data */ conn->fread_func = (curl_read_callback)Curl_FormReader; conn->fread_in = &http->form; |