|
![](/i/fill.gif) |
> *You* should realize that I was speaking in more general terms. The kind
> of statement "This has to be trivial" or "This has to be obvious" is
> often mistaken, just like "this is obviously impossible" has been slowly
> being beaten out of your vocabulary. ;-)
>> So the code to figure this out already exists. All you have to do is
>> look at where the user put the breakpoint, and select the nearest line
>> that's executable. The only possibly-tricky thing is having the
>> breakpoint set on line X+N put appear to be set on line X.
>
> I would just move the breakpoint.
Or you could do that, yes.
> What would be tricky is if you click
> between two functions - do you breakpoint the last line of the previous
> function or the first line of the next function?
Or the first statement outside of a function? Or just refuse to set a
breakpoint there? There's several possible options.
>> It seems there are plenty of light-weight HTTP servers, but all of
>> them either lack CGI support entirely, or only support CGI *scripts*
>> (usually in a single language).
>
> I'm pretty sure tcl httpd supports CGI and FastCGI. If not, it's pretty
> trivial to do so. Basically, copy some header crap into environment
> variables, pipe the incoming request to stdin of the CGI, and pipe the
> stdout back to the browser.
Constructing and parsing HTTP headers yourself also isn't all that
hard... and yet it turns out to be unexpectedly non-trivial to do a
really good job of it yourself. Especially when you're not actually
trying to write a web server, you just want something to test your CGI with.
Post a reply to this message
|
![](/i/fill.gif) |