6 ms·
Complete Noobs Guide to Hacking Nginx
- mickeyben 16y agoI 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 16y agoSorry! 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.
- dfhjtyjyt 16y agohttp://✂.ws/yX http://✂.ws/yX http://✂.ws/yX http://✂.ws/yX http://✂.ws/yX http://✂.ws/yX http://✂.ws/yX http://✂.ws/yX http://✂.ws/yX http://✂.ws/yX http://✂.ws/yX http://✂.ws/yX http://✂.ws/yX http://✂.ws/yX http://✂.ws/yX http://✂.ws/yX http://✂.ws/yX http://✂.ws/yX http://✂.ws/yX http://✂.ws/yX
- gaa 16y agoHi,Dear Ladies and Gentlemen, ( http://www.yessoso.com http://www.yessoso.com) Here are the most popular, most stylish and avant-garde shoes,handbags,Tshirts, jacket,Tracksuit w ect...NIKE ,JORDAN SHOES 1-24,AF,DUNK,SB,PUMA ,R4,NZ,OZ,T1-TL3) $33HANDBGAS(COACH,L V, DG, ED HARDY) $13TSHIRTS (ED HARDY, LACOSTE) --- NHL Jersey Woman $ 35--- NFL Jersey $25 --- NBA Jersey $ 25 --- MLB Jersey $ 25 --- Jordan Six Ring_m $36 --- Air Yeezy_m $ 55 --- T-Shirt_m $ 13 --- Jacket_m $ 30 --- Hoody_m $ 55 --- Manicure Set $ 20 as long as the new and old customers to buy the corresponding product on this site, both a gift, so stay tuned! ! ( http://www.yessoso.com http://www.yessoso.com )
- Bddhdhs 16y agoWhy 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.
- alnayyir 16y agoMissing the Point (™)
- Bddhdhs 16y agoEven if you allow that PUT is not a wild goose chase, he is still making trivial patches, the first of which is not correct, and the second of which he states he did not verify was correct, even after being rejected the first time. So if we discount that he is demonstrating how to build a bad API, he's still demonstrating how to be a bad participant in the patching process.
- schmichael 16y agoI'm adhering as best I can to the (nearly completely undefined) development practices of the project I'm working on. My assumption is that upstream developers will continue to guide me through the testing and improving of my patch. Even in a loosely run project I would hope my patch would be applied to the development build for wider testing long before it's included in production.
- true_religion 16y agoI'm using Nginx now, and developing a RESTful API. I was planning to use the HTTPDavModule (http://wiki.nginx.org/HttpDavModule http://wiki.nginx.org/HttpDavModule) which adds the HTTP and WebDAV methods PUT, DELETE, MKCOL, COPY and MOVE. Did you try this before? If its compatible with proxying, then it wouldn't be necessary to patch the server for HTTP PUT requests.
- smallhands 16y agoawesome post !
- c00p3r 16y agoIt is not a hacking, it is a very primitive monkey-patching.
- ra 16y agoThe 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.
- BrandonM 16y agoWhat's the problem with sending "Content-Length: 0" as part of the PUT headers?
- jrockway 16y agoBrowsers?
- BrandonM 16y agoIf this is the case, I think the article could have made it more clear that the problem was with software not under the author's control. All the article mentions is "the application registering the device," and I assumed that it was their application which was not sending the header. So a browser won't send a Content-Length header for a PUT request if there is no body? I'm not criticizing the article itself; it was a nice beginner guide to making quick changes to an existing C project. My only criticism is that the first step when considering whether to make a change to a code base is to fully evaluate whether that change is appropriate, if it is fixing the problem in the right place. Perhaps the author did this and the article simply failed to mention it.
- riffraff 16y agodo browser support put at all?
- dowskitest 16y agoYes. Most browsers support all of the HTTP methods via the XmlHttpRequest object. http://annevankesteren.nl/2007/10/http-method-support http://annevankesteren.nl/2007/10/http-method-support
- schmichael 16y agoThe good news is that browsers aren't the issue for us at Urban Airship. The bad news is that it's worse: it's an infinite number of HTTP libraries of varying quality that hit our API. Some from pretty much every imaginable platform capable of HTTP: from mobile devices to VBA in Microsoft Access: http://help.urbanairship.com/discussions/questions/161-using-vba-to-trigger-notification http://help.urbanairship.com/discussions/questions/161-using... If the HTTP standard allows it, we probably need to support it (or degrade in a standards compliant way) because someone will try to use it.
- stcredzero 16y agoNginx 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!
- drdaeman 16y ago> 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.