Re: [patch] add UUID to HTTP headers

Alexander Malysh <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hi Vladimir,

thanks for the patch! But  first thing would be to know, why it’s needed? For messages tracking purposes you can always
use dlr-url with your params/id.

Second thing: List *local_… is not a C-style and duplication of headers costs performance...

Alex

> Am 04.06.2015 um 10:36 schrieb Vladimir Laskov <[email protected]>:
> 
> 
> 
> Hello, guys
> 
> please see and confirm patch
> patch description: add UUID HTTP herader like here
> 
> ==========================================
> Server: Kannel/1.4.4
> Date: Thu, 04 Jun 2015 08:15:28 GMT
> Content-Length: 24
> Content-type: text/html
> Pragma: no-cache
> Cache-Control: no-cache
> X-Kannel-UUID: 4d069003-e43f-426e-8a95-ba21cb71dca5
> ==========================================
> 
> 
> 
> diff --git a/gw/smsbox.c b/gw/smsbox.c
> index b62e62e..2e0faf4 100644
> --- a/gw/smsbox.c
> +++ b/gw/smsbox.c
> @@ -213,8 +213,12 @@ static void delayed_http_reply(Msg *msg)
>          break;
>      }
>  
> -    http_send_reply(client, status, sendsms_reply_hdrs, answer);
> +    List *local_sendsms_reply_hdrs = http_header_duplicate(sendsms_reply_hdrs);
> +    http_header_add(local_sendsms_reply_hdrs, "X-Kannel-UUID", octstr_get_cstr(os));
> +
> +    http_send_reply(client, status, local_sendsms_reply_hdrs, answer);
>  
> +    http_destroy_headers(local_sendsms_reply_hdrs);
>      octstr_destroy(answer);
>      octstr_destroy(os);
>  }
> 
> 
> 
> THX
> --
> Vladimir Laskov
> [email protected] <mailto:[email protected]>
> +79266285176
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.