/[cwmp]/google/lib/CWMP/Server.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /google/lib/CWMP/Server.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 30 by dpavlin, Mon Jun 18 19:16:28 2007 UTC revision 31 by dpavlin, Mon Jun 18 20:07:17 2007 UTC
# Line 22  sub handler { Line 22  sub handler {
22    
23          if ( $transfer_encoding && $transfer_encoding =~ qr/^chunked/i ) {          if ( $transfer_encoding && $transfer_encoding =~ qr/^chunked/i ) {
24    
25                  my $last = 0;                  my $len = 0;
26                  do {                  do {
27                          my $len = <STDIN>;                          $len = <STDIN>;
28                          $len =~ s/[\n\r]*$//s;                          $len =~ s/[\n\r]*$//s;
29                          $len = hex( $len );                          $len = hex( $len );
30    
31                          $last = 1 if ( $len == 0 );                          #warn "getting chunk of $len bytes\n";
   
                         warn "getting chunk of $len bytes\n";  
32    
33                          while( $len > 0 ) {                          while( $len > 0 ) {
34                                  my $line = <STDIN>;                                  my $line = <STDIN>;
# Line 38  sub handler { Line 36  sub handler {
36                                  $len -= length( $line );                                  $len -= length( $line );
37                          }                          }
38    
39                  } while ( ! $last );                  } while ( $len > 0 );
40          }          }
41    
42          warn "chunk (", length($chunk), " bytes)\n------>>\n$chunk\n<<-----\n";          warn "got ", length($chunk), " bytes\n";
43    
44      my $cgi  = new CGI( $chunk );      my $cgi  = new CGI( $chunk );
45    

Legend:
Removed from v.30  
changed lines
  Added in v.31

  ViewVC Help
Powered by ViewVC 1.1.26