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

version» Context lines:

pike.git/src/modules/_Roxen/roxen.c:74:      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 +  *! received. If 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 -  +  *! Returns @expr{0@} (zero) if more data is needed, and otherwise an +  *! array with the following content:    *! @array    *! @elem string 0    *! Trailing data.    *! @elem string 1    *! First line of request.    *! @elem mapping(string:string|array(string)) 2    *! Headers.    *! @endarray    */   {