On Thu, Feb 13, 2014 at 9:17 PM, Stefan Ritt <[email protected]>wrote:
> Hi,
>
> I need to implement the functionality from the (obsolete)
> mg_add_uri_handler, so some URIs I want to process myself, while others I
> want to pass to the file server. I thought that something like this should
> work:
>
> static int handler(struct mg_connection *conn)
> {
> if (conn->uri == "/test") {
> mg_printf_data(conn, "URI: %s", conn->uri);
>
This is wrong. The condition will never be true. Please use
!strcmp(conn->uri, "/test")
>
> return MG_REQUEST_PROCESSED;
> }
>
> return MG_REQUEST_NOT_PROCESSED;
> }
>
I've just verified that, and mongoose works as expected,
continuing serving request. Could you elaborate a bit more please,
maybe show the code that configures mongoose?
Sergey.
--
You received this message because you are subscribed to the Google Groups
"mongoose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mongoose-users.
For more options, visit https://groups.google.com/groups/opt_out.