### Method

# GUPnP Context rewrite_uri

since: 1.2.0

#### Declaration [src]

    char*
    gupnp_context_rewrite_uri (
      GUPnPContext* context,
      const char* uri
    )

#### Description [src]

Utility function to re-write an uri to the IPv6 link-local form which has the zone index appended to the IP address.

Available since: 1.2.0

#### Parameters

`uri`

  Type: `const char*`

  An uri to rewrite if necessary.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

#### Return value

Type: `char*`

A re-written version of the `uri` if the context is on a link-local IPv6 address, a copy of the `uri` otherwise or `NULL` if `uri` was invalid.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.