Skip to contentSkip to conversation

Don't use curl_easy_strerror prior to curl-7.12.0

PATCH Superseded Joachim Schmitz 2 participants 12 messages Jun 15, 2016

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Don't use curl_easy_strerror prior to curl-7.12.0

---
 http.c | 2 ++
 1 file changed, 2 insertions(+)
http.c +0 -0
index b61ac85..18bc6bf 100644
@@ -806,10 +806,12 @@ static int http_request(const char *url, void *result,

int target, int options)

                                ret = HTTP_REAUTH;
                        }
                } else {
+#if LIBCURL_VERSION_NUM >= 0x070c00
                        if (!curl_errorstr[0])
                                strlcpy(curl_errorstr,

curl_easy_strerror(results.curl_result),

                                        sizeof(curl_errorstr));
+#endif
                        ret = HTTP_ERROR;
                }
        } else {

--
1.7.12

Bye, Jojo

#1 lore raw
Quoted 1 line · Joachim Schmitz

At the very least, please mention that this reverts be22d92 (http:
avoid empty error messages for some curl errors, 2011-09-05) on platforms with older versions of libcURL.

Quoted 27 lines
---
 http.c | 2 ++
 1 file changed, 2 insertions(+)
http.c +2 -0
index b61ac85..18bc6bf 100644
@@ -806,10 +806,12 @@ static int http_request(const char *url, void *result,
 int target, int options)
                                ret = HTTP_REAUTH;
                        }
                } else {
+#if LIBCURL_VERSION_NUM >= 0x070c00
                        if (!curl_errorstr[0])
                                strlcpy(curl_errorstr,
 
 curl_easy_strerror(results.curl_result),
                                        sizeof(curl_errorstr));
+#endif
                        ret = HTTP_ERROR;
                }
        } else {

--
1.7.12

Bye, Jojo

#2 lore raw
Quoted 6 lines

From: Junio C Hamano [mailto:[email protected]]
Sent: Wednesday, August 22, 2012 7:19 PM
To: Joachim Schmitz
Cc: [email protected]
Subject: Re: [PATCH] Don't use curl_easy_strerror prior to curl-7.12.0

Quoted 7 lines
Quoted 1 line · Joachim Schmitz

At the very least, please mention that this reverts be22d92 (http:
avoid empty error messages for some curl errors, 2011-09-05) on platforms with older versions of libcURL.

a) Of course I didn't know that, thanks for telling me.
b) How and where to add that? In the Subject of an email, in the body, right at the front?
Like this:
----

This reverts be22d92 (http: avoid empty error messages for some curl errors, 2011-09-05) on platforms with older versions of libcURL.

---
 http.c | 2 ++
 1 file changed, 2 insertions(+)
http.c +0 -0
index b61ac85..18bc6bf 100644
@@ -806,10 +806,12 @@ static int http_request(const char *url, void *result,

int target, int options)

                                ret = HTTP_REAUTH;
                        }
                } else {
+#if LIBCURL_VERSION_NUM >= 0x070c00
                        if (!curl_errorstr[0])
                                strlcpy(curl_errorstr,

curl_easy_strerror(results.curl_result),

                                        sizeof(curl_errorstr));
+#endif
                        ret = HTTP_ERROR;
                }
        } else {

--
1.7.12

Bye, Jojo

#3 lore raw
Quoted 8 lines · Joachim Schmitz

Like this:
----

This reverts be22d92 (http: avoid empty error messages for some curl errors, 2011-09-05) on platforms with older versions of libcURL.

---

Perfect ;-)

http.c static int http_request(const char *url, void *result, · line 808

Quoted 11 lines
 http.c | 2 ++
 1 file changed, 2 insertions(+)
http.c +0 -0
index b61ac85..18bc6bf 100644
@@ -806,10 +806,12 @@ static int http_request(const char *url, void *result,
 int target, int options)
                                ret = HTTP_REAUTH;
                        }

Now we need to see where these whitespace breakages are coming from and fix it, and I think it should be done earlier than later, as I expect we will be seeing more patches from you in the coming weeks.

Quoted 15 lines
http.c +2 -0
                } else {
+#if LIBCURL_VERSION_NUM >= 0x070c00
                        if (!curl_errorstr[0])
                                strlcpy(curl_errorstr,
 
 curl_easy_strerror(results.curl_result),
                                        sizeof(curl_errorstr));
+#endif
                        ret = HTTP_ERROR;
                }
        } else {

--
1.7.12

Bye, Jojo

#4 lore raw
Quoted 23 lines

From: Junio C Hamano [mailto:[email protected]]
Sent: Wednesday, August 22, 2012 7:41 PM
To: Joachim Schmitz
Cc: [email protected]
Subject: Re: [PATCH] Don't use curl_easy_strerror prior to curl-7.12.0

Quoted 9 lines · Joachim Schmitz

Like this:
----

This reverts be22d92 (http: avoid empty error messages for some curl errors,
2011-09-05) on platforms with older versions of libcURL.

---

Perfect ;-)

Quoted 3 lines
 http.c | 2 ++
 1 file changed, 2 insertions(+)
Quoted 11 lines

http.c static int http_request(const char *url, void · line 808

Quoted 8 lines
http.c +0 -0
index b61ac85..18bc6bf 100644
@@ -806,10 +806,12 @@ static int http_request(const char *url, void
 *result, int target, int options)
                                ret = HTTP_REAUTH;
                        }

Now we need to see where these whitespace breakages are coming from and fix it, and I think it should be done earlier than later, as I expect we

will be

Quoted 1 line

seeing more patches from you in the coming weeks.

OK, next attempt (this time I downloaded the patch file to my PC first and used Wordpad for copy/past rather than cat in a PuTTY session)
---

This reverts be22d92 (http: avoid empty error messages for some curl errors, 2011-09-05) on platforms with older versions of libcURL.

---
 http.c | 2 ++
 1 file changed, 2 insertions(+)
http.c +0 -0
index b61ac85..18bc6bf 100644
@@ -806,10 +806,12 @@ static int http_request(const char *url, void *result,

int target, int options)
ret = HTTP_REAUTH;
}
} else {
+#if LIBCURL_VERSION_NUM >= 0x070c00
if (!curl_errorstr[0])
strlcpy(curl_errorstr,

curl_easy_strerror(results.curl_result),
sizeof(curl_errorstr));
+#endif
ret = HTTP_ERROR;
}
} else {

Signature · 5 lines
1.7.12

Better?

Bye, Jojo
#5 lore raw
Quoted 14 lines · Joachim Schmitz

This reverts be22d92 (http: avoid empty error messages for some curl errors, 2011-09-05) on platforms with older versions of libcURL.

---
 http.c | 2 ++
 1 file changed, 2 insertions(+)
http.c +0 -0
index b61ac85..18bc6bf 100644

http.c static int http_request(const char *url, void *result, · line 806

Quoted 1 line
http.c +0 -0
@@ -806,10 +806,12 @@ static int http_request(const char *url, void *result,
 int target, int options)

Likewrapped X-<

Quoted 13 lines
http.c +2 -0
 				ret = HTTP_REAUTH;
 			}
 		} else {
+#if LIBCURL_VERSION_NUM >= 0x070c00
 			if (!curl_errorstr[0])
 				strlcpy(curl_errorstr,
 
 curl_easy_strerror(results.curl_result),
 					sizeof(curl_errorstr));
+#endif
 			ret = HTTP_ERROR;
http.c +0 -0
 		}
 	} else {
#6 lore raw
Quoted 21 lines

-----Original Message-----
From: Junio C Hamano [mailto:[email protected]]
Sent: Wednesday, August 22, 2012 8:17 PM
To: Joachim Schmitz
Cc: [email protected]
Subject: Re: [PATCH] Don't use curl_easy_strerror prior to curl-7.12.0

Quoted 10 lines · Joachim Schmitz

This reverts be22d92 (http: avoid empty error messages for some curl errors,
2011-09-05) on platforms with older versions of libcURL.

---
 http.c | 2 ++
 1 file changed, 2 insertions(+)
Quoted 8 lines

http.c static int http_request(const char *url, void · line 806

Quoted 6 lines
http.c +0 -0
index b61ac85..18bc6bf 100644
@@ -806,10 +806,12 @@ static int http_request(const char *url, void
 *result, int target, int options)

Likewrapped X-<

Any suggestion?

#7 lore raw
Quoted 10 lines · Joachim Schmitz
Quoted 8 lines

http.c static int http_request(const char *url, void · line 806

Quoted 6 lines
http.c +0 -0
index b61ac85..18bc6bf 100644
@@ -806,10 +806,12 @@ static int http_request(const char *url, void
 *result, int target, int options)

Likewrapped X-<

Any suggestion?

Other than "don't wrap" (or "get a real MUA and MTA" X-<), unfortunately no.

I do not know if you have checked MUA specific hints section of Documentation/SubmittingPatches; there may be environment specific hints described for a MUA you may have at hand (or not).

#8 lore raw
Quoted 25 lines

From: Joachim Schmitz [mailto:[email protected]]
Sent: Wednesday, August 22, 2012 11:06 PM
To: 'Junio C Hamano'
Cc: '[email protected]'
Subject: RE: [PATCH] Don't use curl_easy_strerror prior to curl-7.12.0

Quoted 19 lines

From: Junio C Hamano [mailto:[email protected]]
Sent: Wednesday, August 22, 2012 11:02 PM
To: Joachim Schmitz
Cc: [email protected]
Subject: Re: [PATCH] Don't use curl_easy_strerror prior to curl-7.12.0

Quoted 10 lines · Joachim Schmitz
Quoted 8 lines

http.c static int http_request(const char *url, void · line 806

Quoted 6 lines
http.c +0 -0
index b61ac85..18bc6bf 100644
@@ -806,10 +806,12 @@ static int http_request(const char *url, void
 *result, int target, int options)

Likewrapped X-<

Any suggestion?

Quoted 7 lines
Quoted 5 lines

Other than "don't wrap" (or "get a real MUA and MTA" X-<), unfortunately no.

I do not know if you have checked MUA specific hints section of Documentation/SubmittingPatches; there may be environment specific hints described for a MUA you may have at hand (or not).

I checked, but Outlook isn't mentioned :-(

OK, Outlook inserts line breaks at position 76. I can't switch it off completely, but can set it to anything between 30 and 132. I set it to 132 now, does that look OK now?
---

This reverts be22d92 (http: avoid empty error messages for some curl errors, 2011-09-05) on platforms with older versions of libcURL.

---
 http.c | 2 ++
 1 file changed, 2 insertions(+)
http.c +2 -0
index b61ac85..18bc6bf 100644
@@ -806,10 +806,12 @@ static int http_request(const char *url, void *result, int target, int options)
 				ret = HTTP_REAUTH;
 			}
 		} else {
+#if LIBCURL_VERSION_NUM >= 0x070c00
 			if (!curl_errorstr[0])
 				strlcpy(curl_errorstr,
 					curl_easy_strerror(results.curl_result),
 					sizeof(curl_errorstr));
+#endif
 			ret = HTTP_ERROR;
 		}
 	} else {
Signature · 4 lines
1.7.12


Bye, Jojo
#9 lore raw
Quoted 27 lines · Joachim Schmitz
Quoted 27 lines

From: Joachim Schmitz [mailto:[email protected]]
Sent: Wednesday, August 22, 2012 11:06 PM
To: 'Junio C Hamano'
Cc: '[email protected]'
Subject: RE: [PATCH] Don't use curl_easy_strerror prior to curl-7.12.0

Quoted 21 lines

From: Junio C Hamano [mailto:[email protected]]
Sent: Wednesday, August 22, 2012 11:02 PM
To: Joachim Schmitz
Cc: [email protected]
Subject: Re: [PATCH] Don't use curl_easy_strerror prior to curl-7.12.0

Quoted 10 lines · Joachim Schmitz
Quoted 8 lines

http.c static int http_request(const char *url, void · line 806

Quoted 6 lines
http.c +0 -0
index b61ac85..18bc6bf 100644
@@ -806,10 +806,12 @@ static int http_request(const char *url, void
 *result, int target, int options)

Likewrapped X-<

Any suggestion?

Other than "don't wrap" (or "get a real MUA and MTA" X-<), unfortunately no.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

I do not know if you have checked MUA specific hints section of Documentation/SubmittingPatches; there may be environment specific hints described for a MUA you may have at hand (or not).

I checked, but Outlook isn't mentioned :-(

OK, Outlook inserts line breaks at position 76. I can't switch it off completely, but can set it to anything between 30 and 132. I set it to 132 now, does that look OK now?

Yeah, modulo that with all the above noise and with "---" before the log message you inserted by hand before the real commit log message, and also the log message is not properly line-wrapped, it is getting closer to what is expected of a patch to be applied.

I've applied it by hand and fixed the log message up, so no need to resend this particular one. Thanks.

Quoted 27 lines

---

This reverts be22d92 (http: avoid empty error messages for some curl errors, 2011-09-05) on platforms with older versions of libcURL.

---
 http.c | 2 ++
 1 file changed, 2 insertions(+)
http.c +2 -0
index b61ac85..18bc6bf 100644
@@ -806,10 +806,12 @@ static int http_request(const char *url, void *result, int target, int options)
 				ret = HTTP_REAUTH;
 			}
 		} else {
+#if LIBCURL_VERSION_NUM >= 0x070c00
 			if (!curl_errorstr[0])
 				strlcpy(curl_errorstr,
 					curl_easy_strerror(results.curl_result),
 					sizeof(curl_errorstr));
+#endif
 			ret = HTTP_ERROR;
 		}
 	} else {
#11 lore raw
In reply to Junio C Hamano
Quoted 17 lines

From: Junio C Hamano [mailto:[email protected]]
Sent: Wednesday, August 22, 2012 11:02 PM
To: Joachim Schmitz
Cc: [email protected]
Subject: Re: [PATCH] Don't use curl_easy_strerror prior to curl-7.12.0

Quoted 9 lines · Joachim Schmitz
Quoted 8 lines

http.c static int http_request(const char *url, void · line 806

Quoted 6 lines
http.c +0 -0
index b61ac85..18bc6bf 100644
@@ -806,10 +806,12 @@ static int http_request(const char *url, void
 *result, int target, int options)

Likewrapped X-<

Quoted 3 lines
Quoted 1 line

Any suggestion?

Other than "don't wrap" (or "get a real MUA and MTA" X-<), unfortunately

no.

Quoted 4 lines

I do not know if you have checked MUA specific hints section of Documentation/SubmittingPatches; there may be environment specific hints described for a MUA you may have at hand (or not).

I checked, but Outlook isn't mentioned :-(

Bye, Jojo

#10 lore raw
In reply to Junio C Hamano
Quoted 6 lines

From: Junio C Hamano [mailto:[email protected]]
Sent: Thursday, August 23, 2012 11:27 PM
To: Joachim Schmitz
Cc: [email protected]
Subject: Re: [PATCH] Don't use curl_easy_strerror prior to curl-7.12.0

Quoted 36 lines
Quoted 34 lines · Joachim Schmitz
Quoted 25 lines

From: Joachim Schmitz [mailto:[email protected]]
Sent: Wednesday, August 22, 2012 11:06 PM
To: 'Junio C Hamano'
Cc: '[email protected]'
Subject: RE: [PATCH] Don't use curl_easy_strerror prior to curl-7.12.0

Quoted 19 lines

From: Junio C Hamano [mailto:[email protected]]
Sent: Wednesday, August 22, 2012 11:02 PM
To: Joachim Schmitz
Cc: [email protected]
Subject: Re: [PATCH] Don't use curl_easy_strerror prior to curl-7.12.0

Quoted 10 lines · Joachim Schmitz
Quoted 8 lines

http.c static int http_request(const char *url, void · line 806

Quoted 6 lines
http.c +0 -0
index b61ac85..18bc6bf 100644
@@ -806,10 +806,12 @@ static int http_request(const char *url, void
 *result, int target, int options)

Likewrapped X-<

Any suggestion?

Quoted 7 lines
Quoted 5 lines

Other than "don't wrap" (or "get a real MUA and MTA" X-<), unfortunately no.

I do not know if you have checked MUA specific hints section of Documentation/SubmittingPatches; there may be environment specific hints described for a MUA you may have at hand (or not).

I checked, but Outlook isn't mentioned :-(

OK, Outlook inserts line breaks at position 76. I can't switch it off completely, but can set it to anything between 30 and 132.

I

Quoted 4 lines
Quoted 1 line

set it to 132 now, does that look OK now?

Yeah, modulo that with all the above noise and with "---" before the log message you inserted by hand before the real commit log message,

OK, those are not allowed then? Or would they need to look different?

Quoted 5 lines

and also the log message is not properly line-wrapped, it is getting closer to what is expected of a patch to be applied.

I've applied it by hand and fixed the log message up, so no need to resend this particular one. Thanks.

Thanks

Quoted 2 lines
Quoted 2 lines

This reverts be22d92 (http: avoid empty error messages for some curl errors, 2011-09-05) on platforms with older versions of libcURL.

You meant that linewrap between "of" and libcURL?, Or well, that was the 132 position... Or do you want these messages being wrapped at <=80?

Bye, Jojo