| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@2034 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
| |
* test/request.c (safe_flags): Add regression test.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@2015 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
|
| |
127.0.0.1.
* test/utils.c (session_server, sessi
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1919 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
| |
multiple mappings from "localhost" addr.
(status_plain, status_chunked): Adapt to use notifier.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1910 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
| |
Re-order tests to avoid triggering some weird glibc getaddrinfo issue.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1908 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
| |
memory leaks in the test suite, found by --enable-memleak.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1854 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
| |
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1810 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
| |
value to NE_ERROR.
* test/request.c (socks_fail): Add test case.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1809 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
|
|
| |
Montulli.
* test/request.c (serve_mirror, send_length): Add test case.
* test/Makefile.in (foobar.txt): Create test file.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1801 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
| |
(open_connection): Use it to fix support for SOCKSv4 servers.
* test/request.c (socks_v4_proxy): Add test case.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1713 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/ne_request.c (ne_begin_request): Fail for a C-L with trailing
non-numeric chars, or is an empty string.
* test/request.c (no_body_empty_clength, no_body_bad_clength): Remove tests.
(fail_on_invalid): Add tests for invalid C-L.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1645 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
| |
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1597 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/ne_request.c (open_connection): Fix non-proxy error path.
Establish connection via SOCKS proxy.
* src/ne_session.c (ne_session_socks_proxy): New function.
* src/ne_session.h (ne_session_socks_proxy): New prototype.
* src/ne_private.h (struct ne_session_s): Add socks_ver, socks_user,
socks_password fields.
* test/request.c (socks_session, socks_proxy): New functions.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1559 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
HTTP proxy (though the former cannot yet be configured or used).
Reimplement addrlist support as a "direct" proxy type.
* src/ne_private.h (struct host_info): Add proxy enum, network field,
next pointer.
(struct ne_session_s): Remove addrlist, numaddr, curaddr.
Remove proxy field, add proxies, prev_proxy, nexthop fields.
Remove use_proxy, add any_proxy_http flag.
* src/ne_session.c (free_hostinfo, free_proxies): New functions.
(ne_session_destroy): Use the above.
(set_hostinfo): Take type argument, set in structure.
(ne_session_create): Pass PROXY_NONE to set_hostinfo.
(ne_session_proxy): Call free_proxies, set sess->any_proxy_http
flag, and adjust for new sess->proxies structure.
(ne_set_addrlist): Adjust to set up a "direct" proxy.
(ne_fill_proxy_uri): Adjust for proxies structure.
(ne_close_connection): Use nexthop hostname for disconnect notifier.
* src/ne_session.h (ne_session_proxy, ne_set_addrlist,
ne_fill_proxy_uri): Adjust for multi-proxy semantics.
* src/ne_request.c (aborted): Use sess->nexthop.
(add_fixed_headers): Use new any_proxy_http flag. Reflow
code. Set Host header here.
(ne_request_create): Use any_proxy_http flag.
(build_request): Don't add Host header here.
(lookup_host): Don't check addrlist.
(ne_begin_request): Use sess->nexthop in place of proxy flag.
(resolve_first, resolve_next): Use ->network in place of
addrlist; drop session paramater.
(do_connect): Do DNS lookup here; adjust for resolve_*;
set error message appropriately based on host type, drop
error parameter.
(open_connection): Support multiple proxies; adjust to use
sess->nexthop.
* test/request.c (addrlist): New test case.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1557 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
| |
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1531 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
| |
'localhost' resolves to ::1 not 127.0.0.1.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1530 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
previous (respectively) API guarantee that a NULL callback deregisters
an existing callback.
* src/ne_session.c (ne_set_progress): Fix regression in 0.27, support
NULL progress callback correctly.
* test/request.c (dereg_progress): Add regression test.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1497 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
persistent connection but don't advertise such support in an
HTTP-compliant manner:
* src/ne_request.c (add_fixed_headers): Add the request header
"Proxy-Connection: Keep-Alive" for a non-HTTP/1.1 next-hop, iff a
proxy is configured.
(ne_begin_request): Where the next-hop is non-HTTP/1.1, a proxy
is configured, *and* the conn-auth flag is enabled, enable use of
persistent connections if the next-hop sends the response header
"Proxy-Connection: Keep-Alive".
* test/request.c (test_persist_p): Renamed from test_persist. Take
proxy flag and enable proxy and conn-auth if set.
(test_persist): New function.
(persist_proxy_http10): New test case.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1406 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
| |
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1388 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/ne_private.h (struct ne_session_s): Add close_conn_hooks.
* src/ne_session.c (ne_hook_close_conn, ne_unhook_close_conn): New
functions.
(ne_close_connection): Run close_conn hooks.
* src/ne_request.h (ne_hook_close_conn, ne_unhook_close_conn): New
prototypes.
* test/request.c (hook_close_conn, hooks): Add tests.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1344 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
| |
negative offset; better guarantee of failure.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1310 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/ne_session.c (ne_set_localaddr): New prototype.
* src/ne_session.c (ne_set_localaddr): New function.
* src/ne_request.c (do_connect): Call ne_sock_prebind if local_addr is
non-NULL.
* test/request.c (local_addr): New test case.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1302 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
| |
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1298 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
| |
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1251 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
| |
progress.
* test/request.c (status_chunked): New test.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1237 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
transfer-coding since "privoxy" apparently sends it. Fail for unknown
transfer-codings.
* test/request.c (te_identity): New test, replacing any_te_header.
(fail_on_invalid): Test for failure with unknown transfer-codings.
* doc/using.xml: Update section on transfer-encoding interpretation.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1219 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
|
|
|
| |
more explicit by renaming the function:
* src/ne_session.h, src/ne_session.c (ne_set_notifier): Renamed from
ne_set_status.
* test/request.c (status): Adjust accordingly.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1185 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
|
| |
(ne_close_connection): Invoke the notifier callback.
(ne_session_destroy): Close the connection earlier.
* test/request.c (status_cb, status): Test ne_status_disconnected.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1182 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
| |
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1177 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
| |
in the .invalid TLD, reserved by RFC2606.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1104 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
| |
strings.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1095 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/ne_session.h (ne_notify_status): Redefine callback type,
passing pointer to ne_session_status_info structure.
* src/ne_request.c (notify_status): Invoke notify callback, and
progress callback as appropriate.
(send_request_body, ne_read_response_block, lookup_host,
ne_begin_request, do_connect): Adjust to set up and invoke
the notify callback.
* src/ne_openssl.c (ne__negotiate_ssl): Drop notify callback
invocation.
* src/ne_private.h (struct ne_session_s): Store status union.
* macros/neon.m4: Define NE_FMT_NE_OFF_T.
* test/request.c (status_cb, status): Add new test.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1094 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/ne_request.h (ne_post_headers_fn, ne_hook_post_headers): Add
type, prototype.
* src/ne_private.h (struct ne_session_s): Add post_headers_hooks
field.
* src/ne_request.c (ne_begin_request): Run post_headers hooks.
* src/ne_session.c (ne_session_destroy): Destroy post_headers hooks.
(ne_hook_post_headers, ne_unhook_post_headers): New functions.
* test/request.c (status_to_string): New function.
(hook_post_send): Use it.
(hook_post_headers): New function.
(hooks): Test post_headers hook.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1075 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
| |
responses, to avoid spurious failures.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@951 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
non-idempotent methods:
* src/ne_request.h (ne_set_request_flag, ne_get_request_flag): New
prototypes.
(ne_set_request_expect100): Remove prototype.
* src/ne_request.c (struct ne_request_s): Add flags array, remove
use_expect100 field.
(ne_set_request_flag, ne_get_request_flag): New functions.
(ne_set_request_expect100): Remove function.
(build_request, send_request): Adapt to use expect100 flag.
(ne_begin_request): I
* test/request.c (expect_100_once, expect_100_nobody): Use
ne_set_request_flag.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@947 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NE_SESSFLAG_ICYPROTO.
* src/ne_session.h: Add NE_SESSFLAG_ICYPROTO flag.
* src/ne_request.c (read_status_line): Parse ICY responses if flag is
set.
* test/request.c (icy_protocol): Add test case.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@945 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
from a corresponding hook implementation, except for the
destroy_request hook.
* src/ne_request.c (ne_request_destroy): Make safe against the hook
list changing under foot.
* test/request.c (hook_self_destroy): New test.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@940 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
| |
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@928 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ne_unhook_destroy_request, ne_unhook_destroy_session): Add prototypes.
* src/ne_session.c (remove_hook, ne_unhook_pre_send,
ne_unhook_post_send, ne_unhook_destroy_request,
ne_unhook_destroy_session): New functions.
* test/request.c (hooks): New test case.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@927 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
| |
offset rather than /dev/null.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@586 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
| |
* src/ne_openssl.c (check_identity): Destroy buffer on error path.
* test/request.c (iterate_many): Destroy temp buffer.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@569 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
| |
fails, per new interface requirement.
* test/request.c (send_bad_offset): New test.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@568 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
| |
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@531 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
level.
* macros/neon.m4 (NEON_LIBIDN): Remove.
* src/ne_session.c (set_hostinfo): Remove IDNA support.
* src/ne_utils.c, src/ne_utils.h: Don't advertise IDNA feature.
* test/util-tests.c, test/request.c: Remove IDNA tests.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@518 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
| |
EOF-at-chunk-size cases.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@445 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
| |
test for invalid C-L in response.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@444 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
|
| |
* src/ne_request.c (struct ne_request_s): Add current_index field.
(ne_response_header_iterate): New function.
* test/request.c (iterate_many, iterate_none): New tests.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@439 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
|
|
| |
ne_request_destroy. (ne_request_destroy): Use it.
(ne_begin_request): Free response headers each time the response
is read.
* test/request.c (retry_post_send, reset_headers): New functions.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@371 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ne_get_response_header interface:
* src/ne_request.h (ne_get_response_header): New function, replacing
ne_add_response_header_handler and ne_add_response_header_catcher.
* src/ne_request.c (struct header_handler): Remove.
(struct field): Add.
(struct ne_request_s): Store a hash of header fields rather than
a hash of callbacks.
(te_hdr_handler, connection_hdr_handler, clength_hdr_handler,
ne_add_response_header_catcher, ne_add_response_header_handler,
ne_duplicate_header, ne_handle_numeric_header):
Remove functions.
(get_response_header_hv, ne_get_response_header,
add_response_header, remove_response_header): New functions.
(ne_request_create): Don't register the callbacks.
(read_response_headers): Call add_response_header for each
field.
(ne_begin_request): Move handling of Connection, T-E and C-L headers
here. Comply with 2616/14.10 w.r.t. Connection header handling in
HTTP/1.0 responses.
(ne_request_dispatch): Use ne_discard_response (unrelated).
* src/ne_redirect.c (struct redirect): Remove location field.
(post_send): Adjust to retrieve location header here.
* src/ne_basic.h (ne_get_content_type): Replaces
ne_content_type_handler.
* src/ne_basic.c (dispatch_to_fd): New function.
(get_to_fd, get_lastmodified, clength_hdr_handler, accept_206,
content_range_hdr_handler): Remove functions.
(ne_getmodtime): Adjust to use ne_get_response_header.
(ne_get_range, ne_get, ne_post): Adjust to use dispatch_to_fd.
(ne_get_content_type): Adjust for new API, use ne_get_response_header.
(parse_dav_header, ne_options): Adjust to use ne_get_response_header.
* src/ne_compress.c (struct ne_decompress_s): Add ne_request * field,
remove enchdr field.
(gz_reader): Retrieve C-E header on demand, here.
(ne_decompress_reader, ne_decompress_destroy): Remove C-E response
header duplication.
* src/ne_auth.c (auth_request): Remove auth_hdr, auth_info_hdr
fields.
(ah_collect_header): Remove function.
(ah_create, ah_destroy): Remove response-header callback handling.
(ah_post_send): Retrieve -Authenticate header here; correctly handle
the broken proxy which sends a 401 in response to CONNECT.
* src/ne_locks.c (lk_startelm): Retrieve Lock-Token header here.
(get_ltoken_hdr): Remove function.
(ne_lock, ne_lock_refresh): Remove response-header handling.
* test/basic.c (content_type): Test new interface.
* test/request.c (expect_header_value): Adjust to accept NULL value,
use ne_get_response_header interface.
(multi_header): Test new ne_get_response_header multi-header handling.
(multi_header2, strip_http10_connhdr, strip_http10_connhdr2): New
tests.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@367 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|
|
|
|
|
|
|
|
|
|
|
| |
* test/props.c (serve_infinite): Remove function.
* test/request.c (serve_infinite_folds, serve_infinite_headers):
Remove functions. (unbounded_headers, unbounded_folding): Adjust to
use serve_infinite.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@322 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
|