1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

http: make lws_http_get_uri_and_method public

This commit is contained in:
Andy Green 2019-07-14 12:08:51 -07:00
parent 03f1f30bec
commit a67efe80f1
2 changed files with 26 additions and 3 deletions

View file

@ -606,6 +606,32 @@ lws_add_http_common_headers(struct lws *wsi, unsigned int code,
const char *content_type, lws_filepos_t content_len,
unsigned char **p, unsigned char *end);
/**
* lws_http_get_uri_and_method() - Get information on method and url
*
* \param wsi: the connection to get information on
* \param puri_ptr: points to pointer to set to url
* \param puri_len: points to int to set to uri length
*
* Returns -1 or method index
*
* GET 0
* POST 1
* OPTIONS 2
* PUT 3
* PATCH 4
* DELETE 5
* CONNECT 6
* HEAD 7
* :path 8
*
* If returns method, *puri_ptr is set to the method's URI string and *puri_len
* to its length
*/
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT
lws_http_get_uri_and_method(struct lws *wsi, char **puri_ptr, int *puri_len);
///@}
/*! \defgroup urlendec Urlencode and Urldecode

View file

@ -298,9 +298,6 @@ _lws_header_table_reset(struct allocated_headers *ah);
LWS_EXTERN int
_lws_destroy_ah(struct lws_context_per_thread *pt, struct allocated_headers *ah);
int
lws_http_get_uri_and_method(struct lws *wsi, char **puri_ptr, int *puri_len);
int
lws_http_proxy_start(struct lws *wsi, const struct lws_http_mount *hit,
char *uri_ptr, char ws);