pike.git / src / modules / _Roxen / roxen.c

version» Context lines:

pike.git/src/modules/_Roxen/roxen.c:68:    if( THP->headers )    free( THP->headers );    THP->headers = NULL;    THP->pnt = NULL;    THP->hsize = 0;   }      static void f_hp_feed( INT32 args )   /*! @decl array(string|mapping) feed(string data, void|int(0..1) keep_case)    *! +  *! Feeds data into the parser. Once enough data has been fed the +  *! result array is returned. Feeding data after that destroys the +  *! state of the parser. For typical use, once the result array is +  *! returned, extract the trailing data, check it against expected +  *! payload (e.g. as defined by the Content-Length header or chunked +  *! transfer encoding), and add incoming data to that until enough is +  *! recieved. In the connection is pipe-lining, send excess data to a +  *! new header parser object. Note that the trailing data from the +  *! first parse object could contain the start of the next response. +  *!    *! @param data    *! Fragment of data to parse.    *!    *! @param keep_case    *! By default headers are @[lower_case()]'d in the resulting @tt{Headers@}    *! mapping. If this parameter is @expr{1@} the header names are kept as is.    *!    *! @returns    *! @array    *! @elem string 0