Changeset 0005b63 in mainline for uspace/lib/http/response.c


Ignore:
Timestamp:
2013-09-21T11:22:07Z (12 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c17469e
Parents:
ff364f1
Message:

libhttp: make header api a little bit more flexible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/http/response.c

    rff364f1 r0005b63  
    122122                        break;
    123123               
    124                 char *name = NULL;
    125                 char *value = NULL;
    126                 rc = http_parse_header(line, &name, &value);
    127                 if (rc != EOK)
    128                         goto error;
    129                
    130                 http_header_t *header = http_header_create_no_copy(name, value);
     124                http_header_t *header = malloc(sizeof(http_header_t));
    131125                if (header == NULL) {
    132                         free(name);
    133                         free(value);
    134126                        rc = ENOMEM;
    135127                        goto error;
    136128                }
     129                http_header_init(header);
     130               
     131                rc = http_header_parse(line, header);
     132                if (rc != EOK)
     133                        goto error;
    137134               
    138135                list_append(&header->link, &resp->headers);
Note: See TracChangeset for help on using the changeset viewer.