[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:57:42 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit aa53ed7f651491ede566a839f59673d237afa144
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Nov 7 06:43:30 2002 +0000
- fixed problem where files small enough to fit entirely in the buffer
(8K or less) would not be decoded
* Downloads.subproj/WebDownloadHandler.m:
(-[WebDownloadHandler decodeData:]): Added. Moved most of the code from
receivedData into here.
(-[WebDownloadHandler receivedData:]): Changed to call decodeData.
(-[WebDownloadHandler finishedLoading]): Call decodeData on any remaining
bytes rather than writing them straight out to the data fork.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2584 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 90fd7a3..74a1134 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,15 @@
+2002-11-06 Darin Adler <darin at apple.com>
+
+ - fixed problem where files small enough to fit entirely in the buffer
+ (8K or less) would not be decoded
+
+ * Downloads.subproj/WebDownloadHandler.m:
+ (-[WebDownloadHandler decodeData:]): Added. Moved most of the code from
+ receivedData into here.
+ (-[WebDownloadHandler receivedData:]): Changed to call decodeData.
+ (-[WebDownloadHandler finishedLoading]): Call decodeData on any remaining
+ bytes rather than writing them straight out to the data fork.
+
2002-11-06 Richard Williamson <rjw at apple.com>
More work on rendering scripts. Now most complex scripts render correctly.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 90fd7a3..74a1134 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,15 @@
+2002-11-06 Darin Adler <darin at apple.com>
+
+ - fixed problem where files small enough to fit entirely in the buffer
+ (8K or less) would not be decoded
+
+ * Downloads.subproj/WebDownloadHandler.m:
+ (-[WebDownloadHandler decodeData:]): Added. Moved most of the code from
+ receivedData into here.
+ (-[WebDownloadHandler receivedData:]): Changed to call decodeData.
+ (-[WebDownloadHandler finishedLoading]): Call decodeData on any remaining
+ bytes rather than writing them straight out to the data fork.
+
2002-11-06 Richard Williamson <rjw at apple.com>
More work on rendering scripts. Now most complex scripts render correctly.
diff --git a/WebKit/Downloads.subproj/WebDownload.m b/WebKit/Downloads.subproj/WebDownload.m
index 6117e45..e261f8f 100644
--- a/WebKit/Downloads.subproj/WebDownload.m
+++ b/WebKit/Downloads.subproj/WebDownload.m
@@ -253,7 +253,7 @@
{
if (!bufferedData) {
bufferedData = [data mutableCopy];
- } else if([bufferedData length] == 0) {
+ } else if ([bufferedData length] == 0) {
// When bufferedData's length is 0, we're done buffering.
return data;
} else {
@@ -273,20 +273,12 @@
}
}
-- (WebError *)receivedData:(NSData *)data
+- (WebError *)decodeData:(NSData *)data
{
- ASSERT(data);
-
if ([data length] == 0) {
- // Workaround for 3093170.
return nil;
}
- data = [self dataIfDoneBufferingData:data];
- if (!data) {
- return nil;
- }
-
NSData *dataForkData = nil;
NSData *resourceForkData = nil;
@@ -304,6 +296,18 @@
return nil;
}
+- (WebError *)receivedData:(NSData *)data
+{
+ ASSERT(data);
+
+ if ([data length] == 0) {
+ // Workaround for 3093170.
+ return nil;
+ }
+
+ return [self decodeData:[self dataIfDoneBufferingData:data]];
+}
+
- (BOOL)finishDecoding
{
NSObject <WebDownloadDecoder> *decoder;
@@ -321,21 +325,19 @@
- (WebError *)finishedLoading
{
- if(![self finishDecoding]){
+ WebError *error = [self decodeData:bufferedData];
+ [bufferedData release];
+ bufferedData = nil;
+ if (error) {
+ return error;
+ }
+
+ if (![self finishDecoding]) {
ERROR("Download decoding failed.");
[self cleanUpAfterFailure];
return [self errorWithCode:WebErrorDownloadDecodingFailedToComplete];
}
- if ([bufferedData length]) {
- // All data has been buffered because we never received the minimum header length.
- // Write it out now.
- WebError *error = [self writeDataForkData:bufferedData resourceForkData:nil];
- if (error) {
- return error;
- }
- }
-
[self closeFile];
NSString *path = [[dataSource contentPolicy] path];
diff --git a/WebKit/Downloads.subproj/WebDownloadHandler.m b/WebKit/Downloads.subproj/WebDownloadHandler.m
index 6117e45..e261f8f 100644
--- a/WebKit/Downloads.subproj/WebDownloadHandler.m
+++ b/WebKit/Downloads.subproj/WebDownloadHandler.m
@@ -253,7 +253,7 @@
{
if (!bufferedData) {
bufferedData = [data mutableCopy];
- } else if([bufferedData length] == 0) {
+ } else if ([bufferedData length] == 0) {
// When bufferedData's length is 0, we're done buffering.
return data;
} else {
@@ -273,20 +273,12 @@
}
}
-- (WebError *)receivedData:(NSData *)data
+- (WebError *)decodeData:(NSData *)data
{
- ASSERT(data);
-
if ([data length] == 0) {
- // Workaround for 3093170.
return nil;
}
- data = [self dataIfDoneBufferingData:data];
- if (!data) {
- return nil;
- }
-
NSData *dataForkData = nil;
NSData *resourceForkData = nil;
@@ -304,6 +296,18 @@
return nil;
}
+- (WebError *)receivedData:(NSData *)data
+{
+ ASSERT(data);
+
+ if ([data length] == 0) {
+ // Workaround for 3093170.
+ return nil;
+ }
+
+ return [self decodeData:[self dataIfDoneBufferingData:data]];
+}
+
- (BOOL)finishDecoding
{
NSObject <WebDownloadDecoder> *decoder;
@@ -321,21 +325,19 @@
- (WebError *)finishedLoading
{
- if(![self finishDecoding]){
+ WebError *error = [self decodeData:bufferedData];
+ [bufferedData release];
+ bufferedData = nil;
+ if (error) {
+ return error;
+ }
+
+ if (![self finishDecoding]) {
ERROR("Download decoding failed.");
[self cleanUpAfterFailure];
return [self errorWithCode:WebErrorDownloadDecodingFailedToComplete];
}
- if ([bufferedData length]) {
- // All data has been buffered because we never received the minimum header length.
- // Write it out now.
- WebError *error = [self writeDataForkData:bufferedData resourceForkData:nil];
- if (error) {
- return error;
- }
- }
-
[self closeFile];
NSString *path = [[dataSource contentPolicy] path];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list