Re: Can I use wildcard pattern matching in Libsoup server?
- From: Jens Georg <mail jensge org>
- To: libsoup-list gnome org
- Subject: Re: Can I use wildcard pattern matching in Libsoup server?
- Date: Tue, 31 Aug 2021 12:30:01 +0200
On Tue, 2021-08-31 at 11:22 +0100, Ashutosh Naik via libsoup-list
wrote:
I am using libsoup to implement a HTTP server. I want to catch all
wildcard patterns of the form -
"/foo/*/bar/"
in the URL but I dont know how to do this right now.
How can I implement this using the Libsoup and GLib libraries?
My current code is using:
soup_server_add_handler (server, "/foo/*/bar/", NULL,
server_callback,
unregister_callback, data);
The above doesnt work if I try to catch the URL "/foo/abc/bar"
Please let me know if this is possible in libsoup and what is the
correct syntax to be passed to soup_server_add_handler()
I think you have to create a generic handler (either for "/" or for
"/foo") and then decide on the path that is passed into the callback
and otherwise 404 or whatever the appropriate status would be
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]