[BusyBox] httpd and cgi

Mikael Bak mbak at fxnet.hu
Mon Apr 28 13:21:14 UTC 2003


Steven,

[snip]
> And that "HTTP/1.0 200 OK\n" apparently causes my browser to display
> the html stuff as text instead of interpreting them.
>
> So instead of viewing a nice web page created by the cgi script I only
> see the source code of it.
[snip]

Looks like your cgi program is not getting called properly.

First you have to make sure that the interpreter is actually calling the CGI
to produce the HTML you want in you browser. Second you have to make sure
you CGI program is sending the "content-type: text/html" to make sure your
browser is going to parse the html code.

The "HTTP/1.0 200 OK\n" is part of the HTTP protocol and needs to be sent to
the browser. The thing I think misses from your CGI program is sending the
right content-type.

But this is not a Busybox issue. Read more about http here:
http://www.w3.org/Protocols/rfc2616/rfc2616.html

HTH,
Mikael




More information about the busybox mailing list