425 Commits

Author SHA1 Message Date
Niels Provos
ba8289bea5 from dug song:
the original code failed in the case of a large single client
request+body write - for instance, over loopback (with a larger MTU
exceeding EVBUFFER_MAX_READ).



svn:r307
2007-01-04 18:05:17 +00:00
Niels Provos
0db257b828 rename strlcpy so that it does not conflict with other tests; from
Nick Mathewson.


svn:r306
2007-01-03 07:11:17 +00:00
Niels Provos
894b636543 fix a bug in an assert; from Weston Andros Adamson
svn:r305
2006-12-23 07:30:10 +00:00
Niels Provos
557e0f62be http chunking support from dug song;
some refactoring and extra error checking by me


svn:r304
2006-12-18 15:26:19 +00:00
Niels Provos
0147ef3ac7 From Nick Mathewson:
This patch resets the successive timeout count to zero when:
  - A nameserver comes up
  - We receive a reply from a nameserver
  - We decide to not use the nameserver for a while because of its
    timeout count.

This patch also changes the timeout threshold from 3 to 5 seconds.


svn:r303
2006-12-12 04:02:07 +00:00
Niels Provos
a91d2b2b8c do close-detection via a separate event
svn:r301
2006-12-12 03:51:30 +00:00
Niels Provos
04bdb2488c detect if a client to a streaming reply hangs up; from dug song
comments from me :-)


svn:r300
2006-12-09 05:14:37 +00:00
Niels Provos
de7db33a61 low-level interfaces for streaming; from dug song
i applied some bug fixes and slight re-arranged the logic
on when to call the close notification callback;
i also don't like the streaming interface; i'd rather
see it do the chunked response formatting explicitly.


svn:r298
2006-12-09 02:58:12 +00:00
Niels Provos
852d05a3c0 support retrying for connections; from dug song
small tweaks from me.


svn:r297
2006-12-09 01:41:57 +00:00
Niels Provos
2225eec22b decode uri when sending a request; from dug song
svn:r296
2006-12-09 01:33:03 +00:00
Niels Provos
785923704c fix a bug where event_set was called on a pending event;
don't read body for return codes that do not require a body;
from dug song.


svn:r294
2006-12-06 04:12:11 +00:00
Niels Provos
c6e285d31a allow gotsig to terminate active event loop;
free http connection on failed incoming connections;
bugs pointed out by Dug Song.


svn:r293
2006-12-06 03:38:41 +00:00
Niels Provos
ec0679199f fix cases where there is no content or transfer encoding was specified
from Dug Song


svn:r291
2006-12-02 21:28:39 +00:00
Niels Provos
7fe5edf50c use CLOCK_REALTIME when CLOCK_MONOTONIC is not available; from Phil Oleson
svn:r290
2006-12-02 21:25:21 +00:00
Niels Provos
c1aa5480de support #define in .rpc descriptions
svn:r278
2006-11-26 16:13:17 +00:00
Niels Provos
942656bb5c persistent connections are somewhat complicated; detect on the client side if the
server closes a persistent connection.  previously, we would have failed the next
request on that connection.  provide test case.


svn:r277
2006-11-23 06:32:20 +00:00
Niels Provos
3882669d3e transaction id fixes from richard nyberg; return correct
error code when file for resolv.conf cannot be found.


svn:r276
2006-11-23 05:27:15 +00:00
Niels Provos
30a49b57da test that rpc timeouts work correctly
svn:r275
2006-11-22 07:30:34 +00:00
Niels Provos
2d028ef6c1 fix a bug where rpc would not be scheduled when they were queued; test for it.
allow a configurable timeout for connections and RPCs.


svn:r274
2006-11-22 06:54:28 +00:00
Niels Provos
ce436242ad an attempt at differentiated error handling for timeouts and eof.
really this needs to be propagated all the way to the callback.


svn:r273
2006-11-22 05:03:02 +00:00
Niels Provos
51fde16666 forgot to add this
svn:r272
2006-11-22 04:35:56 +00:00
Niels Provos
868f10e7c9 mingw fixes from Nick
svn:r271
2006-11-22 01:21:10 +00:00
Niels Provos
4aa780d6ad don't require string literal for message name
svn:r270
2006-11-20 07:57:36 +00:00
Niels Provos
ff43ed5b33 finish RPC client support
svn:r269
2006-11-20 07:44:37 +00:00
Niels Provos
fda1216b6e generate client request code via macro; flesh out the pools a little bit.
svn:r268
2006-11-20 03:32:53 +00:00
Niels Provos
3a15f7d4e4 make it work with python2.2
svn:r267
2006-11-19 02:03:43 +00:00
Niels Provos
226fd50a99 use more python builtins; dont use reserved keywords
svn:r266
2006-11-18 21:27:42 +00:00
Niels Provos
31ba30abfe make regression test work for poll and select
svn:r265
2006-11-18 08:51:12 +00:00
Niels Provos
1a64c982eb some compilers don't like C99 inline variable declaration
svn:r264
2006-11-18 07:30:21 +00:00
Niels Provos
ddf70659ad forgot ifdef guard around stdint.h
svn:r263
2006-11-18 03:52:27 +00:00
Niels Provos
9d81ac48f8 test both piplining on persistent and non-persistent connections
svn:r262
2006-11-18 03:43:26 +00:00
Niels Provos
36212f9df0 make persistent connections work; needs more testing
svn:r261
2006-11-18 03:05:26 +00:00
Niels Provos
d2c27da114 introduce is connection close
svn:r260
2006-11-18 02:10:25 +00:00
Niels Provos
a67d9cb115 add "Connection: close" to the output headers of the HTTP server reply;
we don't currently support persistent connections; although that's going
to be easy to add.


svn:r259
2006-11-17 07:45:42 +00:00
Niels Provos
c4836d1053 make sure that the rpc callback receives an unmarshaled payload;
make sure that the rpc reply contains a good rpc structure, too.


svn:r258
2006-11-17 06:06:17 +00:00
Niels Provos
1caff9bcc8 we indicate a failed request by removing the uri from the request object
svn:r257
2006-11-16 15:59:42 +00:00
Niels Provos
44bd5ab4e0 prefix was missing /; malformed request caused server to crash
svn:r256
2006-11-16 08:49:26 +00:00
Niels Provos
9d9d60b1ff forgot to add file
svn:r255
2006-11-16 08:21:27 +00:00
Niels Provos
f554234f74 first stab at an rpc layer; this breaks the regression test.
svn:r254
2006-11-16 07:36:20 +00:00
Niels Provos
768aa15c77 don't need to include getopt here
svn:r253
2006-11-12 00:59:56 +00:00
Niels Provos
79d2ca8cac fix a potential problem in multiple handling of va_list; use va_copy instead;
from Alejo.


svn:r251
2006-11-10 02:16:16 +00:00
Niels Provos
025b009bb6 fail without leaking memory when poll set extension fails
svn:r249
2006-11-05 17:24:24 +00:00
Niels Provos
d698965928 fix a potential memory leak in event_once from Scott Lamb
svn:r244
2006-10-28 03:20:22 +00:00
Niels Provos
3eec7f7c64 make it 1.2; fix some size issues for printf in regression code
svn:r242
2006-10-15 21:55:13 +00:00
Niels Provos
ea52d9fd8d improved nroff mdoc for the man page
svn:r241
2006-10-15 21:41:56 +00:00
Niels Provos
152f570047 install evdns.3 man page
svn:r240
2006-10-09 01:55:23 +00:00
Niels Provos
cf47f86b74 put the evdns documentation into the header file. pathetic start of evdns manpage. a little bit
more testing and debug output for the DNS regression test.   add a BSD copyright to evdns.h with
appropriate explanations.


svn:r239
2006-10-09 00:48:42 +00:00
Niels Provos
fe1dfe0f40 sync evdns changes with tor - from Nick Mathewson
svn:r238
2006-10-05 22:59:44 +00:00
Niels Provos
b6b933af5c Protect EVENT_* macros - () were missing
svn:r237
2006-10-04 03:45:10 +00:00
Niels Provos
9f7d28bb81 make it compile with mingw; from Nick
svn:r235
2006-09-27 03:07:38 +00:00