gnome-vfs r5446 - in trunk: . modules



Author: sdroege
Date: Fri Feb 15 05:17:33 2008
New Revision: 5446
URL: http://svn.gnome.org/viewvc/gnome-vfs?rev=5446&view=rev

Log:
* modules/http-neon-method.c: (do_open):
Patch by Christian Kellner to allow seeking with GNOME_VFS_OPEN_RANDOM
and don't fail to open an URI if GNOME_VFS_OPEN_RANDOM is given but
seeking does not work. This makes the http method consistent with the
others.


Modified:
   trunk/ChangeLog
   trunk/modules/http-neon-method.c

Modified: trunk/modules/http-neon-method.c
==============================================================================
--- trunk/modules/http-neon-method.c	(original)
+++ trunk/modules/http-neon-method.c	Fri Feb 15 05:17:33 2008
@@ -2402,19 +2402,12 @@
 			return result;
 		} 
 	} else {
-		handle->use_range = (mode & GNOME_VFS_OPEN_RANDOM);
+                /* Always try to make Ranged puts */
+		handle->use_range = TRUE;
 	}
 
 	result = http_transfer_start (handle);	
 
-	if (result == GNOME_VFS_OK && mode & GNOME_VFS_OPEN_READ) {
-		
-		if (handle->use_range && ! handle->can_range) {
-			/*Review: Not supported or invalid open mode ? */
-			result = GNOME_VFS_ERROR_NOT_SUPPORTED;
-		}	
-	} 
-		
 	if (result != GNOME_VFS_OK) {
 		http_file_handle_destroy (handle);
 		handle = NULL;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]