summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tests: Avoid race condition in threaded tests0.7.93Christophe Fergeau2015-03-172-4/+4
| | | | | | | | | | Calling soup_server_run in a new thread, and calling soup_server_get_port() on the same SoupServer instance right after creating the thread. With recent libsoup, this sometimes causes a crash when the 2 threads try to call soup_server_ensure_listening() at the same time. Moving the call to soup_server_get_port() before the thread creation avoids this race condition.
* Switch Flickr examples to https://Florian Weimer2015-03-172-2/+2
| | | | http:// does not work anymore.
* tests: GError pointers must be initializedAlexandre Rostovtsev2015-03-162-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=745694
* Don't dump XML parsing errors to stderr/stdout by defaultChristophe Fergeau2015-03-161-0/+10
| | | | These errors should only be shown if REST_DEBUG=xml-parser is set.
* xml-parser: Add missing break in switch statementRob Bradford2014-09-191-0/+1
| | | | | This would result in an inappropriate debug message appearing on valid text data.
* oauth: Add missing includeChristophe Fergeau2014-09-031-0/+1
| | | | This fixes a compilation warning about a missing prototype.
* Post-release version bump to 0.7.93Christophe Fergeau2014-09-031-1/+1
|
* build-sys: Generate xz tarballs0.7.92Christophe Fergeau2014-09-031-1/+1
|
* oauth: Don't leak RestProxyCall::token{_secret}Christophe Fergeau2014-09-031-0/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=735922
* tests/proxy: Make sure GError is unset when call succeedsChristophe Fergeau2014-09-031-0/+5
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=735921
* tests/proxy: Fix memory leaksChristophe Fergeau2014-09-031-2/+17
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=735921
* tests/lastfm: Fix memory leakChristophe Fergeau2014-09-031-0/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=735921
* tests/oauth: Use oauthbin.com as the test serverChristophe Fergeau2014-09-032-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
* tests: Remove more unused variables/codeChristophe Fergeau2014-09-033-9/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=735921
* tests: Remove unused 'session' variableChristophe Fergeau2014-09-034-12/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=735921
* tests: Don't call soup_message_headers_get with newer libsoupChristophe Fergeau2014-09-031-0/+5
| | | | | | This is deprecated and causes compile-time warnings https://bugzilla.gnome.org/show_bug.cgi?id=735921
* tests: Don't call g_type_init() on newer glibChristophe Fergeau2014-09-0321-0/+42
| | | | | | This is deprecated and causes a compile warning https://bugzilla.gnome.org/show_bug.cgi?id=735921
* Fix URL used for flickr rest callsChristophe Fergeau2014-09-032-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
* Move RestProxyCallPrivate to rest-proxy-call.cChristophe Fergeau2014-09-033-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
* lastfm: Remove direct access to RestProxyCallPrivateChristophe Fergeau2014-09-031-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
* flickr: Remove direct access to RestProxyCallPrivateChristophe Fergeau2014-09-031-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
* oauth: Remove direct access to RestProxyCallPrivateChristophe Fergeau2014-09-031-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
* oauth: Make sure RestProxyCall::url is set before using itChristophe Fergeau2014-09-033-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
* lastfm: Fix function setting regressionChristophe Fergeau2014-09-021-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
* flickr: Fix function setting regressionChristophe Fergeau2014-09-022-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
* More improvements to rest_proxy_call_get_params API docChristophe Fergeau2014-09-021-2/+2
|
* Add libsoup to gir includesChristophe Fergeau2014-09-021-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
* Add rest_proxy_add_soup_feature()Christophe Fergeau2014-08-253-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
* Allow to modify REST function in serialize_params vfuncChristophe Fergeau2014-08-252-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
* Add rest_proxy_call_get_function()Christophe Fergeau2014-08-253-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
* Fix rest_xml_node_print name in gtk-doc annotationChristophe Fergeau2014-08-251-1/+1
|
* Ignore '/' at beginning of REST functionChristophe Fergeau2014-08-251-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
* Use g_hash_table_replace() in rest_params_add()Christophe Fergeau2014-08-251-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
* RestProxyCall: Handle soup_error_new() failuresChristophe Fergeau2014-08-251-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
* doap: add <programming-language>Andre Klapper2014-08-011-0/+1
|
* doap category coreOlav Vitters2014-07-301-0/+1
|
* Post-release version bump to 0.7.92Emmanuele Bassi2014-03-101-1/+1
|
* Release librest 0.7.910.7.91Emmanuele Bassi2014-03-101-1/+1
|
* tests/oauth: Bail out if we cannot connectEmmanuele Bassi2014-03-102-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.
* docs: Add annotations to RestProxyAuth pausing methodsEmmanuele Bassi2014-03-101-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
* docs: Add missing gtk-doc annotationsEmmanuele Bassi2014-03-103-3/+42
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=712747
* Add indices and annotation glossaryEmmanuele Bassi2014-03-101-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
* Rename rest-docs from SGML to XMLEmmanuele Bassi2014-03-102-1/+1
| | | | | | It's an XML file, let's use the right extension. https://bugzilla.gnome.org/show_bug.cgi?id=712747
* Further annotation fixesEmmanuele Bassi2014-03-102-8/+8
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=712747
* Update the ignore fileEmmanuele Bassi2014-03-101-0/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=712747
* Turn on introspection scanner warningsEmmanuele Bassi2014-03-102-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
* Fix annotationsEmmanuele Bassi2014-03-103-8/+9
| | | | | | Syntax matters. https://bugzilla.gnome.org/show_bug.cgi?id=712747
* Fix the expansion of the REST_TYPE_PARAM macroEmmanuele Bassi2014-03-101-1/+1
| | | | | | And this, kids, is why patches ought to be reviewed. https://bugzilla.gnome.org/show_bug.cgi?id=712747
* build: Replace INCLUDES with AM_CPPFLAGSEmmanuele Bassi2014-03-101-1/+1
| | | | | | INCLUDES is deprecated and should not be used in modern autotools. https://bugzilla.gnome.org/show_bug.cgi?id=712747
* Attach SoupLogger after SoupCookieJarChristophe Fergeau2013-11-141-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