

Complete Noobs Guide to Hacking Nginx - schmichael
http://blog.schmichael.com/2010/12/28/noobs-guide-to-hacking-nginx/

======
mickeyben
I don't want to sound rude but the title doesn't seem appropriate at all.

Your article is about how you hacked nginx for your specific need (eventually
fix it if it finally merge to 0.8) but not a "complete noob guide".

That being said, nice fix !

~~~
schmichael
Sorry! I intended it to be encouraging for C dabblers like myself, but it's
definitely not a "guide." It's my first time posting to HN, so I'll try to be
more accurate with my titles in the future.

~~~
mickeyben
Sorry for the tone I was just frustrated !

~~~
mmaunder
Get a room.

------
drdaeman
> sudo make install

Judging from my understanding of the article, you are using Ubuntu. Please,
please, _please_ don't _ever_ teach "complete noobs" installing anything this
way. I won't insist on full course of backporting with apt-get source, hacking
on debian/* and doing dpkg-buildpackage, but even silly `sudo chown -R $USER
/usr/local && make install` is more appropriate than Slackware-ish `sudo make
install`. And, while far from being perfect, checkinstall(1), is easy to use
and should work fairly well.

I had to manage several Debian GNU/Linux-based systems with _ton_ of software
installed this way, and it was... well, quite painful. Package management is
there for a reason.

------
ra
The nginx source code is actually very readably and very well organised; I've
never programmed professionally in c, but I feel quite comfortable reading and
grokking nginx source.

------
Bddhdhs
Why wouldn't you just use POST? Being "RESTful" is even more ridiculous than
validating strict XHTML, since, apparently, it causes you to build an
unnecessary patch for your webserver. Just because a feature exists doesn't
mean you are bound to use it (PUT, DELETE). The distinctions are nonsense.

~~~
warrenwilkinson
Can any standard browser actually send PUT or DELETE? What buttons do I press
in firefox to send PUT?

~~~
Bgfdsss
Yes via Ajax, supposedly no via html form method.

You could build an Ajax button easily. You couldn't build a basic submit
button to do it (supposedly--on my phone so no cross browser testing).

Your point is taken that browsers don't really speak HTTP. There are plenty of
clients that do, generally for programmers working with APIs. These are at
issue.

~~~
true_religion
Right, there's a wide variety of Java uploaders that use PUT instead of POST.

------
stcredzero
_Nginx is not “an established C project”, it’s the insane product of Igor’s
twisted mind. It’s a brilliant totally asynchronous giant state machine –
which is how it’s so blindingly fast – because everything is non-blocking, and
everything is super efficient._

I'd like to see a diagram of that state machine!

------
BrandonM
What's the problem with sending "Content-Length: 0" as part of the PUT
headers?

~~~
jrockway
Browsers?

~~~
riffraff
do browser support put at all?

~~~
dowskitest
Yes. Most browsers support all of the HTTP methods via the XmlHttpRequest
object.

<http://annevankesteren.nl/2007/10/http-method-support>

------
smallhands
awesome post !

