[9984] in www-talk@info.cern.ch

home help back first fref pref prev next nref lref last post

Re: Sending 'status-code=204'.

daemon@ATHENA.MIT.EDU (Dave Kristol)
Thu May 16 09:44:47 1996

Date: Thu, 16 May 96 09:31:41 EDT
From: dmk@allegra.att.com (Dave Kristol)
To: 638net@medusa.es
Cc: www-talk@www10.w3.org
Resent-From: www-talk@w3.org

"Domingo Siliceo" <638net@medusa.es> wrote:
  > Hi all,
  > I'm trying to send a status-code 204 from a script that no contains any 
  > data to be shown in the html browser, so, I guess I should not define any 
  > content-type header in my script. This script might look like
  > 
  > #tested under NTPerl 4.036 and EMWAC 0.991
  > 
  > print "Status-Code=204\n\n";
  > 
  > open FILE ">>momo.html";
  > print FILE "Bon dia!\n";
  > close (FILE);
  > 
  > exit (0);
  > 
  > I hope you get the idea. 

Try changing the first line to:
	print "Status: 204 No Content\n\n";

You did not say which server you're using, but the CGI interface expects
a "header" named "Status".  As written, the script produces no headers
(you need a ':') and uses the wrong name anyway ("Status-Code").

Dave Kristol


home help back first fref pref prev next nref lref last post