http.c


Log

Author Commit Date CI Message
Nick Mathewson 4e1ec3e0 2007-11-07T21:01:26 Make all the C files in the libraries compile under MSVC 2005 Express. There are still a few warnings, and probably some subtle issues, but it's better than nothing. svn:r499
Nick Mathewson e72661d2 2007-11-07T07:33:31 r16509@catbus: nickm | 2007-11-07 02:08:32 -0500 Stop using C++ style comments. svn:r497
Nick Mathewson 1f50f412 2007-11-07T07:33:26 r16508@catbus: nickm | 2007-11-07 02:01:03 -0500 Note a dubious point in http.c svn:r496
Nick Mathewson 7feba570 2007-11-07T07:33:21 r16507@catbus: nickm | 2007-11-07 01:34:55 -0500 Never assign a string constant to a non-const char *. svn:r495
Nick Mathewson a3f122d6 2007-11-07T07:33:16 r16506@catbus: nickm | 2007-11-07 01:29:59 -0500 Make all rpc and http functions not prototyped in evrpc.h and evhttp.h into static functions. I believe that these functions were meant to be private, yes? svn:r494
Nick Mathewson f74e7258 2007-11-07T06:01:57 r16501@catbus: nickm | 2007-11-07 01:00:31 -0500 This is one of those patches which will either make matters far simpler after the bugs shake out, or will get reverted pretty quick once we realize that it is a stupid idea. We now post-process the config.h file into a new event-config.h file, whose macros are prefixed with _EVENT_ and which is thus safe for headers to include. Using this, we can define replacement timeval manipulation functions in evutil.h, and use them uniformly through our code. We can also detect which headers are needful in event.h, and include them as required. This is also the perfect time to remove the long-deprecated acconfig.h file, so that autoheader no longer warns. Should resolve the following issues: [ 1826530 ] Header files should have access to autoconf output. [ 1826545 ] acconfig.h is deprecated. [ 1826564 ] On some platforms, event.h can't be included alone. svn:r492
Niels Provos 2026b215 2007-11-03T23:53:49 remove last vestiges of RBTREE svn:r470
Nick Mathewson 49ede3be 2007-10-03T17:19:22 r15517@catbus: nickm | 2007-10-03 13:14:05 -0400 Correct the pointer manipulation in fake_getaddrinfo(), and do the right thing for fake_getaddrinfo(NULL,&ai). Based on a patch by Lubmir Marinov, hacked until the unit tests passed on Linux with #undef HAVE_GETADDRINFO. svn:r459
Nick Mathewson bc7b7c24 2007-10-03T04:14:54 Fix implementation of strsep. svn:r457
Nick Mathewson fe482977 2007-09-24T16:26:11 r15324@catbus: nickm | 2007-09-24 12:22:21 -0400 New evutil.h macros to manipulate winsock errors. Use them in http.c and in evutil_socketpair(). svn:r451
Nick Mathewson d85bce4e 2007-09-20T18:38:31 Remove gratuitous tor-isms in evutil_socketpair(); fix a windows warning in http.c. svn:r446
Nick Mathewson 8b256b8e 2007-09-20T18:26:51 r15218@catbus: nickm | 2007-09-20 14:14:05 -0400 More win32 fixes: Use evutil_make_socket_nonblocking and EVUTIL_CLOSESOCKET consistently throughout the code. svn:r443
Niels Provos b835ee08 2007-09-15T15:50:11 fix http.c to compile properly with USE_DEBUG; from Christopher Layne svn:r430
Niels Provos e2f56411 2007-09-09T02:33:10 Fix a memory leak in which failed HTTP connections whould not free the request object svn:r419
Niels Provos 98f9616b 2007-09-07T02:49:46 support setting local address on an evhttp_connection svn:r416
Nick Mathewson 23866b76 2007-09-07T01:18:53 Another tweak on the date patch: win32 has no gmtime_r, but its gmtime() function uses thread-local storage for safety. Backportable. svn:r414
Nick Mathewson 003698c0 2007-09-07T01:03:01 r14975@catbus: nickm | 2007-09-06 21:00:38 -0400 Oops; we were already including sys/time.h. Remove the redundant include. svn:r413
Nick Mathewson 8d5ef326 2007-09-07T01:02:56 r14974@catbus: nickm | 2007-09-06 20:59:14 -0400 Changes to http.c: Add a Date header on replies if there is none already set. Also, include time.h unconditionally to be sure that struct tm is declared: every platform has time.h; the conditional should have been for sys/time.h. svn:r412
Niels Provos ff9e1af6 2007-09-02T01:33:38 demote most warnings to debug messages; execute callback later to allow freeing of connection object svn:r407
Niels Provos 11a0a9e4 2007-08-25T18:47:22 allow \r or \n individually to separate HTTP headers instead of the standard "\r\n"; from Charles Kerr. svn:r406
Niels Provos 67947ce3 2007-08-19T02:41:23 provide evhttp_new and evhttp_bind_socket instead of evhttp_start; using evhttp_new, it is possible to associate an event_base with the http server so that multi-threaded applications can have their own http server per thread; add appropriate testing. svn:r397
Niels Provos cd6dd951 2007-08-06T21:00:49 add a proper test for filtering new lines in headers svn:r384
Niels Provos 073d3590 2007-08-06T20:53:33 fix an embarassing bug where strchr was used with a cstring instead of a char svn:r383
Niels Provos 8ea5ffef 2007-08-05T02:15:10 request dispatching fix from Elliot Foster svn:r382
Niels Provos b7ff0248 2007-07-31T00:32:00 fix memory leak; found by Elliot F svn:r378
Niels Provos 3ad6b47e 2007-07-30T22:41:00 make clock_monotonic work; do not use default timeout; from Scott Lamb, plus some fixes from me. svn:r371
Niels Provos d7918e79 2007-07-30T21:27:33 drop illegal header values svn:r370
Niels Provos f0ff792a 2007-06-30T18:58:34 fixes from Joerg Sonnenberger: http.c is a violation of the ctype(3) interface and an unused function. test/regress_http.c are incorrect format strings. test/regress.c uses raise(3) from signal.h. evdns.c: evdns_error_strings is unused. The GET* macros can eat the semicolon from the expression. pos is passed in as off_t, so just pass that down. When assigning negativ values to unsigned variables, an explicit cast is considered good style. svn:r367
Niels Provos aa5c8068 2007-06-16T03:23:15 make it compile on solaris; from Andrei Nigmatulin svn:r366
Niels Provos cf5c1fce 2007-06-08T16:06:23 made the wrong fd non-blocking in accept_socket; from szjwwu svn:r364
Niels Provos 0c280824 2007-05-23T05:20:59 support removing of http callbacks and removing of registered RPCs svn:r355
Niels Provos 5b5400f6 2007-05-12T06:23:52 permit connection free from callback; from Ben Rigas svn:r354
Niels Provos a968da74 2007-03-06T06:26:10 split finding of callbacks out of code svn:r350
Niels Provos b5d2f9a2 2007-03-01T06:25:18 rolling back r339: evconfig.h does not work svn:r341
Niels Provos 127c260b 2007-02-28T04:02:29 make evconfig.h available as installed header file; not really ideal but good enough for me; from Nick Mathewson svn:r339
Niels Provos 995a58a3 2007-02-27T08:16:50 missing return (-1) for failures on make_socket svn:r338
Niels Provos 4356b681 2007-02-20T03:35:31 remove redundant \n from event_warn svn:r336
Niels Provos 06d0f8c0 2007-02-16T08:48:55 O(n^2) is bad svn:r332
Niels Provos fe266238 2007-02-15T02:16:07 try to make it work with proxy-connections svn:r329
Niels Provos 58f42c79 2007-02-14T16:59:47 fix handling of chunked requests svn:r328
Niels Provos 8901c141 2007-02-14T06:10:32 make chunked requests work correctly; this is done by providing a separate callback for invidiual chunks. if this callback is not set, all the data is going to be delivered at the end. svn:r327
Niels Provos 36950cef 2007-02-13T06:25:16 close connections for http/1.0 unless there is keep-alive svn:r326
Niels Provos 19373b3d 2007-02-13T06:14:42 when parsing query parameters, we automatically unquote them svn:r325
Niels Provos 9a65d013 2007-02-11T07:58:39 set content length even if content-type is specified svn:r324
Niels Provos bfb9f44f 2007-02-09T07:49:55 make mingw happy; from Nick Mathewson svn:r322
Niels Provos 22e53c7a 2007-01-27T04:10:08 make it work on freebsd; from phil oleson svn:r314
Niels Provos d5d04949 2007-01-18T06:28:42 fix http server so it can accept on high ports; better warning messages for getnameinfo; from Philip Lewis svn:r310
Niels Provos ff122207 2007-01-10T02:42:29 make accept socket non-blocking; from dug song svn:r309
Niels Provos ba8289be 2007-01-04T18:05:17 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
Niels Provos 0db257b8 2007-01-03T07:11:17 rename strlcpy so that it does not conflict with other tests; from Nick Mathewson. svn:r306
Niels Provos 894b6365 2006-12-23T07:30:10 fix a bug in an assert; from Weston Andros Adamson svn:r305
Niels Provos 557e0f62 2006-12-18T15:26:19 http chunking support from dug song; some refactoring and extra error checking by me svn:r304
Niels Provos a91d2b2b 2006-12-12T03:51:30 do close-detection via a separate event svn:r301
Niels Provos 04bdb248 2006-12-09T05:14:37 detect if a client to a streaming reply hangs up; from dug song comments from me :-) svn:r300
Niels Provos de7db33a 2006-12-09T02:58:12 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
Niels Provos 852d05a3 2006-12-09T01:41:57 support retrying for connections; from dug song small tweaks from me. svn:r297
Niels Provos 2225eec2 2006-12-09T01:33:03 decode uri when sending a request; from dug song svn:r296
Niels Provos 78592370 2006-12-06T04:12:11 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
Niels Provos c6e285d3 2006-12-06T03:38:41 allow gotsig to terminate active event loop; free http connection on failed incoming connections; bugs pointed out by Dug Song. svn:r293
Niels Provos ec067919 2006-12-02T21:28:39 fix cases where there is no content or transfer encoding was specified from Dug Song svn:r291
Niels Provos 942656bb 2006-11-23T06:32:20 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
Niels Provos 2d028ef6 2006-11-22T06:54:28 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
Niels Provos ce436242 2006-11-22T05:03:02 an attempt at differentiated error handling for timeouts and eof. really this needs to be propagated all the way to the callback. svn:r273
Niels Provos 868f10e7 2006-11-22T01:21:10 mingw fixes from Nick svn:r271
Niels Provos 31ba30ab 2006-11-18T08:51:12 make regression test work for poll and select svn:r265
Niels Provos 1a64c982 2006-11-18T07:30:21 some compilers don't like C99 inline variable declaration svn:r264
Niels Provos 36212f9d 2006-11-18T03:05:26 make persistent connections work; needs more testing svn:r261
Niels Provos d2c27da1 2006-11-18T02:10:25 introduce is connection close svn:r260
Niels Provos a67d9cb1 2006-11-17T07:45:42 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
Niels Provos c4836d10 2006-11-17T06:06:17 make sure that the rpc callback receives an unmarshaled payload; make sure that the rpc reply contains a good rpc structure, too. svn:r258
Niels Provos 1caff9bc 2006-11-16T15:59:42 we indicate a failed request by removing the uri from the request object svn:r257
Niels Provos 44bd5ab4 2006-11-16T08:49:26 prefix was missing /; malformed request caused server to crash svn:r256
Niels Provos f554234f 2006-11-16T07:36:20 first stab at an rpc layer; this breaks the regression test. svn:r254
Niels Provos 768aa15c 2006-11-12T00:59:56 don't need to include getopt here svn:r253
Niels Provos 94af961f 2006-07-18T06:35:48 get rid of err.h svn:r218
Niels Provos ba7262eb 2006-07-17T00:33:57 reorganization of the http functionality; we separate http handling into a connection object and a request object; also make it clear which buffers are used for input and output; unittests not complete yet. svn:r217
Niels Provos 6813af3f 2006-06-10T22:37:21 move http related prototypes to evhttp.h svn:r214
Niels Provos 147b71e3 2006-06-10T22:28:21 rename http.h to http-internal.h - i wish there were decent refactoring tools for open source programmers. svn:r213
Niels Provos a32839c8 2006-03-28T04:17:51 some nit-picking from poul-henning kamp svn:r208
Niels Provos 38b33048 2006-02-27T02:27:37 make a simple test for HTTP POST requests svn:r205
Niels Provos 896bf3a2 2006-02-13T02:22:48 many changes for fixing a small bug: post requests would not send the post data. I took the opportunity to reorganize a bit. svn:r201
Niels Provos 6717cf31 2006-02-03T19:24:28 fix a compile problem when USE_DEBUG is enabled svn:r198
Niels Provos a3bb4a03 2006-01-22T05:08:50 I often need some very simple HTTP functionality, so this is a first stab at integrating something really simple with HTTP. The interface is still evolving as I start messing with it. Not all the interfaces are properly exported yet. I am also trying to figure out how to intelligently hide the details about the different structures from users, so that that things can be changed around later. svn:r196