Changeset 6290
- Timestamp:
- 07/10/07 16:42:50 (1 year ago)
- Files:
-
- branches/branch-4-10/mapserver/HISTORY.TXT (modified) (1 diff)
- branches/branch-4-10/mapserver/mapogcsos.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/branch-4-10/mapserver/HISTORY.TXT
r6245 r6290 16 16 - Fixed size of output buffer in msGetEncodedString() (#2132) 17 17 18 - SOS : backport fixes related to large xml outputs (#1938, #2146) 18 19 19 20 Version 4.10.2 (2007-05-07) branches/branch-4-10/mapserver/mapogcsos.c
r5491 r6290 939 939 int *panOfferingLayers = NULL; 940 940 941 msIOContext *context = NULL; 941 942 942 943 psDoc = xmlNewDoc("1.0"); … … 1374 1375 /*xmlSaveFile("c:/msapps/reseau_sos/test.xml",psDoc);*/ 1375 1376 1377 if ( msIO_needBinaryStdout() == MS_FAILURE ) 1378 return MS_FAILURE; 1379 1376 1380 msIO_printf("Content-type: text/xml%c%c",10,10); 1377 1381 … … 1382 1386 "ISO-8859-1"); 1383 1387 */ 1384 xmlDocDumpFormatMemoryEnc(psDoc, &buffer, &size, "ISO-8859-1", 1); 1385 1386 msIO_printf("%s", buffer); 1388 1389 context = msIO_getHandler(stdout); 1390 1391 xmlDocDumpFormatMemoryEnc(psDoc, &buffer, &size, "ISO-8859-1", 1); 1392 msIO_contextWrite(context, buffer, size); 1393 xmlFree(buffer); 1394 1387 1395 1388 1396 /*free buffer and the document */ 1389 xmlFree(buffer);1390 1397 xmlFreeDoc(psDoc); 1391 1398 … … 1439 1446 int nSize = 0; 1440 1447 int iIndice = 0; 1448 msIOContext *context = NULL; 1441 1449 1442 1450 sBbox = map->extent; … … 1900 1908 /* output results */ 1901 1909 msIO_printf("Content-type: text/xml%c%c",10,10); 1910 1911 context = msIO_getHandler(stdout); 1902 1912 xmlDocDumpFormatMemoryEnc(psDoc, &buffer, &size, "ISO-8859-1", 1); 1903 1904 nSize = sizeof(workbuffer); 1905 if (size > sizeof(workbuffer)) 1906 { 1907 iIndice = 0; 1908 while ((iIndice + nSize) <= size) 1909 { 1910 snprintf(workbuffer, (sizeof(workbuffer)-1), "%s", buffer+iIndice ); 1911 workbuffer[sizeof(workbuffer)-1] = '\0'; 1912 msIO_printf("%s", workbuffer); 1913 1914 iIndice +=nSize; 1915 } 1916 if (iIndice < size) 1917 { 1918 sprintf(workbuffer, "%s", buffer+iIndice ); 1919 msIO_printf("%s", workbuffer); 1920 } 1921 } 1922 else 1923 { 1924 //msIO_printf("size: %d",size); 1925 msIO_printf("%s", buffer); 1926 } 1927 1928 /*free buffer and the document */ 1913 msIO_contextWrite(context, buffer, size); 1929 1914 xmlFree(buffer); 1915 1916 /*free the document */ 1930 1917 xmlFreeDoc(psDoc); 1931 1918 /*
