ulong code, complete = 0;

{ code = HTTP_200_OK;                complete = 1; } : (complete !& ...);

{ code = HTTP_301_MOVED_PERMANENTLY; complete = 1; } : (complete !& ...);
{ code = HTTP_302_MOVED_TEMPORARY;   complete = 1; } : (complete !& ...);

{ code = HTTP_403_FORBIDDEN;         complete = 1; } : (complete !& ...);
{ code = HTTP_404_NOT_FOUND;         complete = 1; } : (complete !& ...);
{ code = HTTP_410_GONE;              complete = 1; } : (complete !& ...);

if (complete)
{
  set_header (http_header, code);
  ...
}