kekekeks / Nancy.Hosting.Event.2

libevent2-based host for NancyFx
GNU Lesser General Public License v3.0
8 stars 2 forks source link

Nancy Request constructor #1

Open silviucm opened 10 years ago

silviucm commented 10 years ago

Hello,

Congratulations for this libevent host initiative. I think it is very cool.

I would like to insert a tiny observation, that NancyEvent2Host.cs uses a somewhat old Nancy Request constructor that appears not to be used anymore, and got deleted with this occasion:

https://github.com/NancyFx/Nancy/commit/01e25d3fc322781278e484fb7c4c52625c2f6854

I think the new constructor for the Request object is: public Request(string method, Url url, RequestStream body = null, IDictionary<string, IEnumerable> headers = null, string ip = null, byte[] certificate = null)

so your line in NancyEvent2Host.cs: var nreq = new Request(req.Method, path, req.Headers, RequestStream.FromStream(new MemoryStream(req.RequestBody)), "http", query);

produces this in Mono 3.2.x / Ubuntu: Missing method Nancy.Request::.ctor(string,string,IDictionary2<string, IEnumerable1>,RequestStream,string,string,string) in assembly Nancy.dll, referenced in assembly Nancy.Hosting.Event2.dll

In case I am looking at the wrong location, please let me know

All the best Sil

kekekeks commented 10 years ago

Patch landed here: https://github.com/kekekeks/evhttp-sharp