chesterpolo / mongoose

Automatically exported from code.google.com/p/mongoose
MIT License
0 stars 0 forks source link

embedded_auth not cleared #152

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
embedded_auth is not cleared when reuse the thread, so we have to clear it 
before callback.

static bool_t

check_embedded_authorization(struct mg_connection *conn)

{

    const struct callback   *cb;

    bool_t          authorized;

    /* mongoose not reset it when reuse thread, so clear it here */

    conn->embedded_auth=FALSE;

    authorized = TRUE;

    cb = find_callback(conn->ctx, TRUE, conn->request_info.uri, -1);

    if (cb != NULL) {

        cb->func(conn, &conn->request_info, cb->user_data);

        authorized = conn->embedded_auth;

    }

    return (authorized);

}

Original issue reported on code.google.com by dgod....@gmail.com on 12 Jun 2010 at 10:10

GoogleCodeExporter commented 9 years ago
This is obsolete.
Authorization must be handled by different mechanism, see mongoose.h and 
examples/chat.c for the example.

Original comment by valenok on 23 Aug 2010 at 8:50

GoogleCodeExporter commented 9 years ago
This is obsolete.
Authorization must be handled by different mechanism, see mongoose.h and 
examples/chat.c for the example.

Original comment by valenok on 23 Aug 2010 at 8:50