From 3deec04af03a41b831fabc78165661f347160849 Mon Sep 17 00:00:00 2001 From: Patrick Pelletier Date: Thu, 22 Nov 2018 23:09:45 -0800 Subject: [PATCH] Explain why this is not a good example. --- README.txt => README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) rename README.txt => README.md (53%) diff --git a/README.txt b/README.md similarity index 53% rename from README.txt rename to README.md index 0e0710c..89bbaaa 100644 --- a/README.txt +++ b/README.md @@ -1,3 +1,37 @@ +## This is probably not what you are looking for + +Understandably, given that the name of the repository is +`https-example`, I believe that a lot of people are coming here +expecting to find an example of how to write an https server and/or +client using [libevent](https://libevent.org/) and +[OpenSSL](https://www.openssl.org/). + +Instead, this was something I threw together in 2013 as an +example of a *problem* I was having when writing an https client and +server using libevent and OpenSSL. I only posted it so I could +[discuss it on the libevent mailing list](http://archives.seul.org/libevent/users/Jan-2013/msg00055.html). +I've kept it up in case it is useful to someone reading the mailing +list archives, and because a number of people have starred or forked +the repository. + +If you're looking for an https *client* using libevent and +OpenSSL, I would recommend checking out +[the example that comes with libevent](https://github.com/libevent/libevent/blob/master/sample/https-client.c). +If you're looking for an https *server* using libevent and OpenSSL, I +don't know of one to recommend. You might want to try asking on the +[libevent mailing list](http://archives.seul.org/libevent/users/). + +If you still want to look at the code in this repository, beware that +the client and server are written to work together. The server only +responds to a particular `POST` request generated by the client. +(This is because this example is a simplified version of some programs +I was writing at the time.) So if you want a general-purpose server, +you'll need to modify it to respond to `GET` requests, at the very +least. + +## Original README + +``` ppelletier@chives:~/src/https-example$ uname -a Linux chives 2.6.32-34-generic #77-Ubuntu SMP Tue Sep 13 19:39:17 UTC 2011 x86_64 GNU/Linux @@ -45,3 +79,4 @@ and libevent version "2.1.2-alpha-dev" code=0 POST failed socket error = Bad file descriptor (9) server said: (null) +```