[redland-dev] Bug report

Paul Keogh paul.keogh at anam.com
Tue Oct 28 14:47:20 GMT 2003


Module: raptor_www.c
Function: static int raptor_www_file_fetch(raptor_www *www) 
Description: The code snippet;

    if(len > 0 && www->write_bytes)
      www->write_bytes(www, www->write_bytes_userdata, buffer, len, 1);

    if(feof(fh) || www->failed)
      break;
  }
  fclose(fh);

  RAPTOR_FREE(cstring, filename);
  
  if(!status)
    www->status_code=200;
  
  return status;

If www->failed is set, this function still returns a status_code of 200
(and status of 0) because status is not set to 1. 

The calling function thinks it has succeeded when in fact it has failed.

Paul Keogh
ANAM Wireless Internet Solutions
http://www.anam.com                     
+353 1 284 7555 (wired)               +353 86 234 6047 (wireless)
Castle Yard, Saint Patrick's Road, Dalkey, County Dublin, Ireland
 



More information about the redland-dev mailing list