A URI (and IRI) parser with a straightforward API, based upon uriparser
Clone or download
Pull request Compare This branch is 107 commits ahead, 1 commit behind nevali:archived.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
debian Update headers installed by the -dev package Sep 19, 2017
docs @ 3afb3e6 Tidy up build logic. Sep 12, 2017
m4 @ 7e76662 Update M4 macros to latest versions Nov 15, 2017
man Tidy up build logic. Sep 12, 2017
scripts Tidy up build logic. Sep 12, 2017
t Remove and ignore generated output Nov 15, 2017
uriparser @ 52bdc2e Update uriparser to latest version Jun 18, 2015
util Tidy up build logic. Sep 12, 2017
.autom4te.cfg Tidy up build logic. Sep 12, 2017
.gitignore Tidy up build logic. Sep 12, 2017
.gitmodules Tidy up build logic. Sep 12, 2017
.travis.yml Add Slack notifications to Travis config Sep 18, 2017
LICENSE-2.0 Initial commit. Dec 4, 2012
Makefile.am Fix the fact that compiler flags weren't being properly honoured Nov 15, 2017
README.md README: Add note about `debian` directory May 1, 2017
TODO Clean up util/uriparse. Dec 6, 2012
URI.h Refactor (most) property accessors and add setters (#4, #5) Sep 20, 2017
acinclude.m4 Tidy up build logic. Sep 12, 2017
auth.c Tidy up uninitialised locals when uri_set_xxx(uri, NULL) is invoked Nov 15, 2017
configure.ac Tidy up build logic. Sep 12, 2017
fragment.c Tidy up uninitialised locals when uri_set_xxx(uri, NULL) is invoked Nov 15, 2017
fspath.c Tidy up build logic. Sep 12, 2017
host.c Tidy up uninitialised locals when uri_set_xxx(uri, NULL) is invoked Nov 15, 2017
info.c Tidy up uninitialised locals when uri_set_xxx(uri, NULL) is invoked Nov 15, 2017
liburi-uninstalled.pc.in Install a proper liburi.pc Jun 30, 2014
liburi.h Tidy up build logic. Sep 12, 2017
liburi.pc.in Tidy up build logic. Sep 12, 2017
p_liburi.h Tidy up inner uriparser interaction in preparation for mutable proper… Sep 18, 2017
parse.c Tidy up uninitialised locals when uri_set_xxx(uri, NULL) is invoked Nov 15, 2017
path.c Refactor (most) property accessors and add setters (#4, #5) Sep 20, 2017
port.c Refactor (most) property accessors and add setters (#4, #5) Sep 20, 2017
query.c Tidy up uninitialised locals when uri_set_xxx(uri, NULL) is invoked Nov 15, 2017
rebase.c Tidy up uninitialised locals when uri_set_xxx(uri, NULL) is invoked Nov 15, 2017
recompose.c Resolve issue where uri_create_uri() returns an malformed URI when pa… Feb 9, 2015
scheme.c Fix uninitialised local Nov 15, 2017
unicode.c Add uri_create_wstr() Oct 17, 2017
uri.c Refactor (most) property accessors and add setters (#4, #5) Sep 20, 2017

README.md

liburi

A library for parsing URIs and IRIs.

Current build status Apache 2.0 licensed Implemented in C Follow @RES_Project

liburi is a library with simple interface for parsing URIs. Under the hood, the actual URI parsing is handled by a bundled version of uriparser—liburi aims to provide an API which is easier to work with than uriparser's own.

This software was developed as part of the Research & Education Space project and is actively maintained by a development team within BBC Design and Engineering. We hope you’ll find this project useful!

Table of Contents

Requirements

There are no special build requirements; a working C compiler and build environment will be sufficient.

liburi has not yet been ported to non-Unix-like environments, and will install as a shared library on macOS rather than a framework, but it ought to build inside Cygwin on Windows.

Contributions for building properly as a DLL with Visual Studio or a framework with Xcode and so on are welcome.

See also the additional requirements when building from source.

Using liburi

The public interface to liburi is in liburi.h. You should link your program with -luri. Both the header and library will be installed in /usr/local unless a different prefix is specified when building, and so you may need to provide a corresponding -I flag to your compiler and -L flag to your linker.

Parse URIs with uri_create_str(); destroy them with uri_destroy(); obtain information about them with uri_info(); and reconstitute them into strings with uri_str().

A more complete and detailed function reference is provided in DocBook 5 format, along with generated Unix (nroff) manual page and HTML versions.

Bugs and feature requests

If you’ve found a bug, or have thought of a feature that you would like to see added, you can file a new issue. A member of the development team will triage it and add it to our internal prioritised backlog for development—but in the meantime we welcome contributions and encourage forking.

Building from source

You will need git, automake, autoconf and libtool. You'll also need a DocBook 5 and DocBook-XSL toolchain (i.e., xsltproc and the stylesheets) if you wish to rebuild the documentation. Both liburi and uriparser have minimal external dependencies.

$ git clone git://github.com/bbcarchdev/liburi.git
$ cd liburi
$ git submodule update --init --recursive
$ autoreconf -i
$ ./configure --prefix=/some/path
$ make
$ make check
$ sudo make install

Automated builds

We have configured Travis to automatically build and invoke the tests on liburi for new commits on each branch. See .travis.yml for the details.

You may wish to do similar for your own forks, if you intend to maintain them.

The debian directory contains the logic required to build a Debian package for liburi, except for the changelog. This is used by the system that auto-deploys packages for the production Research & Education Space, and so if you need a modified version to suit your own deployment needs, it’s probably easiest to maintain a fork of this repository with your changes in.

Contributing

If you’d like to contribute to liburi, fork this repository and commit your changes to the develop branch.

For larger changes, you should create a feature branch with a meaningful name, for example one derived from the issue number.

Once you are satisfied with your contribution, open a pull request and describe the changes you’ve made and a member of the development team will take a look.

Information for BBC Staff

This is an open source project which is actively maintained and developed by a team within Design and Engineering. Please bear in mind the following:—

  • Bugs and feature requests must be filed in GitHub Issues: this is the authoratitive list of backlog tasks.
  • Issues with the label triaged have been prioritised and added to the team’s internal backlog for development. Feel free to comment on the GitHub Issue in either case!
  • You should never add nor remove the triaged label to yours or anybody else’s Github Issues.
  • Forking is encouraged! See the “Contributing” section.
  • Under no circumstances may you commit directly to this repository, even if you have push permission in GitHub.
  • If you’re joining the development team, contact “Archive Development Operations” in the GAL to request access to GitLab (although your line manager should have done this for you in advance).

Finally, thanks for taking a look at this project! We hope it’ll be useful, do get in touch with us if we can help with anything (“RES-BBC” in the GAL, and we have staff in BC and PQ).

License

uriparser is licensed under the New BSD license.

liburi is licensed under the terms of the Apache License, Version 2.0

  • Copyright © 2012 Mo McRoberts
  • Copyright © 2014-2017 BBC