summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-09-03oauth: Add missing includeHEADmasterChristophe Fergeau1-0/+1
This fixes a compilation warning about a missing prototype.
2014-09-03Post-release version bump to 0.7.93Christophe Fergeau1-1/+1
2014-09-03build-sys: Generate xz tarballs0.7.92Christophe Fergeau1-1/+1
2014-09-03oauth: Don't leak RestProxyCall::token{_secret}Christophe Fergeau1-0/+2
https://bugzilla.gnome.org/show_bug.cgi?id=735922
2014-09-03tests/proxy: Make sure GError is unset when call succeedsChristophe Fergeau1-0/+5
https://bugzilla.gnome.org/show_bug.cgi?id=735921
2014-09-03tests/proxy: Fix memory leaksChristophe Fergeau1-2/+17
https://bugzilla.gnome.org/show_bug.cgi?id=735921
2014-09-03tests/lastfm: Fix memory leakChristophe Fergeau1-0/+1
https://bugzilla.gnome.org/show_bug.cgi?id=735921
2014-09-03tests/oauth: Use oauthbin.com as the test serverChristophe Fergeau2-12/+12
The tests used to use term.ie which is gone. There are still some intermittent failures when running the tests, sometimes the test is successful, sometimes it's not :( https://bugzilla.gnome.org/show_bug.cgi?id=735921
2014-09-03tests: Remove more unused variables/codeChristophe Fergeau3-9/+0
https://bugzilla.gnome.org/show_bug.cgi?id=735921
2014-09-03tests: Remove unused 'session' variableChristophe Fergeau4-12/+0
https://bugzilla.gnome.org/show_bug.cgi?id=735921
2014-09-03tests: Don't call soup_message_headers_get with newer libsoupChristophe Fergeau1-0/+5
This is deprecated and causes compile-time warnings https://bugzilla.gnome.org/show_bug.cgi?id=735921
2014-09-03tests: Don't call g_type_init() on newer glibChristophe Fergeau21-0/+42
This is deprecated and causes a compile warning https://bugzilla.gnome.org/show_bug.cgi?id=735921
2014-09-03Fix URL used for flickr rest callsChristophe Fergeau2-3/+3
https must be used, and the correct URL for uploads is up.flickr.com https://bugzilla.gnome.org/show_bug.cgi?id=735920
2014-09-03Move RestProxyCallPrivate to rest-proxy-call.cChristophe Fergeau3-32/+32
It was in a separate rest-proxy-call.h header which allowed derived classes to access RestProxyCall private data without any control. Better to go through explicit methods to do that. https://bugzilla.gnome.org/show_bug.cgi?id=735919
2014-09-03lastfm: Remove direct access to RestProxyCallPrivateChristophe Fergeau1-6/+2
Now that LastFMProxyCall no longer directly modifies RestProxyCall::url, it's trivial to remove all accesses to RestProxyCallPrivate. https://bugzilla.gnome.org/show_bug.cgi?id=735919
2014-09-03flickr: Remove direct access to RestProxyCallPrivateChristophe Fergeau1-5/+1
Now that FlickrProxyCall no longer directly modifies RestProxyCall::url, it's trivial to remove all accesses to RestProxyCallPrivate. https://bugzilla.gnome.org/show_bug.cgi?id=735919
2014-09-03oauth: Remove direct access to RestProxyCallPrivateChristophe Fergeau1-6/+6
OAuthProxyCall was directly accessing private RestProxyCall data. The same functionality can be achieved using only librest public API, so let's use that instead. https://bugzilla.gnome.org/show_bug.cgi?id=735919
2014-09-03oauth: Make sure RestProxyCall::url is set before using itChristophe Fergeau3-2/+17
The oauth "prepare" step needs RestProxyCall::url to be set, but since commit c66b6d this is only set after the "prepare" and "serialize_headers" methods have been called. As it's better if OAuthProxyCall do not directly access RestProxyCall private data, this commit adds a getter to RestProxyCall which will be used to make sure RestProxyCall::url is set when OAuthProxyCall::prepare needs it. https://bugzilla.gnome.org/show_bug.cgi?id=708359
2014-09-02lastfm: Fix function setting regressionChristophe Fergeau1-2/+3
Since commit c66b6d, RestProxyCall::url is regenerated after calling the RestProxyCall::prepare virtual method. This breaks the lastfm code as it needs to reset RestProxyCall::url in order to remove the function from it. It used to do that by directly accessing RestProxyCall private data. Since c66b6d, this can be solved using only public methods as if the function is reset on the RestProxyCall in ::prepare, ::url will be regenerated to reflect that after ::prepare and ::serialize_params have been called. https://bugzilla.gnome.org/show_bug.cgi?id=708359
2014-09-02flickr: Fix function setting regressionChristophe Fergeau2-6/+10
Since commit c66b6d, RestProxyCall::url is regenerated after calling the RestProxyCall::prepare virtual method. This breaks the flickr code as it needs to reset RestProxyCall::url in order to remove the function from it. It used to do that by directly accessing RestProxyCall private data. Since c66b6d, this can be solved using only public methods as if the function is reset on the RestProxyCall in ::prepare, ::url will be regenerated to reflect that after ::prepare and ::serialize_params have been called. https://bugzilla.gnome.org/show_bug.cgi?id=708359
2014-09-02More improvements to rest_proxy_call_get_params API docChristophe Fergeau1-2/+2
2014-09-02Add libsoup to gir includesChristophe Fergeau1-1/+1
Since the public API now references a type from libsoup, we need to add Soup-2.4.gir to Rest_@API_VERSION_AM@_gir_INCLUDES. https://bugzilla.gnome.org/show_bug.cgi?id=728340
2014-08-25Add rest_proxy_add_soup_feature()Christophe Fergeau3-0/+41
This function can be helpful if one wants more control over libsoup features than what librest simple API provide. For example, to get full access to libsoup cookie API (say to be able to add arbitrary cookies to the soup session), one can do: RestProxy *proxy = g_object_new(REST_TYPE_PROXY, "url-format", url, "disable-cookies", TRUE, NULL); SoupSessionFeature *cookie_jar = SOUP_SESSION_FEATURE(soup_cookie_jar_new ()); rest_proxy_add_soup_feature(proxy, cookie_jar); It's then possible to use all the soup_cookie_* methods to deal with cookies. https://bugzilla.gnome.org/show_bug.cgi?id=728340
2014-08-25Allow to modify REST function in serialize_params vfuncChristophe Fergeau2-14/+49
RestProxyCall::prepare_message() calls the serialize_params vfunc so that child classes can serialize the call parameters in whichever way they want. One way of doing that could be to append the parameters to the URI that is called (http://example.com?param1=value1;param2=value2). However, the URI to call is determined at the beginning of prepare_message(), and is not refreshed after calling RestProxyCall::serialize_params(), so it's not possible to append parameters to the URI that is going to be called. This commit rebuilds the URI to call after calling serialize_params() in case it has changed. https://bugzilla.gnome.org/show_bug.cgi?id=708359
2014-08-25Add rest_proxy_call_get_function()Christophe Fergeau3-0/+26
There are rest_proxy_call_[gs]et_method() methods, a rest_proxy_call_set_function() method, but no corresponding getter. Adding it makes the API more consistent. https://bugzilla.gnome.org/show_bug.cgi?id=708358
2014-08-25Fix rest_xml_node_print name in gtk-doc annotationChristophe Fergeau1-1/+1
2014-08-25Ignore '/' at beginning of REST functionChristophe Fergeau1-1/+2
When building the HTTP URL to access for a REST operation, RestProxyCall::prepare_message, a '/' at the end of the base URL is ignored, but a '/' at the beginning of the REST function is not. When interacting with the oVirt REST API, I often end up building calls with for example 'https://ovirt.example.com' as the base URI, and '/api/vms/' as the function, which then leads to an URI with 2 '/': 'https://ovirt.example.com//api/vms' https://bugzilla.gnome.org/show_bug.cgi?id=728952
2014-08-25Use g_hash_table_replace() in rest_params_add()Christophe Fergeau1-1/+1
rest_params_add() is currently using g_hash_table_insert() to add the passed in parameter in the parameter hash table. The key which is used is owned by the associated value. When using rest_params_add to replace an already existing parameter, the existing value will be freed with rest_param_unref(). However, g_hash_table_insert() does not replace the key when it already exists in the hash table: "If the key already exists in the GHashTable its current value is replaced with the new value... If you supplied a key_destroy_func when creating the GHashTable, the passed key is freed using that function." This means that after replacing an already existing parameter, the corresponding key will still be the old one, which is now pointing at freed memory as the old value was freed. g_hash_table_replace() ensures that the key will still be valid, even when replacing existing parameters: "Inserts a new key and value into a GHashTable similar to g_hash_table_insert(). The difference is that if the key already exists in the GHashTable, it gets replaced by the new key." https://bugzilla.gnome.org/show_bug.cgi?id=665716
2014-08-25RestProxyCall: Handle soup_error_new() failuresChristophe Fergeau1-0/+9
If given a URI it can't parse, soup_error_new() will return NULL. https://bugzilla.gnome.org/show_bug.cgi?id=728953
2014-08-01doap: add <programming-language>Andre Klapper1-0/+1
2014-07-30doap category coreOlav Vitters1-0/+1
2014-03-10Post-release version bump to 0.7.92Emmanuele Bassi1-1/+1
2014-03-10Release librest 0.7.910.7.91Emmanuele Bassi1-1/+1
2014-03-10tests/oauth: Bail out if we cannot connectEmmanuele Bassi2-0/+9
It seems that http://term.ie/oauth/example/ is either down for the count, or down for good. In the meantime, let's try to be resilient against service outage at least during distcheck.
2014-03-10docs: Add annotations to RestProxyAuth pausing methodsEmmanuele Bassi1-0/+15
Both pause() and unpause() are referenced elsewhere in the API reference, but have no formal documentation annotations. https://bugzilla.gnome.org/show_bug.cgi?id=712747
2014-03-10docs: Add missing gtk-doc annotationsEmmanuele Bassi3-3/+42
https://bugzilla.gnome.org/show_bug.cgi?id=712747
2014-03-10Add indices and annotation glossaryEmmanuele Bassi1-0/+15
The latter, especially, avoids gtk-doc complaining about introspection annotations in the documentation comments. https://bugzilla.gnome.org/show_bug.cgi?id=712747
2014-03-10Rename rest-docs from SGML to XMLEmmanuele Bassi2-1/+1
It's an XML file, let's use the right extension. https://bugzilla.gnome.org/show_bug.cgi?id=712747
2014-03-10Further annotation fixesEmmanuele Bassi2-8/+8
https://bugzilla.gnome.org/show_bug.cgi?id=712747
2014-03-10Update the ignore fileEmmanuele Bassi1-0/+2
https://bugzilla.gnome.org/show_bug.cgi?id=712747
2014-03-10Turn on introspection scanner warningsEmmanuele Bassi2-2/+2
So we have a fighting chance to actually fix them, instead of sweeping them under the rug. https://bugzilla.gnome.org/show_bug.cgi?id=712747
2014-03-10Fix annotationsEmmanuele Bassi3-8/+9
Syntax matters. https://bugzilla.gnome.org/show_bug.cgi?id=712747
2014-03-10Fix the expansion of the REST_TYPE_PARAM macroEmmanuele Bassi1-1/+1
And this, kids, is why patches ought to be reviewed. https://bugzilla.gnome.org/show_bug.cgi?id=712747
2014-03-10build: Replace INCLUDES with AM_CPPFLAGSEmmanuele Bassi1-1/+1
INCLUDES is deprecated and should not be used in modern autotools. https://bugzilla.gnome.org/show_bug.cgi?id=712747
2013-11-14Attach SoupLogger after SoupCookieJarChristophe Fergeau1-10/+10
The SoupLogger instance needs to be attached last (at least after the SoupCookieJar librest uses), otherwise REST_DEBUG=proxy will not dump the cookie headers added by the SoupCookieJar instance. https://bugzilla.gnome.org/show_bug.cgi?id=712231
2013-09-20Fix rest_proxy_call_get_params() API docChristophe Fergeau1-3/+4
The returned type was wrong as well as who owns the returned memory, which could lead to memory corruption.
2013-09-20Add RestProxy::ssl-ca-file propertyyChristophe Fergeau1-1/+27
This property maps to the SoupSession::ssl-ca-file property, and allows to specify a file that contains the CAs to use to verify the certificates we'll get during a TLS session.
2013-09-19Detect /etc/ssl/ca-bundle.pem for openSUSE at configure timeChristophe Fergeau1-1/+2
Based on a patch from Federico Mena Quintero for glib-networking
2013-07-10rest-proxy-call: Include the zero byte added by soup to the payloadRob Bradford1-1/+2
In the previous commit the downloading of binary data was fixed - unfortunately this broke the behaviour of downloading textual data where the clients expect a NUL terminated string for the payload. This change makes sure to include the zero byte that soup adds to support this use case and as a result the test suite passes.
2013-07-09rest-proxy-call: Use memdup, not strdup, as HTTP response data might be binaryJasper St. Pierre1-1/+1
This fixes an issue when a GSoC student was trying to fetch images from gravatar using librest.