[Asterisk-code-review] func_curl.c: Support custom http headers (asterisk[13])

Martin Tomec asteriskteam at digium.com
Fri Nov 15 08:02:58 CST 2019


Martin Tomec has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/13166 )

Change subject: func_curl.c: Support custom http headers
......................................................................


Patch Set 3:

(4 comments)

> Patch Set 1: Code-Review-1
> 
> (4 comments)

Thanks for review. Changes are in patch set 3.

https://gerrit.asterisk.org/c/asterisk/+/13166/1/funcs/func_curl.c 
File funcs/func_curl.c:

https://gerrit.asterisk.org/c/asterisk/+/13166/1/funcs/func_curl.c@103 
PS1, Line 103: 						<para>Add HTTP header. Multiple calls adds multiple headers.
> "adds" -> "add"
Not a native speaker :-) Thanks


https://gerrit.asterisk.org/c/asterisk/+/13166/1/funcs/func_curl.c@104 
PS1, Line 104: 						Setting of any header will remove the default
             : 						"Content-Type application/x-www-form-urlencoded"
> Why is this the case? If I set the 'X-Foo' header, it will remove the 'Content-Type' header?
It is a "feature" of libcurl. It can be said as "when you set custom headers, all default headers are replaced". I dont want here to write "workarounds" of this behavior (it would be error prone).


https://gerrit.asterisk.org/c/asterisk/+/13166/1/funcs/func_curl.c@167 
PS1, Line 167: 			settings will override global settings. Only http headers are added instead of overriding</para>
> "http" -> "HTTP"
Done


https://gerrit.asterisk.org/c/asterisk/+/13166/1/funcs/func_curl.c@403 
PS1, Line 403: 		AST_LIST_LOCK(list);
> This lock needs to be done outside of the 'if' statement due to the subsequent unlock being unguarde […]
Good point, thanks.



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13166
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I4dd68c3f4e25362ef941d73a3861f58348dcfbf9
Gerrit-Change-Number: 13166
Gerrit-PatchSet: 3
Gerrit-Owner: Martin Tomec <tomec.martin at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-Comment-Date: Fri, 15 Nov 2019 14:02:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Sean Bright <sean.bright at gmail.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20191115/21fcc229/attachment-0001.html>


More information about the asterisk-code-review mailing list