Re: Simple Proposal for setting HTTP headers

On 21/07/2013 10:17 , Tobie Langel wrote:
> On Saturday, July 20, 2013 at 3:43 PM, Wang, Jing J wrote:
>>>> What we want, in the long term, is a custom HTTP server,
>>>> written in Python, that understands ^headers^ files (or
>>>> similar), allows full control over the HTTP response, and has
>>>> features optimised for testing.
>>
>> An easier way is - Any web server plus python script CGI can meet
>> the requirement
>
> Some of the requirements include being developer friendly and forward
> looking. I'm not sure CGI really fits the bill here, but others might
> disagree.

CGI is very developer-friendly, that's not the problem. The problem is 
configuring any Web server properly so that it would serve CGI content 
without interfering with it in ways that would cause breakage (typically 
rewriting headers or intercepting methods). You need more than CGI, you 
actually need NPH.

If we could produce a configuration that enabled NPH on all major web 
servers then we might be able to skip writing a server and just rely on 
NPH CGI. But NPH seems to have all but vanished, and it's probably hard 
to find someone born after 1980 who even knows what it is. I failed to 
find Apache 2.x support after looking for a specific test that was being 
problematic recently. I doubt any more recent servers have any support 
for it either.

So I reckon a pure CGI approach is out of the picture.

That said, it would be useful if the server we have could itself run 
dynamic code. Maybe we could use something like 
http://code.google.com/p/pyv8/ to make it developer-friendly?

-- 
Robin Berjon - http://berjon.com/ - @robinberjon

Received on Tuesday, 6 August 2013 10:26:24 UTC