neon HTTP/WebDAV client library

Joe Orton

This document is free documentation; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This document is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Table of Contents

1. Introduction
Feature list
How to use neon from your application
Standards compliance
RFC 2518, HTTP Extensions for Distributed Authoring—WebDAV
RFC 2616, Hypertext Transfer Protocol—HTTP/1.1
RFC 7616, HTTP Digest Access Authentication
Namespaces in XML
HTTP Client Security
CPU or memory consumption attacks
SSL/TLS connection security
Control character insertion in error messages
Attacks against authentication credentials
2. The neon C language interface
Parsing XML
Introduction to SAX
Stacked SAX handlers
Maintaining state
XML namespaces
I. neon API reference
neon — HTTP and WebDAV client library
neon-config — script providing information about installed copy of neon library
ne_addr_resolve — functions to resolve hostnames to addresses
ne_buffer — string buffer handling
ne_buffer_append — append data to a string buffer
ne_buffer_clear — clear, grow, or mark as altered a string buffer
ne_buffer_create — create a string buffer
ne_buffer_destroy — destroy a buffer object
ne_strhash — string hash interface
ne_strparam — HTTP extended parameter value encoding
ne_get_error — error handling for HTTP sessions
ne_get_status — retrieve HTTP response status for request
ne_has_support — determine feature support status
ne_i18n_init — functions to initialize internationalization support
ne_iaddr_make — functions to manipulate network addresses
ne_malloc — memory allocation wrappers
ne_session_create — set up HTTP sessions
ne_session_proxy — configure proxy servers
ne_set_session_flag — set and retrieve session flags
ne_request_create — low-level HTTP request handling
ne_add_request_header — add headers to a request
ne_get_response_header — functions to access response headers
ne_set_useragent — common properties for HTTP sessions
ne_set_request_flag — set and retrieve per-request flags
ne_set_request_body_buffer — include a message body with a request
ne_set_server_auth — register authentication callbacks
ne_shave — trim whitespace from a string
ne_sock_init — perform library initialization
ne_ssl_cert_identity — functions to access certificate properties
ne_ssl_cert_cmp — functions to operate on certificate objects
ne_ssl_cert_read — functions to read or write certificates to and from files or strings
ne_ssl_dname — SSL distinguished name handling
ne_ssl_trust_cert — functions to indicate that certificates are trusted
ne_ssl_set_verify — register an SSL certificate verification callback
ne_ssl_client_cert — SSL client certificate handling
ne_status — HTTP status structure
ne_token — string tokenizers
ne_version_match — library versioning
ne_xml_create — create and destroy an XML parser

List of Examples

2.1. An example XML document