Changeset 2024

Show
Ignore:
Timestamp:
04/15/10 16:29:03 (5 months ago)
Author:
x.pechoultres@…
Message:

Http:
+ fix http deflate header handling

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/modules/Http/source/http_filter.cl

    r1986 r2024  
    4545//<xp> output buffer check input for continue or abort http command 
    4646// Todo : best management when connexion must abort (zera lenth chunk .. see HTTP RFC) 
    47 write_port(self:http_output, buf:char*, len:integer) : integer -> 
    48         (read!(self.input_device.source), 
     47pwrite_port(self:http_output, buf:char*, len:integer) : integer -> 
     48        (//[2] write_port(~S, ~S, ~S) // self,buf,len, 
     49        if not(self.input_device.source % descriptor) 
     50                //[1] ***** warning input devise is not a descriptor !!!, 
     51        read!(self.input_device.source), 
    4952        write!(self.input_device.source), 
    5053        if (select?()) 
     
    344347                                        error("http_parse_headers(~S) read an error status [~A]", self, head)), 
    345348                        //[-100] ~A // head, 
    346                         if (find(lhead, "content-encoding: ") = 1 & (find(lhead, "gzip") > 0 | find(lhead, "defalte") > 0)) 
     349                        if (find(lhead, "content-encoding: ") = 1 & (find(lhead, "gzip") > 0 | find(lhead, "deflate") > 0)) 
    347350                                compress? := true 
    348351                        else if (find(lhead, "transfer-encoding: ") = 1 & find(lhead, "chunked") > 0)