[En-Nut-Discussion] httpd with dynamically generated text orbinary files

Vesa Jääskeläinen chaac at nic.fi
Sat Oct 22 15:47:46 CEST 2005


Hugo Simon wrote:
>> That has nothing to do with this at all.
> It has to do with it. The NutHttpProcessRequest checks if the CGI URL points
> to a file in cgi-bin. All other file requests are routed to urom:
> 
>> Your are telling that content length is '%ld' and browser doesn't
> That indeed was a mistake. I copied too much. :-)
> The new version simply give no content length or a valid one. But that
> wasn't the problem, the browser ignores that wrong parameter anyway.
> 
> The problem is, that the NutProcessCGIRequest function only allows GET and
> PUT method. HEAD is simply dropped and gave an error 501. Internet Explorer
> doesn't have a problem with that, but Mozilla had.

Ok, we can always extend how cgi-module works. I noticed that there
seems to be an error, as even Nut/OS's own httpd example assumed that
HEAD will get passed, though code was wrong for that.

So I will propose that we extend this functionality and fix that httpd
example.

There is a possibility that CGI-code's implemented without knowledge of
HEAD method being passed will produce HTTP responses that are against
standards. As you are not allowed to send body part when HEAD request is
processed.

So I think that this change should be documented somewhere else too.
Something like "be aware of these changes" section.

Thanks,
Vesa Jääskeläinen



More information about the En-Nut-Discussion mailing list