* HTTP/1 native parser as part of the RESTCONF client
* Fixed memory error in opendir/readdir in clicon_file_dirent * Remove MAXPATH in parsers * New string-del function
This commit is contained in:
parent
0ed34b4fab
commit
dadf4a778a
53 changed files with 1061 additions and 1273 deletions
|
|
@ -50,12 +50,6 @@
|
|||
#include "clixon_config.h" /* generated by config & autoconf */
|
||||
#endif
|
||||
|
||||
/* The clixon evhtp code can be compiled with or without threading support
|
||||
* The choice is set at libevhtp compile time by cmake. Eg:
|
||||
* cmake -DEVHTP_DISABLE_EVTHR=ON # Disable threads.
|
||||
* Default in testing is disabled threads.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
|
@ -80,14 +74,6 @@
|
|||
/* clicon */
|
||||
#include <clixon/clixon.h>
|
||||
|
||||
#ifdef HAVE_LIBEVHTP /* To get restconf_native.h include files right */
|
||||
/* evhtp */
|
||||
#include <event2/buffer.h> /* evbuffer */
|
||||
#define EVHTP_DISABLE_REGEX
|
||||
#define EVHTP_DISABLE_EVTHR
|
||||
#include <evhtp/evhtp.h>
|
||||
#endif /* HAVE_LIBEVHTP */
|
||||
|
||||
#ifdef HAVE_LIBNGHTTP2
|
||||
#include <nghttp2/nghttp2.h>
|
||||
#endif
|
||||
|
|
@ -279,12 +265,11 @@ recv_callback(nghttp2_session *session,
|
|||
|
||||
/*! Callback for each incoming http request for path /
|
||||
*
|
||||
* This are all messages except /.well-known, Registered with evhtp_set_cb
|
||||
* This are all messages except /.well-known,
|
||||
*
|
||||
* @param[in] req evhtp http request structure defining the incoming message
|
||||
* @param[in] arg cx_evhtp handle clixon specific fields
|
||||
* @param[in] sd session stream struct (http/1 has a single)
|
||||
* @retval void
|
||||
* Discussion: problematic if fatal error -1 is returneod from clixon routines
|
||||
* Discussion: problematic if fatal error -1 is returned from clixon routines
|
||||
* without actually terminating. Consider:
|
||||
* 1) sending some error? and/or
|
||||
* 2) terminating the process?
|
||||
|
|
@ -338,10 +323,6 @@ restconf_nghttp2_path(restconf_stream_data *sd)
|
|||
retval = 0;
|
||||
done:
|
||||
clicon_debug(1, "%s %d", __FUNCTION__, retval);
|
||||
/* Catch all on fatal error. This does not terminate the process but closes request stream */
|
||||
// if (retval < 0){
|
||||
// evhtp_send_reply(req, EVHTP_RES_ERROR);
|
||||
// }
|
||||
if (cvv)
|
||||
cvec_free(cvv);
|
||||
if (oneline)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue