Specifications
58 
During processing of this file, HTTP encounters the „%04‟ string. After parsing it, 
HTTP makes a callback.  HTTPGetVar(4, HTTP_START_OF_VAR, &value).  In 
Figure  20,  the  main  user  application  implements  HTTPGetVar  function  as 
follows: 
WORD HTTPGetVar(BYTE var, WORD ref, BYTE *val) 
{ 
 // Identify variable. 
 // Is it RB5 ? 
 if ( var == 4 ) 
 { 
 // We will simply return „1‟ if RB5 is high, 
  // or „0‟ if low. 
 if ( PORTBbits.RB5 ) 
 *val = „1‟; 
 else 
 *val = „0; 
 // Tell HTTP that this is last byte of 
 // variable value. 
 return HTTP_END_OF_VAR; 
 } 
 else 
  // Check for other variables... 
 ... 
} 
Figure 20 HTTPGetVar Function 
2.8 MPFS 
The  Microchip  HTTP  server  uses  a  simple  file  system  (MPFS)  to  store 
Webpages.    The  image  of  the  file  system  can  be  stored  in  on-chip  program 
memory, or on an external serial EEPROM.  Below is Figure 21 which describes 
how the MPFS stores multiple files: 










