1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
|
2003-12-17 Dan Winship <danw@ximian.com>
* configure.in: Add gthread to glib check
* libsoup/soup-session.c: Make this an abstract class.
* libsoup/soup-session-async.c: A SoupSession class for
asynchronous gmain-based operation; replaces the old SoupSession.
* libsoup/soup-session-sync.c: A SoupSession class for synchronous
blocking operation for use with threaded apps.
* libsoup/soup-types.h, libsoup/soup.h: add the new session
subclasses
* libsoup/soup-connection.c (soup_connection_connect_sync): Don't
try to unref the socket if the socket creation fails.
(soup_connection_reserve): New, to explicitly mark a connection as
being in use without queueing a message on it.
* libsoup/soup-dns.c (check_hostent): Oof. Fix the logic of the
"block" flag to not be reversed.
* libsoup/soup-message.c (finished): set status to FINISHED here.
(soup_message_cancel): Gone; needs to be done at the session
level.
* libsoup/soup-message-queue.c: Add a mutex and make all of the
operations thread-safe.
* libsoup/soup-socket.c (disconnect_internal): Make this
thread-safe.
(soup_socket_connect): Make the sync case work correctly.
* libsoup/Makefile.am: add the SoupSession subclasses
* tests/Makefile.am: libsoup depends on libgthread now, so
revserver doesn't need to explicitly.
* tests/get.c, tests/auth-test.c, tests/simple-proxy.c: Use
soup_session_async_new().
2003-12-16 Rodrigo Moya <rodrigo@ximian.com>
* libsoup/soup-soap-response.[ch] (soup_soap_parameter_get_int_value):
new function.
2003-12-16 Joe Shaw <joe@ximian.com>
* libsoup/soup-connection.c (socket_connect_result,
soup_connection_connect_sync): Only set up a tunnel if the
destination protocol is HTTPS.
* libsoup/soup-message.c (class_init): Add a default handler for
wrote_body.
(wrote_body): Run the SOUP_HANDLER_POST_REQUEST handlers here.
(soup_message_cancel): Don't set the status to
SOUP_STATUS_CANCELLED and call soup_message_finished() if the
status is already SOUP_MESSAGE_STATUS_FINISHED.
* libsoup/soup-session.c (set_property): Don't cancel the session
if the proxy URI set as a property isn't different from the old
one.
(get_host_for_message): Refactor some code so that we can easily
get the right SoupSessionHost for proxies as well as from the
message.
(authenticate_auth): Take a gboolean proxy parameter. Check it to
see which URI (message URI or proxy URI) to use for
authentication. Add a long comment about lack of clarity in RFC
2617 with respect to proxies and protection spaces.
2003-12-15 Dan Winship <danw@ximian.com>
* libsoup/soup-socket.h (soup_socket_read, soup_socket_read_until,
soup_socket_write): s/guint/gsize/ to match the definitions in
soup-socket.c. #52167.
2003-12-12 Rodrigo Moya <rodrigo@ximian.com>
* libsoup/soup-soap-message.c: removed debugging of the messages here.
2003-12-12 Rodrigo Moya <rodrigo@ximian.com>
* libsoup/soup-soap-message.c (soup_soap_message_start_envelope):
added information for SOAP-ENV namespace.
2003-12-10 Dan Winship <danw@ximian.com>
* libsoup/soup-message-client-io.c (parse_response_headers): if we
receive an HTTP/1.0 response to an HTTP/1.1 request, downgrade the
message's http_version so the keep-alive handling is correct.
Fixes a problem noticed almost simultaneously by Rodrigo and Joe.
* libsoup/soup-message.c (soup_message_restarted, etc): Add a
"restarted" signal as suggested by Joe.
* libsoup/soup-message-io.c (soup_message_io_finished): emit
either "restarted" or "finished" as appropriate
* libsoup/soup-session.c (soup_session_queue_message): Connect to
"restarted" and run the queue if a message gets restarted
* libsoup/soup-status.h: Remove a stray comma that gtk-doc doesn't
like.
2003-12-10 Tambet Ingo <tambet@ximian.com>
* configure.in: Use autoconfig to check for socklen_t ...
* libsoup/soup-address.c: ... and remove it from here ...
* libsoup/soup-dns.c: ... and here.
2003-12-09 Rodrigo Moya <rodrigo@ximian.com>
* libsoup/soup-soap-message.c (soup_soap_message_persist):
(soup_soap_message_parse_response): print out request/response's
contents, if in debug mode.
2003-12-07 JP Rosevear <jpr@ximian.com>
* configure.in: Bump version
2003-11-28 Rodrigo Moya <rodrigo@ximian.com>
* libsoup/soup-soap-response.[ch]
(soup_soap_parameter_get_first_child,
soup_soap_parameter_get_first_child_by_name,
soup_soap_parameter_get_next_child,
soup_soap_parameter_get_next_child_by_name): new functions to
manage SoupSoapParameter's children.
(soup_soap_response_get_first_parameter): dont return a GList, but
a SoupSoapParameter contained in the GList.
2003-11-26 Rodrigo Moya <rodrigo@ximian.com>
* libsoup/soup-soap-response.[ch]
(soup_soap_parameter_get_string_value): new function.
2003-11-26 Rodrigo Moya <rodrigo@ximian.com>
* libsoup/soup-soap-response.[ch]: added SoupSoapParameter
structure, to "hide" the usage of xmlNode's.
(soup_soap_parameter_get_name): functions to manage SOAP
response parameters.
(soup_soap_response_get_first_parameter,
soup_soap_response_get_first_parameter_by_name,
soup_soap_response_get_next_parameter,
soup_soap_response_get_next_parameter_by_name):
new functions for an easy access to the response's parameters.
(soup_soap_response_from_string): removed warnings.
2003-11-25 Rodrigo Moya <rodrigo@ximian.com>
* libsoup/soup-soap-response.c (soup_soap_response_set_method_name):
fixed typo.
2003-11-25 Rodrigo Moya <rodrigo@ximian.com>
* libsoup/soup-soap-response.[ch] (soup_soap_response_get_method_name,
soup_soap_response_set_method_name, soup_soap_message_get_parameters):
new functions.
(finalize): NULL out new private fields.
(soup_soap_response_from_string): added validation code.
2003-11-23 Rodrigo Moya <rodrigo@ximian.com>
* libsoup/soup-soap-response.[ch]: new class for managing SOAP
responses.
* libsoup/soup-soap-message.[ch] (soup_soap_message_parse_response):
new function.
* libsoup/Makefile.am: added new files.
2003-11-18 Rodney Dawes <dobey@ximian.com>
* gtk-doc.make: Add gtk-doc.make to cvs for systems without gtk-doc
2003-11-18 Rodney Dawes <dobey@ximian.com>
* acinclude.m4: Add GTK_DOC_CHECK
2003-11-18 Dan Winship <danw@ximian.com>
* configure.in: Replace old gtk-doc test with GTK_DOC_CHECK()
(AC_OUTPUT): add docs/Makefile, docs/reference/Makefile
* autogen.sh (REQUIRED_AUTOMAKE_VERSION): 1.6, for gtk-doc.make
* Makefile.am: updates for gtk-doc
(SUBDIRS): add back "docs"
* docs/Makefile.am (EXTRA_DIST): remove, since those old docs
aren't around any more
* docs/reference/*: set up gtk-doc
* libsoup/Makefile.am (INCLUDES): Change G_LOG_DOMAIN to
"libsoup". Remove unused defines.
* libsoup/soup-connection.c: Fix doc comments
* libsoup/soup-message.c: Likewise
* libsoup/soup-misc.c: Likewise
* libsoup/soup-socket.c: Likewise
* libsoup/soup-uri.c: Likewise
* libsoup/soup-address.h: Fixes to please gtk-doc
* libsoup/soup-connection.h: Likewise
* libsoup/soup-message.h: Likewise
* libsoup/soup-message-private.h: Likewise
* libsoup/soup-misc.h: Likewise
* libsoup/soup-server-auth.h: Likewise
* libsoup/soup-socket.h: Likewise
* libsoup/soup-status.h: Likewise
2003-11-18 Dan Winship <danw@ximian.com>
* configure.in: Fix up the SSL checks some. Remove some useless
old header checks.
* libsoup/soup-misc.h: declare soup_ssl_supported.
* libsoup/soup-gnutls.c: add soup_ssl_supported declaration.
* libsoup/soup-nossl.c: Not an SSL implementation, built if
HAVE_SSL is not defined.
* libsoup/Makefile.am (libsoup_2_2_la_SOURCES): add soup-nossl.c
* libsoup/soup-socket.c (soup_socket_start_ssl): Return success or
failure.
(listen_watch): Deal with soup_socket_start_ssl failing.
* libsoup/soup-connection.c (tunnel_connect_finished,
socket_connect_result, soup_connection_connect_sync): Deal with
the soup_socket_start_ssl failing.
* libsoup/soup-server.c (soup_server_new): Deal with
soup_ssl_get_server_credentials failing
2003-11-18 Rodrigo Moya <rodrigo@ximian.com>
* libsoup/soup-soap-message.[ch] (soup_soap_message_start_fault,
soup_soap_message_end_fault, soup_soap_message_start_fault_detail,
soup_soap_message_end_fault_detail, soup_soap_message_start_header,
soup_soap_message_end_header,
soup_soap_message_start_header_element,
soup_soap_message_end_header_element, soup_soap_message_write_int,
soup_soap_message_write_double, soup_soap_message_write_base64,
soup_soap_message_write_time, soup_soap_message_write_string,
soup_soap_message_write_buffer, soup_soap_message_set_element_type,
soup_soap_message_set_null, soup_soap_message_add_attribute,
soup_soap_message_add_namespace,
soup_soap_message_set_default_namespace,
soup_soap_message_get_namespace_prefix,
soup_soap_message_set_encoding_style, soup_soap_message_reset,
soup_soap_message_persist): new functions from old SoupSerializer.
2003-11-17 Rodrigo Moya <rodrigo@ximian.com>
* libsoup/soup-soap-message.[ch] (soup_soap_message_new,
soup_soap_message_new_from_uri): added a bunch of initialization
parameters.
(soup_soap_message_get_xml_doc, soup_soap_message_start_envelope,
soup_soap_message_end_envelope, soup_soap_message_start_body,
soup_soap_message_end_body, soup_soap_message_start_element,
soup_soap_message_end_element):
new functions.
* configure.in: depend on libxml-2.0 for the SOAP code.
* libsoup/Makefile.am: use XML CFLAGS and LIBS.
2003-11-17 Joe Shaw <joe@ximian.com>
* configure.in: Add in the --enable-libgpg-error flag from the 2.0
branch.
* acinclude.m4: Include the gpg-error macros.
2003-11-17 Rodrigo Moya <rodrigo@ximian.com>
* libsoup/soup-soap-message.[ch]: new class to make it easier to
build SOAP messages.
* libsoup/Makefile.am: added new files.
* configure.in: increased version number.
2003-10-24 Joe Shaw <joe@ximian.com>
* libsoup/soup-address.c (update_address_from_entry): Call
soup_dns_entry_get_hostent() on the SoupAddress passed in, not the
one in addr->priv->lookup. Fixes a crash on synchronous DNS
lookups.
* libsoup/soup-server.c (soup_server_new): We need to ref the
address we're binding to, because soup_socket_get_local_address()
doesn't ref for us.
2003-10-23 Dan Winship <danw@ximian.com>
* libsoup/soup-socket.c (init): Initialize flags to default
values.
2003-09-23 Dan Winship <danw@ximian.com>
* libsoup/soup-gnutls.c (SoupGNUTLSCred): Remove refcounting, but
note whether or not the CA file has been loaded.
(SoupGNUTLSChannel): add a "hostname" field.
(verify_certificate): Remove the comment about not being able to
verify the hostname because of soup problems. Now it's because of
GNUTLS problems instead.
(soup_ssl_wrap_iochannel): Renamed from soup_ssl_get_iochannel,
and takes a hostname and a creds argument now.
(soup_ssl_get_client_credentials,
soup_ssl_get_server_credentials): Return client/server credentials
structures.
(soup_ssl_free_client_credentials,
soup_ssl_free_server_credentials): and free them.
* libsoup/soup-session.c (class_init, set_property, get_property):
add ssl_ca_file property
(get_host_for_message): when returning an SSL host for the first
time, create a client credentials structure for the session.
(run_queue): Pass the ssl creds to the new connection. Also fix an
unrelated bug that caused infinite loops on "bad hostname".
* libsoup/soup-server.c: Use GObject properties, including
ssl_cert_file and ssl_key_file properties.
(soup_server_new): Remove "protocol" argument; if the cert file
and key file properties were set, create a server credential
structure from them and pass that to soup_socket_server_new.
* libsoup/soup-connection.c (SoupConnectionPrivate): Rename
dest_uri to origin_uri to match RFC 2616 terminology. Add an
"ssl_creds" field.
(class_init, set_property, get_property): add SSL_CREDS property
(soup_connection_connect_async, soup_connection_connect_sync):
Pass ssl_creds to soup_socket_client_new calls.
* libsoup/soup-socket.c: Use GObject properties, including an
ssl_creds property
(soup_socket_set_flags): Gone (replaced with boolean properties)
(soup_socket_new): Make this take a list of properties
(listen_watch): copy ssl creds from listener to new socket
(soup_socket_start_ssl): Pass remote hostname and socket creds
structure to soup_ssl_wrap_iochannel.
(soup_socket_client_new_async, soup_socket_client_new_sync,
soup_socket_server_new): Replace the SSL boolean with an ssl_creds
structure.
* libsoup/soup-misc.c (soup_set_ssl_ca_file,
soup_set_ssl_cert_files, soup_get_ssl_ca_file,
soup_get_ssl_cert_files): Gone. SSL state is now per-session or
per-server.
* tests/get.c: add a "-c CAfile" argument, for loading a CA
certificate file to validate https connections against
* tests/simple-httpd.c: Add "-c certfile" and "-k keyfile"
arguments for loading an SSL server certificate. Only start an SSL
server if those arguments were used.
* tests/test-cert.pem:
* tests/test-key.pem: SSL certificate for testing simple-httpd
* tests/revserver.c: Update for API changes
* tests/simple-proxy.c: Likewise
2003-09-22 Dan Winship <danw@ximian.com>
* libsoup/soup-message-io.c: Move RESPONSE_BLOCK_SIZE #define here
from soup-private.h
* libsoup/soup-misc.c (soup_load_config, etc): Remove all this.
(soup_set_security_policy, soup_get_security_policy): Remove,
since the GNUTLS backend doesn't actually implement it.
(soup_set_ssl_ca_dir, soup_get_ssl_ca_dir): Likewise
* libsoup/soup-misc.h: sync to soup-misc.c. Don't #include extra
stuff.
* libsoup/soup-types.h (SOUP_MAKE_TYPE): Move this here from
soup-private.h
* libsoup/soup-ssl.h: Merge soup_ssl_get_iochannel and
soup_ssl_get_server_iochannel into a single function that takes a
SoupSSLType.
* libsoup/soup-gnutls.c: Remove soup_get_ssl_ca_dir() reference.
(soup_ssl_get_iochannel): Renamed from soup_gnutls_get_iochannel.
(soup_gnutls_set_security_policy): Gone
* libsoup/soup-gnutls.h
* libsoup/soup-ssl.c: Gone; soup-ssl.h is the #include file for
soup-gnutls.c now
* libsoup/soup-socket.c: Move soup_sockaddr_max
#define here from soup-private.h
(soup_socket_start_ssl): Update for new soup_ssl_get_iochannel
prototype.
* libsoup/soup-private.h: Gone
* libsoup/soup-address.c: Fix #includes for soup-private.h and
soup-misc.h changes
* libsoup/soup-auth-digest.c: Likewise
* libsoup/soup-auth.c: Likewise
* libsoup/soup-connection-ntlm.c: Likewise
* libsoup/soup-connection.c: Likewise
* libsoup/soup-dns.c: Likewise
* libsoup/soup-gnutls.c: Likewise
* libsoup/soup-headers.c: Likewise
* libsoup/soup-message-client-io.c: Likewise
* libsoup/soup-message-handlers.c: Likewise
* libsoup/soup-message-io.c: Likewise
* libsoup/soup-message-server-io.c: Likewise
* libsoup/soup-message.c: Likewise
* libsoup/soup-server-message.c: Likewise
* libsoup/soup-server.c: Likewise
* libsoup/soup-session.c: Likewise
* libsoup/soup-socket.c: Likewise
* tests/auth-test.c: Likewise
2003-09-19 Dan Winship <danw@ximian.com>
* libsoup/soup-address.c (update_address_from_entry): free the
hostent.
* libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Don't leak
the domain
* libsoup/soup-gnutls.c (soup_gnutls_get_iochannel): Add some more
iochannel initialization. Not sure how this worked before...
* libsoup/soup-message.c (soup_message_cleanup_response): Renamed
from soup_message_prepare (and a few things removed).
* libsoup/soup-message-client-io.c (soup_message_send_request):
s/soup_message_prepare/soup_message_cleanup_response/
* libsoup/soup-message-io.c (io_read): Replace the final "\r\n"
with "\0" on the headers before passing them to the parse
function.
(io_read): Call soup_message_cleanup_response after returning an
informational response so the data doesn't leak.
* libsoup/soup-headers.c (soup_headers_parse): Update for
soup-message-io.c:io_read change
* libsoup/soup-server.c (soup_server_new,
soup_server_new_with_host): Don't leak the SoupAddress.
* libsoup/soup-session.c (class_init): Make PROP_PROXY_URI not
CONSTRUCT_ONLY.
(set_property): If the proxy uri changes, call
soup_session_abort() and cleanup_hosts().
(request_finished, final_finished): Fix a bug when requeuing
messages.
* tests/libsoup.supp: valgrind suppression file for soup tests
* tests/Makefile.am (EXTRA_DIST): dist it.
(noinst_PROGRAMS): move the former check_PROGRAMS to
noinst_PROGRAMS instead.
2003-09-18 Dan Winship <danw@ximian.com>
* libsoup/soup-message.c: Add wrote_informational and
got_informational signals.
* libsoup/soup-message-client-io.c (get_request_headers): Set the
EXPECT_CONTINUE flag on the message if that header is set.
* libsoup/soup-message-server-io.c (parse_request_headers):
Likewise
* libsoup/soup-message-io.c (io_write): Set read_state to HEADERS
when blocking on an expect-continue. Emit wrote_informational
instead of wrote_headers in the 1xx case.
(io_read): Set read_state to BLOCKING, not NOT_STARTED after
reading a 100 Continue response. Emit got_informational instead of
got_headers in the 1xx case.
* libsoup/soup-session.c (soup_session_send_message): Reorder
things to deal with the fact that the message could finish right
away if there is a connection available and the server is very
close.
* libsoup/soup-status.h: Rename SOUP_STATUS_CLASS_TRANSPORT to
SOUP_STATUS_CLASS_TRANSPORT_ERROR.
2003-09-17 Dan Winship <danw@ximian.com>
* libsoup/soup-session.c (find_oldest_connection): Fix two bugs
(one that pruned too little, one that pruned too much).
(queue_message): When requeuing, don't run the queue;
final_finished will take care of that later.
(soup_session_abort): New, to cancel all pending requests.
* libsoup/soup-socket.c (soup_socket_connect, got_address): ref
the socket while waiting for the address to resolve
2003-09-17 Dan Winship <danw@ximian.com>
* libsoup/soup-connection.c (soup_connection_new): Replaces the
three previous soup_connection_new* functions and uses gobject
properties to set the destination and proxy uris.
(class_init): set up two more signals, authenticate and
reauthenticate.
(soup_connection_send_request): virtualize
(send_request): Default implementation
* libsoup/soup-connection-ntlm.c: New SoupConnection subclass that
also handles NTLM authentication. Includes all of the NTLM code
formerly in soup-auth-ntlm.c.
* libsoup/soup-auth-ntlm.[ch]: Gone.
* libsoup/soup-auth.c: Remove NTLM refs
* libsoup/soup-session.c (class_init): Add gobject properties for
proxy, max_conns, use_ntlm. Change the "authenticate" and
"reauthenticate" signal prototypes to not pass a SoupAuth (so they
can be used for authenticating SoupConnectionNTLM as well, which
doesn't use a SoupAuth).
(soup_session_new): Renamed from soup_session_new_default.
(soup_session_new_with_options): Replaces
soup_session_new_with_proxy and soup_session_new_full. Takes
gobject properties.
(run_queue): Create a new connection of type SoupConnection or
SoupConnectionNTLM depending on our "use_ntlm" property. Connect
to its authenticate and reauthenticate signals.
(connection_authenticate, connection_reauthenticate): proxy these
signals.
* libsoup/soup-address.c (update_address_from_entry): Fix a
crasher when failing to resolve the address.
* libsoup/soup-dns.c (check_hostent): Fix some "how was this
working before" bugs.
* libsoup/soup-message-client-io.c (soup_message_send_request):
call soup_message_prepare() to clean up the existing response
state.
* libsoup/soup-message-io.c (io_error): Set the read_state to DONE
when processing an OK EOF.
* libsoup/soup-status.h (SoupStatusClass): fix the numbering of
these so that SOUP_STATUS_CLASS_SUCCESS is 2, etc.
* tests/auth-test.c (authenticate, reauthenticate): Update for new
prototypes.
(main): Use soup_session_new.
* tests/get.c (main): Likewise.
* tests/simple-proxy.c (main): Likewise.
2003-09-10 Dan Winship <danw@ximian.com>
* libsoup/soup-session.c: Add "authenticate" and "reauthenticate"
signals.
(invalidate_auth): Remove the call to soup_auth_invalidate.
(authenticate_auth): soup_auth_fn is gone. If the URI doesn't
contain authentication, then emit "authenticate" or
"reauthenticate" (depending on whether or not this is the first
time we've asked for a password for this auth).
(update_auth_internal): If the server rejects our
username/password, don't bail out immediately. Try doing a
"reauthenticate" first.
* libsoup/soup-misc.c (soup_set_authorize_callback): Gone
* libsoup/soup-auth.c (soup_auth_new_from_header_list): Remove the
"pref" arg.
(soup_auth_invalidate): Remove this; it doesn't actually do
anything useful for us.
* libsoup/soup-auth-basic.c (invalidate): Remove
* libsoup/soup-auth-digest.c: (invalidate): Remove
* libsoup/soup-auth-ntlm.c: (invalidate): Remove
* libsoup/soup-uri.c: Remove all references to "authmech".
(soup_uri_set_auth): Remove this too.
* tests/auth-test.c: Update to use the "authenticate" and
"reauthenticate" signals instead of encoding usernames and
passwords in the URIs. Add a few more test cases.
2003-09-10 Dan Winship <danw@ximian.com>
* libsoup/soup-message-private.h (SoupMessagePrivate): Remove the
"status" field from here, since it's mostly used by SoupSession,
which shouldn't need access to SoupMessagePrivate.
* libsoup/soup-message.h (SoupMessage): Move it here.
(SoupCallbackFn): Remove this alias for SoupMessageCallbackFn.
(soup_message_set_uri): also moved from soup-message-private.h
* libsoup/soup-message.c: s/msg->priv->status/msg->status/.
* libsoup/soup-message-handlers.c:
s/SoupCallbackFn/SoupMessageCallbackFn/ everywhere.
* libsoup/soup-message-io.c (soup_message_io_client,
soup_message_io_server, soup_message_io_unpause): Don't set up an
idle handler, just jump right in to reading/writing; if this is a
synchronous socket, then the caller wants to block, and if it's
not, then we'll quickly get an EAGAIN anyway.
* libsoup/soup-session.c: (queue_message): Likewise.
(*) Update for SoupMessageStatus move and remove
soup-message-private.h include.
* libsoup/soup-server-message.c: Remove soup-message-private.h
include.
* libsoup/soup-server.c: Likewise.
* libsoup/soup-connection.c (soup_connection_is_connected,
soup_connection_is_new): Remove these, since they weren't being
used.
* libsoup/soup-md5-utils.c: Moved from md5-utils.c and renamed, to
avoid namespace pollution.
* libsoup/soup-auth-digest.c: Update for that.
* libsoup/soup-server-auth.c: Likewise
* tests/auth-test.c: Remove soup-message-private.h include
2003-09-09 Dan Winship <danw@ximian.com>
Beginnings of improved synchronous API support
* libsoup/soup-dns.c: Simplify this by making it not automatically
return the result: force the caller to poll. (This isn't really a
performance issue: the results should come back quickly anyway.)
Also, make the cache thread-safe.
(soup_dns_entry_from_name): Was soup_gethostbyname
(soup_dns_entry_from_addr): Was soup_gethostbyaddr
(soup_dns_entry_check_lookup): Used to poll to see if DNS is done
(soup_dns_entry_get_hostent): Gets the hostent from an entry (and
blocks if it's not resolved yet).
* libsoup/soup-address.c: Update for soup-dns changes.
(soup_address_new): Don't automatically start resolving the
hostname now, since we don't know if the caller is going to want
it resolved synchronously or asynchronously.
(soup_address_resolve_async): Renamed from soup_address_resolve.
(soup_address_resolve_sync): New routine to do blocking
synchronous DNS.
* libsoup/soup-socket.c (soup_socket_connect): Now returns a
status value directly when connecting synchronously.
(soup_socket_client_new_async, soup_socket_client_new_sync):
Separate async/sync client socket functions.
(soup_socket_get_iochannel): Made static since it was not used
outside soup-socket.
* libsoup/soup-connection.c (soup_connection_new,
soup_connection_new_proxy, soup_connection_new_tunnel): Just set
up the data, don't actually start connecting.
(soup_connection_connect_async, soup_connection_connect_sync): New
async and sync SoupConnection connecting routines.
(soup_connection_get_socket): Remove this since it wasn't being
used.
* libsoup/soup-session.c (final_finished): Run the queue since a
connection is now freed up.
(run_queue): Update for soup_connection_new* changes.
* libsoup/soup-misc.c (soup_substring_index): Remove, since it
wasn't being used any more.
* libsoup/soup-private.h: Remove some prototypes for functions
that no longer exist.
* libsoup/soup-uri.c (soup_uri_copy_root): New utility function
(copies the protocol, host, and port of a SoupUri).
* tests/auth-test.c:
* tests/get.c:
* tests/simple-proxy.c: belatedly update for soup-session change
* tests/revserver.c: Handle each new connection in its own thread,
using synchronous SoupSocket calls.
2003-09-05 Dan Winship <danw@ximian.com>
* libsoup/soup-session.c: Move a bunch of logic here from
soup-context. Now the session keeps track of hosts (instead of
having a global soup_hosts hash) and their connections.
(soup_session_new_with_proxy, soup_session_new_full): New session
constructors to specify a proxy or a proxy and connection limits
(send_request): Add Authorization and Proxy-Authorization headers
before sending off the request.
(soup_session_queue_message, et al): Improve the way this works.
There's no need to use timeouts to wait for connections to become
free; we *know* when they become free.
* libsoup/soup-private.h: Remove SoupHost and some other
no-longer-used stuff.
* libsoup/soup-misc.c (soup_set_proxy, soup_get_proxy,
soup_set_connection_limit, soup_set_connection_limit): Gone. These
are all per-session now.
* libsoup/soup-message.c: Remove all SoupContext references
(mostly replaced with SoupUri references)
(cleanup_message): priv->connect_tag and priv->connection are gone
now, so this was just soup_message_io_cancel(). So remove
cleanup_message and replace it with that everywhere.
(soup_message_disconnect): Gone.
(soup_message_set_uri): Replaces soup_message_set_context.
(soup_message_set_connection, soup_message_get_connection): Gone
* libsoup/soup-message-server-io.c (parse_request_headers):
s/soup_message_set_context/soup_message_set_uri/
* libsoup/soup-message-private.h (SoupMessagePrivate): Remove
connect_tag, context, and connection.
* libsoup/soup-message-client-io.c (encode_http_auth): Gone.
* libsoup/soup-context.c: Gone
* tests/auth-test.c (identify_auth): update for session/context
changes
2003-09-03 Dan Winship <danw@ximian.com>
* libsoup/soup-status.h: Renamed from soup-error.h, with types
and defines renamed accordingly.
* libsoup/soup-message.h (SoupMessage): Rename errorcode to
status_code and errorphrase to reason_phrase. Remove errorclass.
(SOUP_MESSAGE_IS_ERROR): Remove this. You can't classify redirects
as being either "errors" or "not errors", so its semantics are
guaranteed to be wrong sometimes.
* libsoup/soup-message.c (soup_message_set_status,
soup_message_set_status_full): Renamed
* libsoup/soup-message-handlers.c
(soup_message_add_status_code_handler,
soup_message_add_status_class_handler): Rename.
* libsoup/soup-session.c (soup_session_send_message): Make this
return a status code rather than a status class.
* libsoup/soup-message-private.h (SoupMessagePrivate): Remove some
unrelated unused fields (retries, callback, user_data).
* ...: Updates
2003-09-02 Dan Winship <danw@ximian.com>
* libsoup/soup-session.c: First draft at the new object to
maintain formerly-global state. (Not yet complete; still need to
get rid of SoupContext).
* libsoup/soup-message-queue.c: Data structure used by SoupSession
* libsoup/soup-queue.c: Gone. Mostly moved into soup-session, but
some bits went into soup-connection.
* libsoup/soup-connection.c (soup_connection_send_request): New,
to send a request on a connection. The connection updates its
internal state and then hands off to soup_message_send_request.
(request_done): Callback set up by soup_connection_send_request.
Marks the connection as no-longer-in-use, and disconnects it if
the message says to.
(soup_connection_set_in_use, soup_connection_mark_old): No longer
needed; the connection takes care of this itself now.
(soup_connection_new_proxy): New, to create a new connection that
is explicitly marked as being through an HTTP proxy.
(soup_connection_new_tunnel): New, to create a new HTTPS
connection through a proxy. (Includes the code to send the
CONNECT.)
* libsoup/soup-context.c (try_existing_connections): Don't need to
call soup_connection_set_in_use.
(try_create_connection): Use soup_connection_new,
soup_connection_new_proxy, or soup_connection_new_tunnel as
appropriate.
* libsoup/soup-message.c (soup_message_prepare): Replaces
queue_message.
(soup_message_queue, soup_message_requeue, soup_message_prepare):
Gone. This must be done via a SoupSession now.
(soup_message_set_connection): don't need to mark in_use/not
in_use. Also, msg->priv->socket is gone now.
(soup_message_get_socket): Gone.
* libsoup/soup-message-handlers.c (soup_message_run_handlers):
Remove references to global handlers.
(redirect_handler, authorize_handler): Moved to soup-session.c.
* libsoup/soup-misc.c (soup_shutdown): Gone; just unref the
session to shut down now.
* libsoup/soup.h: add soup-session.h
* libsoup/Makefile.am: updates
* tests/auth-test.c, tests/get.c, tests/simple-proxy.c: Use
SoupSession.
2003-08-29 Dan Winship <danw@ximian.com>
* libsoup/soup-message-io.c: Major rewrite. There is now only a
single IO state object (instead of one for reading and one for
writing), and the IO code handles switching back and forth between
reading and writing as appropriate (including handling the extra
switches needed for "Expect: 100-continue").
(soup_message_io_client, soup_message_io_server): The new entry
points.
(soup_message_io_cancel): If the caller cancels the IO when we
were expecting to read more data, disconnect the socket.
* libsoup/soup-message.h (SoupMessageFlags): add
SOUP_MESSAGE_EXPECT_CONTINUE, to indicate that the IO code should
do the special expect-continue handling.
* libsoup/soup-message.c: Move all the signal stuff here. Remove
the "done_reading" and "done_writing" signals and replace them
with a single "finished" signal. (A single signal. Say that 10
times fast!)
(soup_message_got_headers, etc): Functions to emit signals.
(got_headers, got_chunk, got_body): Default signal methods that
call soup_message_run_handlers.
(finished): Default signal method that replaces
soup_message_issue_callback.
([various]): s/soup_message_issue_callback/soup_message_finished/
(soup_message_requeue): There's no soup_message_set_read_callbacks
any more, so if the caller requeues while it's still reading, just
cancel the read.
(soup_message_add_chunk, soup_message_add_final_chunk,
soup_message_pop_chunk): Moved here from soup-server-message,
although we don't actually quite support using chunked encoding
for requests yet.
* libsoup/soup-server-message.c (soup_server_message_new): No
longer takes a socket argument.
(soup_server_message_add_chunk, soup_server_message_get_chunk):
Moved into SoupMessage.
* libsoup/soup-message-handlers.c (global_handlers): Make these
POST_BODY rather than PRE_BODY, so they won't mess up the IO
channel when the requeue the message.
(soup_message_run_handlers): Don't need to issue the message
callback from here any more.
(authorize_handler): Just leave the error as 401 or 407 (see
soup-error.h change)
* libsoup/soup-message-client-io.c (soup_message_send_request):
Replaces soup_message_write_request and
soup_message_read_response.
* libsoup/soup-message-server-io.c: Parallel to
soup-message-client-io.c, this defines the server-side header
handling.
(soup_message_read_request): Its entry point.
* libsoup/soup-server.c: Lots of code moved into
soup-message-server-io.c. Update for other changes.
* libsoup/soup-queue.c: Update for changes
* libsoup/soup-socket.c (read_from_network, soup_socket_write):
Don't call soup_socket_disconnect() on an error, just return
SOUP_SOCKET_ERROR. Otherwise soup_socket_disconnect() could emit
signals that will mess up the caller of the read/write function.
* libsoup/soup-connection.c (soup_connection_disconnect): When
disconnecting the socket, disconnect from its signals first to
prevent bad reentrancy.
* libsoup/soup-error.h: Kill off SOUP_ERROR_CANT_AUTHENTICATE and
SOUP_ERROR_CANT_AUTHENTICATE_PROXY, since they don't really say
anything that SOUP_ERROR_UNATHORIZED and
SOUP_ERROR_PROXY_UNAUTHORIZED don't say. (And now, all of the
"transport" errors actually are transport-related.)
* tests/auth-test.c (main): s/CANT_AUTHENTICATE/UNAUTHORIZED/
* tests/simple-proxy.c: Complicate this a bunch. In particular,
use SOUP_MESSAGE_OVERWRITE_CHUNKS and the GOT_CHUNK signal, and
pass the data back to the client in chunked format.
2003-08-27 Dan Winship <danw@ximian.com>
* libsoup/soup-types.h: New header with typedefs, to avoid
#include loops among other headers.
* libsoup/Makefile.am (libsoupinclude_HEADERS): add it
* libsoup/*.[ch], tests/*.c: Update for soup-types.h
2003-08-26 Dan Winship <danw@ximian.com>
* libsoup/soup-message-client-io.c (soup_message_write_request,
soup_message_read_response): Higher-than-soup-message-io-level
functions to do client-side IO. (Code that used to be in
soup-queue.c)
(get_request_header_cb): Fix a bug in the generation of the Host:
header; need to include the port number if it's not the default.
* libsoup/soup-message-io.c (soup_message_write,
soup_message_write_simple): Take separate user_datas for the get_*
callbacks and the done callbacks.
* libsoup/soup-queue.c: Update to use soup_message_write_request
and soup_message_read_response.
* libsoup/soup-connection.c (soup_connection_new): Change the
prototype to take a SoupUri and a callback.
* libsoup/soup-context.c (try_create_connection,
soup_context_connect_cb): Update for soup_connection_new change.
* libsoup/soup-server.c (read_done_cb, issue_bad_request): Update
for soup_message_write changes
* libsoup/soup-uri.c (soup_uri_uses_default_port): new utility
function
2003-08-26 Dan Winship <danw@ximian.com>
* libsoup/soup-message-private.h: Define SoupMessage signal stuff
(READ_HEADERS, READ_CHUNK, READ_BODY, READ_ERROR, WROTE_HEADERS,
WROTE_CHUNK, WROTE_BODY, WRITE_ERROR).
* libsoup/soup-message.c (class_init): set up signals
(requeue_read_finished): Update for changes.
* libsoup/soup-message-io.c (soup_message_read): Split out
parse_headers_cb from read_headers_cb. Also add a SoupDataBuffer *
arg to say where to store the message body. Set up
read_headers_cb, read_chunk_cb, read_body_cb, and error_cb as
signal handlers.
(do_read): Call r->parse_headers_cb, then emit READ_HEADERS
(read_body_chunk): emit READ_CHUNK.
(issue_final_callback): Set r->body. emit READ_BODY.
(failed_read): emit READ_ERROR.
(soup_message_read_set_callbacks): Disconnect old signal handlers,
connect new ones.
(soup_message_read_cancel): Disconnect signal handlers.
(soup_message_write, soup_message_write_simple): Set up
wrote_body_cb and error_cb as signal handlers.
(do_write): emit WROTE_HEADERS and WROTE_CHUNK, even though
nothing currently ever listens for them. emit WROTE_BODY when
done.
(failed_write): emit WRITE_ERROR
* libsoup/soup-queue.c (soup_queue_parse_headers_cb,
soup_queue_read_headers_cb): Split this into two unequal chunks.
(read_header_cb only runs the pre-body handlers).
(soup_queue_read_chunk_cb, soup_queue_read_done_cb): Update
prototypes.
(soup_queue_write_done_cb): Update call to soup_message_read
* libsoup/soup-server.c (parse_headers_cb): Renamed from
read_headers_cb
(read_done_cb): Update prototype
(start_request): Update soup_message_read call.
2003-08-25 Dan Winship <danw@ximian.com>
* libsoup/soup-message-io.c (soup_message_read,
soup_message_write, soup_message_write_simple): Add a "user_data"
arg, pass it to the callbacks.
* libsoup/soup-message.c (soup_message_requeue,
requeue_read_finished, requeue_read_error): Update for that
* libsoup/soup-queue.c: Likewise
* libsoup/soup-server.c: Likewise
2003-08-25 Dan Winship <danw@ximian.com>
* libsoup/soup-message.c (soup_message_new): Take a uri string
instead of a context. Also, swap the args (so the method comes
before the URI, just like in the protocol).
(soup_message_new_from_uri): Like soup_messgae_new, but takes a
SoupUri instead of a string
(soup_message_set_request, soup_message_set_response): Replace
soup_message_new_full.
(cleanup_message): Was soup_message_cleanup, but is static now.
(queue_message): Do the pre-queuing message cleanup here instead
of in soup_queue_message.
(soup_message_queue): Set the callback and user_data, then call
queue_message.
(requeue_read_error, requeue_read_finished, soup_message_requeue):
Use queue_message
(soup_message_get_uri): Replaces soup_message_get_context.
* libsoup/soup-message.h (SoupMessage): Remove msg->context. (It's
part of SoupMessagePrivate now)
* libsoup/soup-context.c: #include soup-message-private
(soup_context_from_uri): constify the uri arg.
* libsoup/soup-queue.c: Various context/uri fixes
(proxy_https_connect): Use soup_message_new_from_uri.
(soup_queue_message): Drastically simplified since most of the
work is in soup-messsage.c:queue_message() now
* libsoup/soup-auth-digest.c (compute_response,
get_authorization): Use soup_message_get_uri.
* libsoup/soup-server-auth.c (parse_digest): Likewise
* libsoup/soup-server.c (call_handler): Likewise
* tests/simple-httpd.c (server_callback): Likewise.
* tests/simple-proxy.c (server_callback): Likewise
* tests/get.c (got_url): Likewise.
(get_url): Update soup_message_new usage.
* tests/auth-test.c: #include soup-message-private. Update for
context changes and soup_message_new change.
2003-08-22 Dan Winship <danw@ximian.com>
* libsoup/soup-message-private.h: New file containing
SoupMessagePrivate and some other soup-message-internal
types/functions. Also includes the new, expanded SoupMessageStatus
enum.
* libsoup/soup-message-io.c: Replaces what used to be in
soup-transfer, but now all the interfaces take SoupMessages
instead of SoupReader/SoupWriter and deal with maintaining
msg->priv->{read,write}_state themselves. Fixes up all the
refcounting madness.
* libsoup/soup-message-handlers.c: Move the handler code here,
mostly unchanged. (But rename SoupHandlerType to SoupHandlerPhase
to make the distinction from SoupHandlerKind clearer.)
* libsoup/soup-message.c: Update for soup-message-io and new
SoupMessageStatus values. Remove handler code.
(soup_message_cleanup): Remove the hack to try to preserve the
connection if the message gets cleaned up before it finishes
reading. soup_message_requeue handles this in the requeuing case,
and there's no especially compelling reason to bother doing it in
any other case. (And the soup-message-io api doesn't support
having a read operation that's not connected to any message.)
* libsoup/soup-private.h: remove SoupMessagePrivate
* libsoup/soup-queue.c: Update for soup-message-io and new
SoupMessageStatus values.
* libsoup/soup-server-message.c: Likewise
* libsoup/soup-server.c: Likewise
* libsoup/soup-transfer.c: Gone (yay)
* libsoup/Makefile.am (libsoup_2_2_la_SOURCES): update
2003-08-20 Dan Winship <danw@ximian.com>
* libsoup/soup-message.c: Make this a GObject. (Note that since
SoupMessage was not refcounted before, it's not really refcounted
now either. TBF)
(soup_message_free): Gone, replaced by g_object_unref
(soup_message_copy, soup_message_foreach_remove_header): Remove
these, since neither was currently functional.
(soup_message_is_keepalive): New utility function to look at
HTTP version and request/response headers to decide if a message
indicates the connection should be kept alive.
(soup_message_set_connection, soup_message_get_connection): New
(soup_message_get_socket): New
* libsoup/soup-server-message.c: Make this a subclass of
SoupMessage.
(soup_server_message_new): Now takes a SoupServer and SoupSocket
(soup_server_message_get_server): New
(soup_server_message_set_encoding,
soup_server_message_get_encoding): Get/set whether the message
should be sent with content-length or chunked encoding
(soup_server_message_is_started, soup_server_message_is_finished):
Private member accessors.
(soup_server_message_add_chunk): Renamed from add_data
(soup_server_message_get_chunk): Pops a chunk from the list.
(soup_server_message_get_source): Gone
* libsoup/soup-server.c: Update for SoupServerMessage changes.
(error_cb, write_done_cb): All the cleanup stuff that used to be
here happens automatically by unreffing the message now.
(get_response_header): Remove some erroneous leftover CGI stuff
(issue_bad_request): add "Connection: close" to the response.
(read_headers_cb): clean this up a bit. Reject HTTP/1.1 messages
with no Host header as per RFC 2616.
* libsoup/soup-connection.c (soup_connection_start_ssl): Gone
(soup_connection_set_in_use): Let the caller set the connection to
"not in use" even after the socket has been disconnected.
* libsoup/soup-context.c: Use soup_message_get_connection
* libsoup/soup-headers.c (soup_headers_parse_request): Remove the
check on request length, since it was rejecting
"GET / HTTP/1.0\r\n\r\n", which is a valid complete request.
* libsoup/soup-queue.c: Use soup_message_get_connection and
soup_message_get_socket.
(soup_queue_read_done_cb): Use soup_message_is_keepalive
(proxy_https_connect_cb): Use soup_socket_start_ssl rather than
soup_connection_start_ssl
* libsoup/soup-socket.c (finalize): disconnect the GIOChannel
handlers if the socket hasn't been disconnected yet.
* libsoup/soup-transfer.c (soup_reader_read_body_chunk,
reader_read): Fix these so that reader_read will exit properly if
the read is cancelled.
* tests/auth-test.c (main): s/soup_message_free/g_object_unref/
* tests/simple-httpd.c (server_callback): set the message to
content-length encoding.
* tests/simple-proxy.c (server_callback): Likewise
2003-08-19 Dan Winship <danw@ximian.com>
* libsoup/soup-socket.c (soup_socket_read,
soup_socket_read_until, soup_socket_write): New API for doing
socket IO. Works both synchronously and asynchronously, and
buffers data to prevent the "100 Continue" problem.
(soup_socket_set_flag): Replaces formerly-private
soup_set_sockopts. (primarily to let the caller turn off
SOUP_SOCKET_FLAG_NONBLOCKING).
* libsoup/soup-transfer.c (soup_transfer_read,
soup_transfer_write, soup_transfer_write_simple): Take a
SoupSocket instead of a GIOChannel. Use the new socket IO api.
Changed the prototypes of some of the callbacks to be less
hackish.
* libsoup/soup-connection.c (soup_connection_get_socket): Replaces
soup_connection_get_iochannel.
* libsoup/soup-message.c: Fix up for soup-transfer changes
* libsoup/soup-queue.c: Likewise
* libsoup/soup-server.c: Likewise
* tests/revserver.c: A slightly more complicated replacement for
timeserver. (Does both reads and writes)
2003-08-19 Dan Winship <danw@ximian.com>
* libsoup/soup-socks.[ch]: Remove this. RC doesn't let you
configure it, and no one has complained, and it looks like the
SOCKS5 auth code doesn't actually work anyway...
* libsoup/soup-queue.c (proxy_connect): Remove SOCKS code.
* libsoup/soup-uri.h: Remove SOUP_PROTOCOL_SOCKS4 and
SOUP_PROTOCOL_SOCKS5
* libsoup/soup-misc.c: Remove a references to SOCKS in a comment
* libsoup/Makefile.am (libsoup_2_2_la_SOURCES): remove
soup-socks.[ch]
2003-08-19 Dan Winship <danw@ximian.com>
* libsoup/soup-server.c: Make this a GObject. Remove
SoupServerMessage code (to soup-server-message.c). Remove CGI
server code (for now?)
(soup_server_add_handler, soup_server_remove_handler): Rename
(from register/unregister) to make it clearer what they do.
* libsoup/soup-server-message.c: Moved out of soup-server.c
* libsoup/soup-private.h: Remove SoupServer def
* libsoup/Makefile.am (libsoupinclude_HEADERS,
libsoup_2_2_la_SOURCES): add soup-server-message.[ch]
* tests/simple-httpd.c:
* tests/simple-proxy.c: Update for SoupServer changes
2003-08-18 Dan Winship <danw@ximian.com>
* libsoup/soup-address.c (SoupAddressPrivate): Make this more like
a struct sockaddr again (like it used to be). In particular, add
back the "port" field. Add a bunch of macros to try (and fail) to
simplify some of the code.
(soup_address_new): Now returns a SoupAddress directly rather than
a random handle, and the caller can just use g_object_unref to
cancel the lookup. Also, the callback now uses a
SoupKnownErrorCode rather than a special-purpose address-lookup
error code.
(soup_address_new_cancel): No longer needed.
(soup_address_new_sync): Removed
(soup_address_new_any): Replaces soup_address_ipv4_any and
soup_address_ipv6_any.
(soup_address_get_name, etc): Gone. Use soup_address_resolve()
now.
(soup_address_get_physical): Renamed from
soup_address_get_canonical_name.
(soup_address_get_sockaddr): Replaces soup_address_make_sockaddr()
* libsoup/soup-socket.c: Update for SoupAddress changes and make
similar changes here.
(soup_socket_new): Just creates a generic SoupSocket now.
(soup_socket_connect): Client setup
(soup_socket_listen): Server setup. Now also sets up an iochannel
listening for connects and emits a "new_connection" signal as they
come in.
(soup_socket_start_ssl): Turns on SSL.
(soup_socket_client_new, soup_socket_server_new): Utility
functions that wrap the above.
(soup_socket_new_cancel, soup_socket_new_sync): Gone
(soup_socket_server_accept, soup_socket_server_try_accept): No
longer needed.
(soup_socket_get_iochannel): No longer adds a ref when returning
the iochannel. Also, we set it to "close_on_unref" so that if a
caller adds a ref to it, the connection will actually remain open
even after the SoupSocket is destroyed.
(soup_socket_get_local_address, soup_socket_get_remote_address):
Let the caller get both of these.
* libsoup/soup-connection.c: Don't keep a private copy of the
socket's iochannel.
(soup_connection_new): Don't need to set socket options here.
SoupSocket does it.
(soup_connection_start_ssl): Just call soup_socket_start_ssl.
(soup_connection_get_iochannel): Just return the socket's
iochannel (and don't ref it)
* libsoup/soup-error.c: add SOUP_ERROR_CANT_RESOLVE and
SOUP_ERROR_CANT_RESOLVE_PROXY
* libsoup/soup-dns.c (soup_ntop): Make the address arg const.
Remove the "FIXME add a CANT_RESOLVE error" and return
SOUP_ERROR_CANT_RESOLVE instead.
* libsoup/soup-server.c: Update for socket/address changes. Don't
poke into SoupSocket's private fields.
(soup_server_run_async): Just connect to the socket's
"new_connection" signal.
* libsoup/soup-context.c (try_create_connection,
soup_context_connect_cb): Update for socket changes. Replace
SOUP_CONNECT_ERROR codes with plain SOUP_ERROR codes.
* libsoup/soup-misc.c (soup_signal_connect_once): Utility function
to connect to a signal handler and connect another function to
clean up the first signal handler after its first invocation.
(Lets us use signals to replace one-off callbacks.)
* libsoup/soup-private.h: Remove SoupSocketPrivate since it is
actually private now.
(struct _SoupServer): Remove accept_tag.
* libsoup/soup-queue.c (soup_queue_read_done_cb, start_request):
Don't unref the iochannel.
(soup_queue_connect_cb): Takes a SoupKnownErrorCode now.
* libsoup/soup-socks.c: Update for socket/address changes
* tests/simple-httpd.c (main):
s/SOUP_SERVER_ANY_PORT/SOUP_ADDRESS_ANY_PORT/
* tests/simple-proxy.c (main): Likewise
* tests/timeserver.c: Update for SoupSocket's "new_connection"
signal, and for SoupAddress changes.
2003-08-14 Dan Winship <danw@ximian.com>
* libsoup/soup-connection.c: New, split out from soup-context and
made into a GObject.
(soup_connection_disconnect): Disconnects the connection and emits
a signal. (Replaces the old "keep_alive" flag.)
(soup_connection_is_connected): Checks if the connection is still
connected
(connection_died): Just disconnect, rather than freeing the
connection. This way if anyone else is still referencing it they
won't end up with an invalid pointer.
* libsoup/soup-context.c: Make this a GObject, remove all the
SoupConnection code. Add an "ntlm_auths" field to SoupHost so that
SoupContext can keep track of connection auth stuff there without
SoupConnection needing to care. Various other updates.
* libsoup/soup-private.h: Remove SoupContext and SoupConnection
definitions.
* libsoup/*.c, tests/get.c: Update for context/connection changes
* libsoup/soup-socks.c (soup_connect_socks_proxy): Change the
definition to deal with the fact that there's no
soup_connection_get_context any more.
* libsoup/soup-queue.c (soup_queue_read_headers_cb): Don't deal
with connection persistence here.
(soup_queue_read_done_cb): Do it here instead. Disconnect the
connection when appropriate.
(proxy_connect, proxy_https_connect, proxy_https_connect_cb):
Reference-count the connection properly. (I think.)
* libsoup/soup-marshal.list: New, for SoupConnection's
"disconnected" signal.
* libsoup/Makefile.am: add rules to build soup-marshal.[ch]
* configure.in: Use AM_PATH_GLIB_2 rather than pkg-config, so that
GLIB_GENMARSHAL gets set too.
2003-08-14 Dan Winship <danw@ximian.com>
* libsoup/soup-error.c: Fix a spelling mistake.
* libsoup/*.c: Fix use of @/%/#/() in gtk-doc comments
2003-08-12 Dan Winship <danw@ximian.com>
* libsoup/soup-auth.c: Make this an abstract GObject. Tweak some
of the interfaces around a little bit.
* libsoup/soup-auth-basic.c: subclass for Basic auth
* libsoup/soup-auth-digest.c: subclass for Digest auth
* libsoup/soup-auth-ntlm.c: subclass for NTLM auth. Move all of
the code from soup-ntlm.c here, and make it private.
* libsoup/soup-ntlm.c: gone
* libsoup/soup-misc.h: Remove the definition of SoupAuthType from
here, and change the signature of SoupAuthorizeFn.
* libsoup/soup-context.c: Use g_object_unref to free auths, use
methods instead of directly access private fields.
* libsoup/soup-queue.c: Likewise
* libsoup/soup-server-auth.c (soup_server_auth_free): Remove all
NTLM references. We have no plans to implement server-side NTLM
auth.
* tests/auth-test.c (identify_auth): Update for auth api changes
2003-08-12 Dan Winship <danw@ximian.com>
* configure.in (GLIB): add gobject-2.0 to the PKG_CHECK_MODULES
call
* libsoup/soup-address.c: Make this a GObject.
(soup_address_ref, soup_address_unref): Gone.
(soup_address_copy): Gone. Wasn't being used anyway.
* libsoup/soup-dns.c: Move all of the DNS code and caching stuff
here from soup-address.c, so that soup-address doesn't need to
worry about trying to cache zero-ref addresses.
* libsoup/soup-socket.c: Make this a GObject. Use "guint"
consistently for port numbers.
(soup_socket_ref, soup_socket_unref): Gone.
* libsoup/soup-private.h: Change the SoupSocket definition to be
SoupSocketPrivate. (Still need to keep this here since soup-server
pokes around in its internals.)
(SOUP_MAKE_TYPE): Copied from gal's E_MAKE_TYPE.
* libsoup/soup-server.c (read_done_cb, write_done_cb): Unref the
reader/writer rather than leaking them.
* libsoup/*: Use GObject methods for socket/address refcounting
* tests/auth-test.c (main)
* tests/timeserver.c (main): Call g_type_init.
* tests/get.c (main): Call g_type_init.
(get_url, got_url): Fix some bugs that could make -r mode get into
infinite loops downloading the same files over and over. Plug some
memory leaks to make this more useful for valgrinding libsoup.
* tests/simple-httpd.c (main): Call g_type_init. Set up a signal
handler for SIGINT so we can exit cleanly, since valgrind won't
give a leak report if you don't. Plug a few memory leaks.
* tests/simple-proxy.c (main): Likewise
2003-08-12 Dan Winship <danw@ximian.com>
Pull over some new test programs from the soup-refactoring branch,
along with the SoupUri changes they depend on.
* tests/simple-httpd.c: A really simple HTTP server, to test the
server code.
* tests/simple-proxy.c: An even simpler HTTP proxy
* tests/get.c: Add "-r" flag to recursively get files (thereby
testing multiple-connections-at-once code). Also good for setting
up a tree to use with simple-httpd.
* tests/timeserver.c (main): Fix a bug. (s/ipv6/ipv4/ in the
normal case)
* tests/uri-parsing.c: Regression test for the new soup-uri.c
* libsoup/soup-uri.c: Rewrite/update to conform to RFC 2396, and
pull in some optimizations from camel-url. Also, make SoupProtocol
a GQuark so we can still compare them with ==, but we can also
recognize any protocol.
(soup_uri_new_with_base): New, to merge base and relative URIs
(soup_uri_to_string): Update this. Change the "show_password" flag
(which we always passed FALSE for) to "just_path", for places that
want the path+query without the protocol, host, etc.
* libsoup/soup-queue.c (soup_get_request_header): Just use
soup_uri_to_string to generate the request URI.
* libsoup/soup-auth.c (compute_response, digest_auth_func): Use
"soup_uri_to_path (uri, TRUE)" rather than trying to reassemble
the URI by hand badly.
* libsoup/soup-server-auth.c (parse_digest): Likewise
* libsoup/soup-socks.c (soup_connect_socks_proxy): Change a
switch() to an series of if()s since SOUP_PROTOCOL_* aren't
constants any more.
* libsoup/soup-context.c (soup_context_uri_hash,
soup_context_uri_equal): s/querystring/query/
2003-08-12 Dan Winship <danw@ximian.com>
* configure.in: Bump API version to 2.2 and package version to
2.1.0. Remove NSS and OpenSSL checks and proxy-related config. Use
libgnutls-config to find GNUTLS.
* libsoup-2.2.pc.in: Update, and rename from soup-2.0.pc
* Makefile.am: Update for pc file rename
* libsoup/Makefile.am: s/2.0/2.2/ everywhere. Remove NSS, OpenSSL,
and libsoup-ssl-proxy stuff.
* libsoup/soup-ssl-proxy.c
* libsoup/soup-nss.[ch]
* libsoup/soup-openssl.[ch]: gone
* libsoup/soup-ssl.c: remove NSS and OpenSSL bits
* tests/Makefile.am (get_LDADD, timeserver_LDADD,
auth_test_LDADD): Update libsoup version
2003-08-07 Dan Winship <danw@ximian.com>
* libsoup/soup-auth.c (soup_auth_lookup, soup_auth_set_context,
soup_auth_invalidate): These are all really SoupContext functions,
so move them to soup-context.c (and rename them appropriately).
(soup_auth_get_protection_space): New method to get the
"protection space" of an auth (paths where it is valid).
(soup_auth_invalidate): New method to try to un-authenticate an
auth (so we can keep the domain info cached even if the auth info
is wrong).
(basic_pspace_func): Basic protection space is all directories
below the current one.
(basic_invalidate_func): Clear the encoded username/password
(digest_pspace_func): Digest protection space is either the whole
server, or "what the domain parameter says" (though we don't deal
with cross-host domains).
(digest_invalidate_func): Return FALSE; bad digest auth info isn't
cacheable.
(digest_parse_func, digest_free): Set/free domain parameter
(ntlm_pspace): NTLM protection space is always the whole server.
(ntlm_invalidate): Clear the auth state.
(soup_auth_new_ntlm): Make this non-static
(SoupAuth): Replace the quad-state "status" field with an
"authenticated" boolean.
* libsoup/soup-private.h (SoupHost): Replace the "valid_auths"
hash with separate "auth_realms" (path->realm) and "auths"
(realm->auth) hashes. Also add a "use_ntlm" flag.
* libsoup/soup-context.c (soup_context_unref): Update SoupHost
freeing code.
(connection_free): Don't the connection's auth, just free it.
(soup_context_lookup_auth): Formerly soup_auth_lookup, but now
does two-stage lookup (path->realm then realm->auth) and also
deals with NTLM hacks.
(soup_context_update_auth): Mostly formerly soup_auth_set_context,
but also large parts of authorize_handler. Updates the auth hashes
based on information from a 401 or 407 response. Does a better job
than authorize_handler did of not throwing away good information.
(soup_context_preauthenticate): New; fakes up auth info so that
requests will end up using authentication without the server
needing to return an error first.
(soup_context_authenticate_auth): Moved out of authorize_handler
so it can be used at request-sending time too, if we know that we
need it. (That way we can avoid requeuing the request if it isn't
going to be able to be authenticated.)
(soup_context_invalidate_auth): Sort of like the old
soup_auth_invalidate, but only destroys the auth data, while still
remembering the path->realm mapping.
* libsoup/soup-message.c (authorize_handler): Mostly moved into
soup_context_update_auth.
(maybe_validate_auth): Remove this; it was only useful because of
bugs elsewhere in the auth handling.
* libsoup/soup-queue.c (soup_encode_http_auth): Update for
soup_context_lookup_auth. If the returned auth isn't
authenticated, call soup_context_authenticate_auth() on it.
* tests/auth-test.c: New (from soup-refactoring branch). Tests
that the Basic/Digest auth code does the right thing. (TODO: find
a good way to add NTLM tests too.)
* tests/Makefile.am (check_PROGRAMS): add auth-test
2003-07-29 Dan Winship <danw@ximian.com>
* configure.in: 1.99.25 ("Potato and Leek Soup")
* libsoup/soup-message.c (requeue_read_finished,
release_connection): Free the passed-in body data. Otherwise the
response body ends up getting leaked on most 3xx and 4xx
responses.
(soup_message_cleanup): Remove a piece of code that didn't
actually do anything and its associated confused comment.
* libsoup/soup-auth.c (ntlm_free): plug an occasional NTLM auth leak
* libsoup/soup-context.c (connection_free): plug a non-occasional
NTLM auth leak.
2003-06-26 Joe Shaw <joe@ximian.com>
* configure.in: Version 1.99.24
2003-06-24 Dan Winship <danw@ximian.com>
* configure.in: Check pkgconfig for openssl, since 0.9.7 (a) uses
it, and (b) depends on lots of new things sometimes (like on RH9).
* libsoup/soup-openssl.c:
* libsoup/soup-ssl-proxy.c: Change #ifdef HAVE_OPENSSL_SSL_H to
just #ifdef HAVE_OPENSSL since the header check doesn't get run in
the pkgconfig case
2003-06-19 Dan Winship <danw@ximian.com>
* libsoup/soup-queue.c (soup_queue_read_done_cb): unref the
old read_tag before changing/clearing it.
(soup_queue_write_done_cb): Likewise with the write_tag.
* libsoup/soup-transfer.c (issue_final_callback): ref the reader
around the stop+callback.
(soup_transfer_write_cb): Likewise.
2003-06-12 Dan Winship <danw@ximian.com>
* libsoup/soup-transfer.c (SoupReader, SoupWriter): add a
ref_count field.
(soup_transfer_read, create_writer): Set initial ref_count to 2
(one for soup-transfer, one for the caller).
(soup_transfer_read_ref, soup_transfer_read_unref): ref/unref a
reader
(soup_transfer_read_stop): Clears the GIOChannel callbacks and
drops soup-transfer's ref.
(soup_transfer_read_cancel): Now just a stop+unref
(soup_transfer_write_ref, soup_transfer_write_unref,
soup_transfer_write_stop, soup_transfer_write_cancel): Similarly.
* libsoup/soup-message.c (soup_message_cleanup): when setting up
the "finish reading" callbacks, unref the reader so it will be
destroyed once it's done reading.
(soup_message_requeue): Likewise.
* libsoup/soup-queue.c (soup_queue_read_headers_cb): Update for
prototype change (no longer returns a SoupTransferDone).
(soup_queue_read_chunk_cb): Likewise.
* libsoup/soup-server.c (read_headers_cb): Likewise
2003-06-11 Dan Winship <danw@ximian.com>
* libsoup/soup-transfer.c: Change all functions to take a
SoupReader * or SoupWriter * instead of a guint.
* libsoup/soup-private.h (SoupMessagePrivate): make read_tag and
write_tag pointers instead of guints.
2003-06-02 Chris Toshok <toshok@ximian.com>
* libsoup/soup-ssl.c: remove #include for soup-nss.h
2003-06-02 Chris Toshok <toshok@ximian.com>
* libsoup/Makefile.am (INCLUDES): remove NSS_CFLAGS.
(libsoup_2_0_la_LIBADD): remove NSS_LIBS.
(libsoup_2_0_la_SOURCES): remove soup-nss.[ch]
2003-06-02 Chris Toshok <toshok@ximian.com>
* configure.in: Bump version to 1.99.23.
2003-05-30 Chris Toshok <toshok@ximian.com>
* libsoup/soup-queue.c (soup_queue_error_cb): always force a
reconnect when there's an error with ssl connection. This fixes
#43387, but it runs the risk of sending requests multiple times to
the exchange server, and it results in lots of shorter lived
connections and more forking (in the ssl proxy case), depending on
the length of the operation.
2003-05-21 Dan Winship <danw@ximian.com>
* configure.in: 1.99.22 (codename: French Onion Soup)
2003-05-20 Dan Winship <danw@ximian.com>
* libsoup/soup-message.c (soup_message_requeue): Clear the
write_tag as well so we don't double-cancel it. #43395.
* libsoup/soup-queue.c (soup_queue_error_cb): The connection might
be destroyed by the end of the func, so we have to call
soup_connection_set_used at the beginning.
* libsoup/soup-openssl.c (soup_openssl_read, soup_openssl_write):
Call g_set_error() so that we don't SEGV immediately after
returning G_IO_STATUS_ERROR.
2003-05-08 Joe Shaw <joe@ximian.com>
* configure.in: Bump version to 1.99.21
* libsoup/soup-queue.c (proxy_connect): If the proxy HTTPS
tunnelling fails, the other message which shares our same
connection will free it first, so set ours to NULL.
2003-05-08 Dan Winship <danw@ximian.com>
* libsoup/soup-auth.c (ntlm_auth): If the auth status is PENDING,
return an NTLM request string. Otherwise return the "response"
field (which should include the NTLM authenticate message)
(ntlm_init): Don't bother setting "response" to the NTLM request
string. Just leave it NULL in that case.
* libsoup/soup-message.c (authorize_handler): Never try to reuse
an NTLM auth returned from soup_auth_lookup. Only set the auth on
the connection when it's SOUP_AUTH_STATUS_SUCCESSFUL. Otherwise,
call soup_auth_set_context() on it just like for non-NTLM auth.
The net effect of all of this is that now we record when a context
needs NTLM auth just like with non-NTLM auth, so that that info
gets preserved across connections.
(soup_message_requeue): No longer need the hackery here to
preserve the connection auth state.
2003-05-07 Dan Winship <danw@ximian.com>
* libsoup/soup-context.c (soup_connection_set_in_use): New, to
toggle the connection's in_use flag, and set up the death watch
when it's not in use.
(connection_death): This is only hooked up when the connection is
not in use now, so don't need to check that. Should fix the
infinite connection_death loop.
(soup_connection_is_new): Keep a distinct "new" flag rather than
defining "new" as "has been released at least once".
(soup_connection_set_used): Mark a connection no-longer new.
(soup_context_connect_cb): Mark the connection as new. Don't set
up the death watch since it's in_use.
(try_existing_connections): Use soup_connection_set_in_use.
(soup_connection_release): Likewise
* libsoup/soup-message.c (requeue_read_finished): Call
soup_connection_set_used so that the connection isn't still
considered new when we send the message the second time.
* libsoup/soup-queue.c (soup_queue_error_cb): Call
soup_connection_set_used (assuming we don't close the connection)
(soup_queue_read_done_cb): Likewise.
* libsoup/soup-transfer.c (soup_transfer_read_cb): If we read
nothing, call soup_transfer_read_error_cb rather than just
cancelling, or else it will get cancelled again later.
2003-05-07 Dan Winship <danw@ximian.com>
* soup-2.0.pc.in (Libs): Don't put @OPENSSL_LIBS@ here; the
library doesn't depend on them, only the proxy does. #42473
2003-05-06 Dan Winship <danw@ximian.com>
* src/libsoup/soup-message.c (global_handlers): Change the
redirect handler to be a RESPONSE_ERROR_CLASS_HANDLER for
SOUP_ERROR_CLASS_REDIRECT rather than a RESPONSE_HEADER_HANDLER
for "Location" to get around the non-64-bit-clean union
initialization pointed out by Jeremy Katz <katzj@redhat.com>.
(redirect_handler): Update for that.
2003-04-28 Dan Winship <danw@ximian.com>
* configure.in: 1.99.20
* libsoup/soup-transfer.c (soup_transfer_read_error_cb): Make sure
we always call UNIGNORE_CANCEL. Might fix #41971
2003-04-25 Dan Winship <danw@ximian.com>
* libsoup/soup-queue.c (soup_queue_error_cb): if an old connection
suddenly gets an io error while reading or writing, assume it's a
timeout or something, close the connection, and requeue the
message.
2003-04-23 Dan Winship <danw@ximian.com>
* libsoup/soup-message.c (soup_message_cleanup): Don't set up the
soup-transfer callbacks to keep reading off the connection unless
we're actually going to keep the connection around afterward.
Otherwise we can just close it.
* libsoup/soup-transfer.c: Re-kludge the awful IGNORE_CANCEL
thingy so that it's possible to cancel a read from inside a
callback so that the above change actually works instead of just
crashing.
2003-04-20 Rodney Dawes <dobey@ximian.com>
* configure.in: Up version to 1.99.18
* libsoup/Makefile.am: Line separator after GNUTLS_CFLAGS
2003-04-11 Dan Winship <danw@ximian.com>
* libsoup/soup-context.c (soup_connection_purge_idle): New
function to close all idle connections. (Needed for #41117 or else
there's no way to force-discard NTLM authentication.)
* libsoup/soup-queue.c (soup_queue_shutdown): Use it
2003-04-10 Joe Shaw <joe@ximian.com>
* libsoup/soup-queue.c (proxy_https_connect):
proxy_https_connect_cb() might not get called if connecting to the
proxy fails, and it causes us to double-free the connection.
Always set the message's connection to NULL before freeing it.
2003-04-09 Dan Winship <danw@ximian.com>
* configure.in: 1.99.17
2003-04-07 Dan Winship <danw@ximian.com>
* libsoup/soup-context.c (connection_death): Revert Joe's changes.
We can't release the connection there because there may be
SoupMessages still pointing to it. (Needs to be revisited.)
2003-04-03 JP Rosevear <jpr@ximian.com>
* libsoup/soup-ssl.c (soup_ssl_hup_waitpid): guard against EINTR
error during waitpid
* libsoup/soup-address.c: ditto
2003-04-02 Joe Shaw <joe@ximian.com>
* libsoup/soup-context.c (connection_death): Only drop the
connection if we get an error condition on the channel. Fixes a
double-free.
2003-04-02 Joe Shaw <joe@ximian.com>
* libsoup/soup-context.c (connection_death): Just call
soup_connection_release() from here and return whether the
connection is in use.
2003-03-31 Ian Peters <itp@ximian.com>
* libsoup/soup-gnutls.c (soup_gnutls_close): loop on gnutls_bye in
case of EAGAIN or EINTR, since shutting down an SSL connection
requires more than just closing a socket.
2003-03-28 Dan Winship <danw@ximian.com>
* libsoup/soup-message.c (soup_message_set_context): If the new
context points to a different server from the old context, call
soup_message_cleanup. Otherwise it tries to reuse the old
connection...
2003-03-25 Joe Shaw <joe@ximian.com>
* configure.in: Bump up to 1.99.16
2003-03-24 Joe Shaw <joe@ximian.com>
* soup-error.[ch]: Add SOUP_ERROR_SSL_FAILED which gives a
slightly better error message on various SSL failures than the
previous message.
* soup-queue.c (soup_queue_error_cb): Throw the
SOUP_ERROR_SSL_FAILED error when we fail an SSL handshake.
2003-03-21 Joe Shaw <joe@ximian.com>
* soup-server.c: Use non-deprecated g_main_loop_* calls
throughout.
(soup_server_unref): Don't unref the main loop if it's NULL.
Fixes a glib warning.
2003-03-18 Dan Winship <danw@ximian.com>
* configure.in: comment out NSS checks. The NSS code doesn't work
and there are no current plans to fix it.
* README (Features): Mention GnuTLS, remove NSS and the rest of
the "Planned Features" section.
* MAINTAINERS: remove Alex
* libsoup/soup-openssl.c (soup_openssl_get_iochannel): Bump the
timeout to 10 seconds (and get rid of the 3 tries) so we don't
fail to connect just because the server is slow/far away.
2003-03-17 Joe Shaw <joe@ximian.com>
* configure.in: Bump up to 1.99.15.
2003-03-12 Ian Peters <itp@ximian.com>
* libsoup/soup-gnutls.c: because creating client credentials is
expensive, keep the same one around as long as possible, only
recreating it if the ssl_ca_file changes. Wrap
gnutls_certificate_credentials in a refcounted struct to avoid
freeing it while another established connection may potentially
need it (say, to rehandshake).
2003-03-11 Frank Belew <frb@ximian.com>
* soup-2.0.pc.in: add ssl libs to defaults, since ssl doesn't
use pkgconfig
2003-03-10 Joe Shaw <joe@ximian.com>
* configure.in: Bump up to 1.99.14.
* configure.in, libsoup/Makefile.am, libsoup/soup.gnutls.[ch],
libsoup/soup-ssl.c: Add support for GnuTLS. Patch from Ian
Peters.
2003-03-07 Joe Shaw <joe@ximian.com>
* configure.in: Bump up to 1.99.13.
* libsoup/soup-context.c (soup_context_connect_cb): Add G_IO_IN to
the list of conditions to watch. If the remote end hangs up the
connection, we'll get a successful read of 0 bytes, not a HUP.
The connection will have to be released by the point we check for
it in connection_death().
* libsoup/soup-queue.c (soup_queue_error_cb): Get rid of some
(apparently) errant resetting of the read and write tags. I think
this might have been causing some reentrancy and crashes.
* libsoup/soup-socket.c (soup_socket_get_iochannel): Set the IO
channel to NULL encoding and not buffered.
* libsoup/soup-transfer.c (soup_transfer_read_cb): Remove some
incorrect comments.
2003-02-28 Joe Shaw <joe@ximian.com>
* configure.in: Bump up to 1.99.12.
* libsoup/soup-transfer.c (soup_transfer_read_cb): We can get a
header_len of 0 and a total_read of 0 in the case of a SIGPIPE; in
this case we probably don't want to call the error callback, we
just want to act like our transfer was cancelled.
2003-02-27 Joe Shaw <joe@ximian.com>
Try to apply some order to the iochannel refcounting...
* configure.in: Bump up to 1.99.11.
* libsoup/soup-context.c (soup_connection_get_iochannel): The
connections needs to own a reference to the iochannel! If we're
using HTTPS, release the ref we get from soup_socket_get_iochannel
and replace it with the ref we get from soup_ssl_get_iochannel().
Then, always ref the channel that we return (ugh, but that's the
soup way).
(connection_free): Release the connection's ref to the iochannel.
* libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Ref the
iochannel. The reference we pass back will be owned by the
connection.
(soup_ssl_hup_waitpid): Release our ref.
2003-02-27 Joe Shaw <joe@ximian.com>
* configure.in: Bump up to 1.99.10.
* libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Ref the
iochannel, return to the status quo. Sigh.
2003-02-26 Joe Shaw <joe@ximian.com>
* configure.in: Bump up to 1.99.9.
* libsoup/soup-ssl.c (soup_ssl_hup_waitpid): Comment out the unref,
it's causing problems with HTTPS and proxies; the iochannel
refcounting is waaaaaay horked.
2003-02-26 Frank Belew <frb@ximian.com>
* libsoup/Makefile.am: added workaround to link ssl-proxy statically
2003-02-11 Joe Shaw <joe@ximian.com>
* configure.in: Bump up to 1.99.8 for snaps.
* libsoup/soup-address.c (soup_gethostbyname): Fix this for Solaris.
It returns the address to the resulting hostent or NULL on failure,
unlike Linux which returns an error code.
2003-02-11 Joe Shaw <joe@ximian.com>
* configure.in: Bump up to 1.99.7 for snaps.
* libsoup/soup-openssl.c (soup_openssl_get_iochannel): Print out
the error string from OpenSSL if we can't establish a connection.
2003-02-04 Joe Shaw <joe@ximian.com>
* configure.in: Bump up to 1.99.6 for snaps.
* libsoup/soup-server.c (destroy_message): We already assigned
chan, so don't reassign it, and unref it in all cases.
(issue_bad_request): Always unref after a call to
soup_socket_get_iochannel(), because it refs it.
(conn_accept): Fix some funky GIOChannel reffing here.
* libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Don't call
g_io_channel_ref() on the socket. This is the exact opposite of
what we want to do. Create a temporary structure containing the
parent pid and the old socket and unref the socket when our
callback is called. This should fix GIOChannels being leaked on
SSL connections.
* libsoup/soup-ssl-proxy.c: Always close the GIOChannels after the
main loop quits.
2003-01-22 Joe Shaw <joe@ximian.com>
* configure.in: Bump up to 1.99.5 for the snaps.
* libsoup/soup-address.c (soup_address_new): If we found the
address in our hash, we need to return NULL or else Soup will
think we're doing an async lookup and do some cancellation on
us. Besides, we were returning the wrong type anyway and it
was crashing things.
2003-01-17 Joe Shaw <joe@ximian.com>
* libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): It's not
uncommon for us to get a G_IO_ERROR_AGAIN when trying to write
out, so keep trying until we succeed.
2003-01-10 Joe Shaw <joe@ximian.com>
* libsoup/soup-openssl.c (verify_cb): Load some X509 and SSL error
strings and print out the error when the cert can't verify.
2003-01-09 Dan Winship <danw@ximian.com>
* libsoup/soup-address.c (soup_gethostbyname): Fix a memcpy
overrun noticed by valgrind
2002-12-20 Joe Shaw <joe@ximian.com>
* libsoup/soup-server.c (soup_server_new_with_host): Added.
Starts a server only on the interface specified, instead of all
network interfaces.
2002-12-16 Jeremy Katz <katzj@redhat.com>
* configure.in: use $libdir instead of /usr/lib when looking for
libraries
2002-12-11 Joe Shaw <joe@ximian.com>
* libsoup/soup-queue.c (proxy_https_connect_cb): I am an idiot.
Don't set a variable to NULL and then immediately try to
dereference it.
2002-12-09 Joe Shaw <joe@ximian.com>
* libsoup/soup-openssl.c (soup_openssl_get_iochannel): Put a
timeout on the select()s when we get SSL_ERROR_WANT_READ/WRITE so
we don't hang forever if we don't get more data.
* libsoup/soup-ssl-proxy.c (main): Don't set our fds to blocking
or else we'll hang forever in SSL_connect() if the other side
hangs up.
* libsoup/soup-queue.c (proxy_https_connect_cb): We never want to
release the connection on message free, even if the connection was
unsuccessful.
2002-12-03 Joe Shaw <joe@ximian.com>
* libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Call
g_io_channel_set_close_on_unref() on the second half of the socket
pair so we don't leak file descriptors.
2002-12-03 Frank Belew <frb@ximian.com>
* libsoup/soup-address.c: add signal.h to the list of headers to
pick up SIGKILL
2002-11-25 Joe Shaw <joe@ximian.com>
* Makefile.am: Build the tests directory again
2002-11-21 Rodney Dawes <dobey@ximian.com>
* configure.in: Don't require autoconf 2.5x, needs to work with 2.13
2002-11-20 Michael Meeks <michael@ximian.com>
* configure.in: require autoconf 2.52 not 2.53.
2002-11-18 Dan Winship <danw@ximian.com>
* libsoup/soup-address.c (soup_address_hash): Don't use s6_addr32
since it's apparently non-portable. Use s6_addr instead.
(soup_gethostbyaddr): fix a sometimes-uninitialized variable.
* libsoup/soup-error.c: Fix spelling of
SOUP_ERROR_MOVED_PERMANENTLY and its description.
* libsoup/soup-message.c (soup_message_get_request_header, etc):
Remove long-deprecated API.
* libsoup/soup-socket.c (soup_socket_connect): remove unused
variable.
* libsoup/soup-openssl.c (soup_openssl_read): Use gsize.
* libsoup/soup-server.c (cgi_read): Likewise
* libsoup/soup-socks.c (soup_socks_write, soup_socks_read):
Likewise.
* libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): Likewise.
* libsoup/soup-transfer.c (soup_transfer_read_cb,
soup_transfer_write_cb): Likewise.
* tests/timeserver.c: Add "-6" to listen on the IPv6 local address
instead of IPv4. (Tested on OS X.)
2002-11-15 Dan Winship <danw@ximian.com>
* libsoup/*: Change old Helix Code refs to Ximian (and update
copyright dates).
2002-11-15 Frank Belew <frb@ximian.com>
* tests/Makefile.am: uncomment lines to make timeserver build
correctly
2002-11-14 Joe Shaw <joe@ximian.com>
* libsoup/soup-address.c (soup_address_new): When we get an
address from the hash, call our address lookup callback or else
the connection will hang.
2002-11-13 Dan Winship <danw@ximian.com>
* tests/timeserver.c: Oops, commit this.
* tests/Makefile.am (noinst_PROGRAMS): reenable timeserver.
2002-11-13 Joe Shaw <joe@ximian.com>
* libsoup/Makefile.am: Replace the BINDIR define with LIBEXECDIR.
(install-exec-hook): Install libsoup-ssl-proxy into libexecdir
instead of bindir.
* libsoup/soup-openssl.c (soup_openssl_close): Call SSL_shutdown()
to properly shut down the SSL connection before closing the
socket.
* libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): Close the
iochannels before quitting the main loop.
* tests/Makefile.am: disable building timeserver, the source file
wasn't added.
2002-11-12 Dan Winship <danw@ximian.com>
* configure.in: Check for IPv6 support in networking headers.
* libsoup/soup-address.c: Make the internal structure of
SoupAddress entirely private, and make SoupAddress be more like a
hostent and less like a sockaddr. (Ie, make it not have a port
associated with it.) Document undocumented functions. Add
completely-untested support for IPv6.
(soup_address_new_from_sockaddr): New, to parse a sockaddr into a
SoupAddress and a port.
(soup_address_ipv4_any, soup_address_ipv6_any): Return static
addresses corresponding to the IPv6 and IPv6 "any" addresses.
(soup_address_get_canonical_name): Use inet_ntop/inet_ntoa.
(soup_address_make_sockaddr): Now constructs a new sockaddr, which
may be a sockaddr_in or sockaddr_in6.
(soup_address_gethostname, soup_address_gethostaddr): Remove
these. They aren't reliable, especially on multihomed hosts.
(soup_gethostbyname, soup_gethostbyaddr): support IPv6
(soup_address_new): Keep pending lookups in a separate hash table
from completed lookups. Fix a bug when canceling a lookup when
there was more one outstanding request for it.
(soup_address_lookup_in_cache): Removed.
* libsoup/soup-socket.c: Add a port field to SoupSocket (since
it's not in SoupAddress any more).
(soup_socket_connect): Simplify this. Don't use
soup_address_lookup_in_cache, just call soup_address_new, since we
already know the code can deal with the callback being invoked
immediately.
(soup_socket_new_sync, soup_socket_new): Take a port argument.
(soup_socket_server_new): Take a SoupAddress to use as the local
address to bind to. This lets the caller choose between the IPv4
and IPv6 "any" addresses, and also lets you bind to a single
interface of a multi-homed machine.
(soup_socket_server_accept, soup_socket_server_try_accept): Merge
the common code.
* libsoup/soup-server.c (soup_server_new): Pass
soup_address_ipv4_any() to soup_socket_server_new().
* libsoup/soup-socks.c (soup_connect_socks_proxy,
soup_socks_write): Fix up for the API changes, but it won't work
with IPv6 yet.
* tests/timeserver.c: Another really simple test, for the server
socket code.
* tests/Makefile.am: build timeserver
2002-11-11 Dan Winship <danw@ximian.com>
* libsoup/soup-address.c: Move the SoupAddress code from
soup-socket.c and soup-socket-unix.c to here.
* libsoup/soup-socket.c: Move the remaining code from
soup-socket-unix.c here.
* libsoup/soup-socket-unix.c: Gone
* tests/get.c: really really trivial test program
* configure.in (AC_OUTPUT):
* Makefile.am (SUBDIRS): add tests/
2002-11-05 Dan Winship <danw@ximian.com>
* Split libsoup out of soup. ChangeLog.old contains the original
soup ChangeLog.
* Makefile.am, etc: Fix things up to work with the new directory
layout. Disable docs until we fix them.
* autogen.sh: Use gnome-autogen.sh
* configure.in: Require autoconf 2.53. Remove stuff that was only
needed for httpd or wsdl code. Remove glib1 support. Bump version
to 2.0.
* libsoup/Makefile.am: Rename library to libsoup-2.0, put includes
in ${includedir}/soup-2.0
* libsoup/*: Merge soup-0-7 back onto the trunk. Remove
SOAP-specific stuff, Windows support, and other things that
weren't being maintained.
* soup-config.in, soupConf.sh: Kill these. We only support
pkg-config now.
|