Azat Khuzhin
7b077194cc
Add new error_cb for actual reporting of HTTP request errors.
...
It is useful to know why you callback called with NULL (i.e. it failed),
for example if you set max_body with evhttp_connection_set_max_body_size()
you must know that it failed because of body was longer than this size.
(Commit message tweaked by Nick)
2013-04-25 15:11:44 -04:00
Nick Mathewson
f935e2159a
build test/test-script.sh on systems with a less-featureful $<
2013-03-15 09:33:28 -04:00
Nick Mathewson
787fd7489f
Make --disable-libevent-regress work again
2013-03-15 09:33:13 -04:00
Nate Rosenblum
9443868d55
Double-check next timeout when adding events
...
When resuming the system from a suspended state, the ev_timeout field
of a scheduled timer event may be in the past. This leads to
unexpected behavior when scheduling a short-duration timer event
immediately after returning from suspension, because the new event
does not land on top of the timeout minheap and so the event loop
(blocked on a possibly long-duration timeout) is not notified.
This patch checks for this condition and, if it obtains, notifies the
event loop.
2013-03-05 11:29:33 -08:00
Azat Khuzhin
13676535c8
Test: decoding just part of string with evhttp_decode_uri_internal()
2013-03-01 12:02:54 +04:00
Azat Khuzhin
de8101a884
Move prototype of evhttp_decode_uri_internal() to http-internal.h
...
Make it non static, that can be called from tests
2013-03-01 12:00:24 +04:00
Azat Khuzhin
e1903e3ace
uri decode: changed the test for the existence of the next character
...
Fix for 64b6eceaba1a4
More info here
64b6eceaba (commitcomment-2714685)
2013-02-28 23:10:02 +04:00
Azat Khuzhin
64b6eceaba
uri decode: fix for warning "use of uninitialised value"
...
This patch add check in evhttp_decode_uri_internal() that next 2 symbols
are exists in array of chars for decoding, if don't have two next 2
symbols don't try to decode '%FF'
2013-02-28 17:19:44 +04:00
Nick Mathewson
87c56727b6
Merge pull request #41 from ppelleti/winsock-errs
...
FormatMessage for winsock errors
2013-02-26 15:22:03 -08:00
Patrick Pelletier
c9ad3af229
test filling up the hash table a bit
2013-02-25 20:13:01 -08:00
Patrick Pelletier
4ccdd53f78
use hashtable instead of linked list to cache winsock errors
...
as discussed here:
https://github.com/libevent/libevent/pull/41#issuecomment-13611817
2013-02-25 19:02:32 -08:00
Patrick Pelletier
2078e9b46a
make sure caching works, and we don't leak memory
2013-02-14 20:26:38 -08:00
Patrick Pelletier
0c6ec5d816
use FormatMessage for winsock errors
...
as discussed here:
http://archives.seul.org/libevent/users/Feb-2013/msg00004.html
2013-02-14 20:26:38 -08:00
Patrick Pelletier
729651260d
a program to print out the error strings for winsock errors
2013-02-14 18:22:12 -08:00
Nick Mathewson
9709461457
Merge remote-tracking branch 'origin/patches-2.0'
2013-02-14 14:13:11 -05:00
Greg Hazel
b618204216
fix #73 and fix http_connection_fail_test to catch it
2013-02-14 09:54:56 -08:00
Nick Mathewson
96150dd0c6
Unit test for event_remove_timer with EV_PERSIST.
...
Patch from dcicppin on sourceforge.
2013-02-13 11:41:11 -05:00
Nick Mathewson
5623e80371
Make event_remove_timer behave correctly with persistent timers
2013-02-13 11:41:11 -05:00
Nick Mathewson
74e52db45d
Merge remote-tracking branch 'ppelleti/nmake-clean-exes'
2013-02-11 11:25:25 -05:00
Nick Mathewson
2863c83700
Avoid using $(top_srcdir) in TESTS.
...
Newer automakes don't like this.
2013-02-08 22:10:05 -05:00
Nick Mathewson
ebf278b28d
Use AC_CONFIG_HEADERS in place of AM_CONFIG_HEADERS for autmake 1.13 compat
...
Patch from cazfi.
2013-02-08 22:09:56 -05:00
Nick Mathewson
d670e3bd35
Merge remote-tracking branch 'origin/patches-2.0'
...
This is an "ours" commit: I'm not taking the recent autotools changes
from patches-2.0, since they'd conflict with master.
2013-02-08 22:09:00 -05:00
Nick Mathewson
a55514eeed
Avoid using top_srcdir in TESTS-new automakes do not like this
2013-02-08 22:08:18 -05:00
Nick Mathewson
0c79787a97
Rename configure.in to configure.ac to appease newer autoconfs
2013-02-08 22:07:47 -05:00
Nick Mathewson
817ea36924
Use AC_CONFIG_HEADERS in place of AM_CONFIG_HEADERS for autmake 1.13 compat
...
Patch from cazfi.
2013-02-08 13:03:29 -05:00
Patrick Pelletier
a452811e41
"buffer" spelling
2013-02-07 17:55:36 -08:00
Patrick Pelletier
974bfa0782
remove all exes on "make clean", not just regress.exe
2013-02-07 17:55:36 -08:00
Nick Mathewson
2901542714
Merge remote-tracking branch 'origin/patches-2.0'
2013-02-05 15:09:31 -05:00
Nick Mathewson
0a5eb2eb5c
Fix a locking error in bufferevent_socket_get_dns_error.
...
Patch from Ka-Hing Cheung.
2013-02-05 15:07:32 -05:00
Nick Mathewson
19583a5ffe
Merge pull request #30 from ppelleti/valgrind-epoll
...
avoid valgrind false positive by zeroing epoll_event
2013-02-04 13:50:58 -08:00
Nick Mathewson
2ecd894725
Merge pull request #39 from azat/fix-http-for-ipv6
...
Fix ipv6 support for http. When URL contain domain, not IP address.
2013-02-04 13:49:08 -08:00
Nick Mathewson
f0a68a25ca
Merge pull request #37 from ppelleti/fix-indentation
...
fix some hinky indentation in evhttp_make_request
2013-02-04 13:33:10 -08:00
Nicholas Heath
0dda56a48e
Preliminary changes for Minix3.
2013-02-04 13:21:05 -05:00
Azat Khuzhin
9ec88bdf5f
Add regress test ipv6_for_domain.
...
Written for commit 71e709c7829275a594f767b27468b1b52e8b5bb9.
Fix ipv6 support for http. When URL contain domain, not IP address.
2013-01-27 02:17:02 +04:00
Nick Mathewson
42aaf4dcf7
Implement EVUTIL_ERR_IS_EAGAIN on windows.
2013-01-23 16:55:09 +00:00
Azat Khuzhin
71e709c782
Fix ipv6 support for http. When URL contain domain, not IP address.
...
Before this patch socket created before domain was resolved, and it
always create with AF_INET (ipv4), but we must create socket only after
domain was resolved to understad which protocol family have domain
address.
Thank to Patrick Pelletier, who found this bug.
2013-01-23 02:45:32 +04:00
Nick Mathewson
f324b1dffc
Merge remote-tracking branch 'origin/patches-2.0'
2013-01-22 17:10:07 +00:00
Gyepi Sam
c322c2077e
Fix a mistake in evbuffer_remove() arguments in example http server code
...
(commit message by nickm)
2013-01-22 16:59:07 +00:00
Patrick Pelletier
80e220eef7
fix some hinky indentation in evhttp_make_request
2013-01-18 20:25:41 -08:00
Volker Lendecke
0c2bacca43
Fix typo : Dispatching instead of Dispaching
2013-01-17 10:22:33 -05:00
Nick Mathewson
bf7a0ff268
When EWOULDBLOCK is not EAGAIN, treat it as equivalent to it
...
Acording to http://stackoverflow.com/questions/7003234/which-systems-define-eagain-and-ewouldblock-as-different-values
there are some older unixes that distinguish these error.s
2013-01-11 16:37:34 -08:00
Sebastian Hahn
b452a43450
Fix harmless clang enum warning
2012-12-31 18:29:56 +01:00
Sebastian Hahn
9e8cdf3d65
Fix comment to refer to sample/include.am correctly
2012-12-23 18:41:00 +01:00
Nick Mathewson
21c962e087
Merge remote-tracking branch 'origin/patches-2.0'
2012-12-20 11:50:23 -05:00
Nick Mathewson
0a822a640e
Avoid double-close on getsockname error in evutil_ersatz_socketpair
...
Found by coverity; CID 739726
2012-12-20 11:48:05 -05:00
Nick Mathewson
69db2610be
Avoid leaking fds on evconnlistener with no callback set
...
There's no way to retrieve an fd from an evconnlistener whose
callback has been cleared, so we had better close any such fd.
Found by coverity; CID 739725.
2012-12-20 11:47:09 -05:00
Nick Mathewson
49905ac328
Fix cut-and-paste err in whatsnew-2.1
2012-12-11 12:53:09 -05:00
Patrick Pelletier
809586a9c3
minor documentation typos
2012-12-08 02:32:17 -08:00
Nick Mathewson
5cc7806cc4
Merge remote-tracking branch 'origin/patches-2.0'
2012-12-04 12:32:26 -05:00
Nick Mathewson
7e45739e26
Fix compilation with WIN32_HAVE_CONDITION_VARIABLES enabled
...
Reported by Xiuqiang Jiang
2012-12-04 12:01:58 -05:00