User agent patch

View: New views
3 Messages — Rating Filter:   Alert me  

User agent patch

by Moritz Mertinkat-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi everybody,

I've made a small patch (against SVN trunk rev 35949) to add a
meaningful user agent to HTTP requests used for loading remote images
from HTML mails. That way it would be possible to get better mail client
usage statistics for future Evolution versions.

Currently Evolution only sends "User-Agent: CamelHttpStream/1.0" which
is the default from the Camel.Stream class.

With the patch it is: "User-Agent: CamelHttpStream/1.0 Evolution/xxxx"
(where xxxx is the Evolution version). I've kept "CamelHttpStream/1.0"
string for backward compatibility.

The patch is attached (evolution-useragent.patch).

Regards,
Moritz Mertinkat

Index: ChangeLog
===================================================================
--- ChangeLog (revision 35949)
+++ ChangeLog (working copy)
@@ -1,3 +1,9 @@
+2008-08-10  Moritz Mertinkat  <moritz@...>
+
+ * em-format-html.c: Added meaningful user agent for HTTP requests
+ used to load remote images. The original part (CamelHttpStream/1.0)
+ has been kept for backward compatibility.
+
 2008-08-07  Paul Bolle  <pebolle@...>
 
  ** Fix for bug #546788
Index: em-format-html.c
===================================================================
--- em-format-html.c (revision 35949)
+++ em-format-html.c (working copy)
@@ -497,6 +497,7 @@
  }
 
  instream = camel_http_stream_new(CAMEL_HTTP_METHOD_GET, ((EMFormat *)job->format)->session, url);
+ camel_http_stream_set_user_agent((CamelHttpStream *)instream, "CamelHttpStream/1.0 Evolution/" VERSION);
  proxy = em_utils_get_proxy_uri();
  camel_http_stream_set_proxy((CamelHttpStream *)instream, proxy);
  g_free(proxy);

_______________________________________________
Evolution-patches mailing list
Evolution-patches@...
http://mail.gnome.org/mailman/listinfo/evolution-patches

Re: User agent patch

by Srinivasa Ragavan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Looks fine to commit. Preferably, post your further patches, with a bug
on bugzilla. So that, its easier to track and nothing misses out.

-Srini.
On Sun, 2008-08-10 at 21:26 +0200, Moritz Mertinkat wrote:

> Hi everybody,
>
> I've made a small patch (against SVN trunk rev 35949) to add a
> meaningful user agent to HTTP requests used for loading remote images
> from HTML mails. That way it would be possible to get better mail client
> usage statistics for future Evolution versions.
>
> Currently Evolution only sends "User-Agent: CamelHttpStream/1.0" which
> is the default from the Camel.Stream class.
>
> With the patch it is: "User-Agent: CamelHttpStream/1.0 Evolution/xxxx"
> (where xxxx is the Evolution version). I've kept "CamelHttpStream/1.0"
> string for backward compatibility.
>
> The patch is attached (evolution-useragent.patch).
>
> Regards,
> Moritz Mertinkat
> plain text document attachment (evolution-useragent.patch)
> Index: ChangeLog
> ===================================================================
> --- ChangeLog (revision 35949)
> +++ ChangeLog (working copy)
> @@ -1,3 +1,9 @@
> +2008-08-10  Moritz Mertinkat  <moritz@...>
> +
> + * em-format-html.c: Added meaningful user agent for HTTP requests
> + used to load remote images. The original part (CamelHttpStream/1.0)
> + has been kept for backward compatibility.
> +
>  2008-08-07  Paul Bolle  <pebolle@...>
>  
>   ** Fix for bug #546788
> Index: em-format-html.c
> ===================================================================
> --- em-format-html.c (revision 35949)
> +++ em-format-html.c (working copy)
> @@ -497,6 +497,7 @@
>   }
>  
>   instream = camel_http_stream_new(CAMEL_HTTP_METHOD_GET, ((EMFormat *)job->format)->session, url);
> + camel_http_stream_set_user_agent((CamelHttpStream *)instream, "CamelHttpStream/1.0 Evolution/" VERSION);
>   proxy = em_utils_get_proxy_uri();
>   camel_http_stream_set_proxy((CamelHttpStream *)instream, proxy);
>   g_free(proxy);
> _______________________________________________
> Evolution-patches mailing list
> Evolution-patches@...
> http://mail.gnome.org/mailman/listinfo/evolution-patches

_______________________________________________
Evolution-patches mailing list
Evolution-patches@...
http://mail.gnome.org/mailman/listinfo/evolution-patches

Re: User agent patch

by Suman Manjunath-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Aug 13, 2008 at 9:30 AM, Srinivasa Ragavan <sragavan@...> wrote:
> Looks fine to commit.

Patch committed to SVN trunk as r35974
http://svn.gnome.org/viewvc/evolution?view=revision&revision=35974
_______________________________________________
Evolution-patches mailing list
Evolution-patches@...
http://mail.gnome.org/mailman/listinfo/evolution-patches