Show
Ignore:
Timestamp:
06.01.2009 13:26:48 (11 years ago)
Author:
davidb
Message:

Fixed bug to do with initialization of RequestFields? variable. Had been using a memset to make it all zero, but this is not a safe thing to do when there are text_t fields in the class. Code upgraded to use a constructor and 'reset' function that explicitly initializes and clears the text_t fields

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/runtime-src/src/w32server/httpreq.h

    r3811 r18313  
    6161  text_t Var; 
    6262  text_t Val; 
     63 
     64  RequestHeaderT()  
     65  : Var(), Val() 
     66  {} 
    6367}; 
    6468 
     
    9599  int NumOtherHeaders; 
    96100  RequestHeaderT OtherHeaders[MAX_OTHER_HEADERS]; 
     101 
     102  RequestFieldsT() 
     103  : MethodStr(), URIStr(), VersionStr(), DateStr(), MIMEVerStr(), 
     104    PragmaStr(), AuthorizationStr(), FromStr(), IfModSinceStr(), 
     105    RefererStr(), UserAgentStr(), ContentEncodingStr(), 
     106    ContentTypeStr(), ContentLengthStr(), AcceptStr(), 
     107    AcceptLangStr(), ConnectionStr(), 
     108    OtherHeaders() 
     109  { 
     110    ContentLength = 0; 
     111    Content = NULL; 
     112    NumOtherHeaders = 0; 
     113  } 
     114 
    97115}; 
    98116