Forum

PUT / DELETE

Martin Tournoij
25 October 2011, 16:44
Hiawatha handles PUT and DELETE requests somewhat different from most webservers: It implements them according to the standard. (As explained here: http://www.hiawatha-webserver.org/forum/topic/245)

Many webservers at least have an option to 1) Pass it to a CGI script and 2) Use Rewrites.

Rewrites were disabled in some previous version (6.6 IIRC), and executing CGI is not supported.

Many REST application depend in this behavior, it may not be according to the standard (Haven't read it from cover-to-cover), but it certainly is how "the world works" ...

Would you accept a patch which implements a new option to change this? I can make a patch, but no sense doing that if it's not going to be included ...

Thanks.
Hugo Leisink
25 October 2011, 17:27
I'm sorry, but I will not accept such patch. Hiawatha will always work according to the standards. That the whole world works differently is not an excuse for me.

And the fact that many REST applications depend on this faulty behaviour says more about those applications and their developers than it says about how things should be.
Martin Tournoij
25 October 2011, 18:08
And the fact that many REST applications depend on this faulty behaviour says more about those applications and their developers than it says about how things should be.

Perhaps ... But from a purely pragmatic point of view it would be a good thing to have :-), Personally, I wouldn't consider having an option "harmful" as long as it's off by default and documented, the problems from breaking standards usually arise from being undocumented and/or on by default ...

I'm not sure how much this "breaks" the standard though, HTTP is just one of the possible REST protocols ... Having REST requests outside of a HTTP context is not necessarily "wrong" or "not according to the standards" as far as I understand it ...
Hugo Leisink
25 October 2011, 19:15
REST can perfectly be used with HTTP. With POST requests that is, not with PUT requests. Implementing REST by using PUT requests is simply wrong, it's bad design. And I have no intention to cripple my webserver because other people failed to make a proper design. Sorry.
Martin Tournoij
25 October 2011, 20:49
Fair enough

In principle I agree, but I neither designed the REST protocol I want to implement, nor can I change the client, so I'm stuck with it
Hugo Leisink
25 October 2011, 20:51
You can always write a patch for Hiawatha for your own usage... Because I won't accept the patch for the official Hiawatha release, doesn't mean I'm not willing to help you with the patch. I'm not going to write it for you, but if you have any questions, I'll answer them the best I can.
Martin Tournoij
25 October 2011, 21:24
Thanks ... Maintaining a patch outside of Hiawatha is not something I look forward to, running ngix alongside Hiawatha is probably the best thing for now.
This topic has been closed.