~ubuntu-branches/ubuntu/utopic/suricata/utopic

« back to all changes in this revision

Viewing changes to libhtp/htp/htp_request_generic.c

  • Committer: Package Import Robot
  • Author(s): Pierre Chifflier
  • Date: 2011-11-17 23:20:51 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20111117232051-wlo0g2fyinx0zi25
Tags: 1.1-1
* Imported Upstream version 1.1
* Add instructions on getting new rules using oinkmaster
* Add Recommends on oinkmaster
* Move snort-rules-default to Recommends

Show diffs side-by-side

added added

removed removed

Lines of Context:
108
108
        free(h->value);
109
109
        free(h);
110
110
 
111
 
        // Keep track of same-name headers
 
111
        // Keep track of same-name headers        
112
112
        h_existing->flags |= HTP_FIELD_REPEATED;
113
113
    } else {
114
114
        // Add as a new header
135
135
    size_t name_start, name_end;
136
136
    size_t value_start, value_end;
137
137
 
138
 
    htp_chomp(data, &len);
 
138
    htp_chomp(data, &len);   
139
139
 
140
140
    name_start = 0;
141
141
 
142
142
    // Look for the colon
143
143
    size_t colon_pos = 0;
144
 
 
 
144
    
145
145
    while ((colon_pos < len) && (data[colon_pos] != ':')) colon_pos++;
146
 
 
 
146
    
147
147
    if (colon_pos == len) {
148
148
        // Missing colon
149
149
        h->flags |= HTP_FIELD_UNPARSEABLE;
200
200
 
201
201
    // Look for the end of field-content
202
202
    value_end = value_start;
203
 
 
 
203
    
204
204
    while (value_end < len) value_end++;
205
205
 
206
206
    // Ignore LWS after field-content