Quick CGI question: doing nothing?

David Bovill david at openpartnership.net
Tue Mar 27 09:17:03 EDT 2007


Thanks Andre, I have tried a bunch of variations and think I must be making
a basic error as I am getting nothing but "Internal server errors". What's
wrong with this script:

on startup
   put "Do nothing" into buffer
   -- put "HTTP/1.1 204" && buffer & crlf & crlf

   put "HTTP/1.0 204 my descriptive text"
   put "Content-Type: text/html" & CR
   put "Content-Length: "& length(buffer) & crlf & crlf
   -- write buffer to stdout

   quit
end startup

On 27/03/07, Andre Garzia <soapdog at mac.com> wrote:
>
> David,
>
> a nice read is "HTTP Made Easy" <http://www.jmarshall.com/easy/http/>
>
> for a 204 response, just begin your response with
>
> HTTP/1.0 204 my descriptive text
>
> then put your headers, then your actual data...
>
> Cheers
> andre
>
>
> On Mar 27, 2007, at 9:42 AM, David Bovill wrote:
>
> > How do I create a CGI that does nothing - from searching around I came
> > across the 204 HTTP Response code. So my basic question is how do I
> > write
> > cgi's to return different HTTP response codes?
> > _______________________________________________
> > use-revolution mailing list
> > use-revolution at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-revolution
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list