nanohttp-url.c File Reference

#include "nanohttp-logging.h"
#include "nanohttp-error.h"
#include "nanohttp-url.h"

Go to the source code of this file.

Defines

#define HTTP_DEFAULT_PORT   80
#define HTTPS_DEFAULT_PORT   443

Functions

herror_t hurl_parse (struct hurl_t *url, const char *urlstr)
void hurl_free (struct hurl_t *url)


Define Documentation

#define HTTP_DEFAULT_PORT   80
 

Definition at line 56 of file nanohttp-url.c.

Referenced by hurl_parse().

#define HTTPS_DEFAULT_PORT   443
 

Definition at line 57 of file nanohttp-url.c.

Referenced by hurl_parse().


Function Documentation

void hurl_free struct hurl_t url  ) 
 

Frees the resources within a url and the url itself.

Parameters:
url pointer to an hurl_t

Definition at line 211 of file nanohttp-url.c.

References hurl_t::context, and hurl_t::host.

Referenced by httpc_free(), and httpc_new().

herror_t hurl_parse struct hurl_t obj,
const char *  url
 

Parses the given 'urlstr' and fills the given hurl_t object. Parse an URI URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]

Parameters:
obj the destination URL object to fill
url the URL in string format
Returns:
H_OK on success or one of the following otherwise
  • URL_ERROR_UNKNOWN_PROTOCOL
  • URL_ERROR_NO_PROTOCOL
  • URL_ERROR_NO_HOST

Definition at line 77 of file nanohttp-url.c.

References hurl_t::context, H_OK, herror_new(), hurl_t::host, HTTP_DEFAULT_PORT, HTTPS_DEFAULT_PORT, log_error1, log_error2, log_warn2, hurl_t::port, hurl_t::protocol, PROTOCOL_HTTP, PROTOCOL_HTTPS, URL_ERROR, URL_ERROR_NO_HOST, URL_ERROR_NO_PROTOCOL, and URL_ERROR_UNKNOWN_PROTOCOL.


Generated on Thu Jan 25 23:36:04 2007 for csoap by  doxygen 1.4.6