| iMatix home page
| << | < | > | >>
SFL Logo SFL
Version 2.11

 

http_query2symb

#include "sflhttp.h"
SYMTAB *
http_query2symb (
    const char *query)

Synopsis

Parses a HTTP query string, and populates a symbol table with the resulting field values. The query string is assumed to be escaped, so http unescape() is always applied to the query string. Within the query string, field=value pairs are delimited by & or ;. Returns a SYMTAB pointer to the new table. If there was not enough memory to allocate the table, returns NULL.

Source Code - (sflhttp.c)

{
    char
        **strings;                      /*  Formatted string array           */
    SYMTAB
        *symtab;                        /*  Returned symbol table            */

    strings = http query2strt (query);
    if (strings)
      {
        symtab = strt2symb (strings);
        strtfree (strings);
        return (symtab);
      }
    else
        return (NULL);                  /*  Couldn't create string table     */
}

| << | < | > | >> iMatix Copyright © 1996-2000 iMatix Corporation