Reproduction scenario:
- nginx installed via homebrew
- running Mono 3.2.5 (also reproduced under mono 3.2.4)
- latest stable release nuget package binaries in the same directory as
app.cs
-- bin list below
$ ls *.dll
Microsoft.Owin.Host.HttpListener.dll
Microsoft.Owin.dll
Owin.dll
Microsoft.Owin.Hosting.dll
Nancy.Owin.dll
Microsoft.Owin.Security.dll
Nancy.dll
Mono 3.2.5
$ mono --version
Mono JIT compiler version 3.2.5 ((no/964e8f0 Thu Nov 14 14:48:50 EST 2013)
Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: altstack
Notification: kqueue
Architecture: x86
Disabled: none
Misc: softdebug
LLVM: yes(3.3svn-mono)
GC: sgen
- Update the nginx config using
nginx.conf
from this gist.nginx -s reload
to pick up changes - Compile the app using
compile.sh
- Get the data from this gist and save it into
data.txt
-- example:wget -O data2.txt https://gist.github.com/aaronlerch/7594503/raw/6ec9a76683e1305ee147f2f5dabb82b36561681c/data.txt
- Run
mono app.exe
to start the server - Post the data to the app directly first:
curl -i -X POST -H 'Content-Type: application/json' -d @data.txt http://localhost:8082/
-- success - Post the data to the app via nginx:
curl -i -X POST -H 'Content-Type: application/json' -d @data.txt http://localhost:9999/
(assuming nginx is running on port 9999) -- fail