1 2009-04-13 Dan Winship <danw@gnome.org>
7 2009-04-13 Dan Winship <danw@gnome.org>
9 * libsoup/soup-proxy-resolver-gnome.c (get_proxy_async): fix
10 use of async context here
12 2009-04-13 Dan Winship <danw@gnome.org>
14 Bug 578809 – warnings in soup_address_equal_by_ip
16 * libsoup/soup-session.c (get_host_for_message): don't try to look
17 up unresolved addresses in the hosts hash; just return NULL. The
18 "cancel other messages for the bad host" code in connect_result()
19 will loop over the whole queue, including messages with unresolved
22 2009-04-13 Dan Winship <danw@gnome.org>
24 Bug 578746 – http_proxy env var set to "http://:80" in session
25 despite proxy mode "none"
27 * libsoup/soup-proxy-resolver-gnome.c (update_proxy_settings):
28 Don't set anything if proxy_mode is NONE, and properly ignore the
29 proxy host if it's empty.
31 2009-04-11 Dan Winship <danw@gnome.org>
33 Bug 578645 – crash in Rhythmbox Music Player
35 * libsoup/soup-proxy-resolver-gnome.c
36 (soup_proxy_resolver_gnome_init): unlock id.lock before freeing
37 it. (Fixes the case where SoupProxyResolverGNOME is first
38 initialized from a thread other than the main thread, while the
39 default main loop is running.)
41 2009-04-08 Dan Winship <danw@gnome.org>
43 * configure.in: 2.26.0.9, aka "I can't believe it's not 2.26.1!",
44 a pre-release to give the proxy resolver fix a bit of extra
45 testing before next week.
49 2009-04-08 Dan Winship <danw@gnome.org>
51 Re-fix GNOME proxy resolution (qv bug 571527)
53 * libsoup/soup-proxy-resolver-gnome.c: New and improved GNOME
54 proxy resolver; gets information out of GConf in a thread-safe
55 manner, and then passes it on to libproxy via environment
56 variables, so that libproxy won't try to access GConf itself, but
57 we still can use it for PAC, WPAD, and ignore_hosts.
59 * libsoup/soup-proxy-resolver-gconf.c:
60 * libsoup/soup-proxy-resolver-libproxy.c: gone now
62 * libsoup/soup-gnome-features.c: update for the fact that
63 SoupProxyResolverGNOME is actually a real type now, not
64 compile-time-defined alias
66 2009-04-08 Dan Winship <danw@gnome.org>
68 Fix ISO 8601 parsing to accept either "." or ","
70 * libsoup/soup-date.c (parse_iso8601_date): accept either "." or
71 "," as decimal separator, per the spec. qv glib bug 578369.
73 2009-04-05 Dan Winship <danw@gnome.org>
75 Don't allow CR/LF in header names or values
77 * libsoup/soup-message-headers.c (soup_message_headers_append):
78 Don't let the caller create a header with whitespace or ":" in its
79 name, or with CR or LF in its value, since that would result in us
80 generating syntactically invalid headers.
82 2009-04-03 Dan Winship <danw@gnome.org>
84 Bug 577386 – Fails to handle HTTPS redirect from a certain site.
86 * libsoup/soup-gnutls.c (soup_gnutls_read): Treat abnormal
87 EOFs as though they were normal, rather than as errors. Shrug.
89 Reported by Diego Escalante Urrelo.
91 2009-04-03 Dan Winship <danw@gnome.org>
93 Bug 577360 – handle cookies with same name but different path
95 * libsoup/soup-cookie-jar.c (soup_cookie_jar_add_cookie): check
96 both name and path when matching cookies; "foo=one; path=/bar"
97 should not replace "foo=two; path=/". They are separate cookies.
99 Reported by Alexander V. Butenko.
101 2009-04-02 Dan Winship <danw@gnome.org>
103 Bug 577630 – libsoup should ignore broken Content-Type headers
105 * libsoup/soup-message-headers.c (content_type_setter): Ignore
106 Content-Type if it's not at least minimally syntactically correct.
107 (soup_message_headers_get_content_type): Document that.
109 * tests/header-parsing.c (do_content_type_tests): test it.
111 2009-04-02 Dan Winship <danw@gnome.org>
113 Bug 577728 – soup_header_g_string_append_param should handle NULL values
115 * libsoup/soup-headers.c (soup_header_g_string_append_param):
116 allow @value to be %NULL.
118 * tests/header-parsing.c (do_append_param_tests): test
119 soup_header_g_string_append_param()
121 2009-04-02 Dan Winship <danw@gnome.org>
123 Bug 576760 – soup_message_headers_get_content_type returns bad headers
125 * libsoup/soup-message-headers.c (soup_message_headers_get_one)
126 (soup_message_headers_get_list): New replacements for
127 soup_message_headers_get(), indicating explicitly whether the
128 caller expects the header to be a list or not; for non-list-type
129 headers, if there's more than one, the second one should be
130 ignored rather than concatenated to the first.
131 (soup_message_headers_get): deprecate this.
134 * tests/*.c: Update to use soup_message_headers_get_one() or
135 _get_list() as appropriate.
137 * tests/header-parsing.c (do_content_type_tests): Add some tests
138 of Content-Type parsing/setting, including making sure that
139 duplicate Content-Type headers are ignored.
141 * docs/reference/libsoup-2.4-sections.txt: update
143 2009-03-27 Dan Winship <danw@gnome.org>
145 Bug 576583 – Tests fail if "localhost" resolves to ::1
147 * tests/*.c: Use "127.0.0.1" in URIs rather than "localhost",
148 since the default SoupServer config only listen on IPv4 (qv bug
149 522519), and tests/httpd.conf.in only configures apache to listen
150 on IPv4, and we don't handle multiple IP addresses (qv bug 526321)
151 but the machine might be configured to return "::1" rather than
152 "127.0.0.1" first for "localhost". Patch from Andreas Rottmann.
154 2009-03-27 Dan Winship <danw@gnome.org>
156 * libsoup/soup-cookie.c (soup_cookie_new): Fix docs to not claim
157 that the cookie domain can be %NULL. Add some g_return_if_fail()s.
159 2009-03-27 Dan Winship <danw@gnome.org>
161 * docs/reference/client-howto.xml: clarify that SoupSessionAsync
162 is not thread-safe, and that setting a non-default GMainContext on
163 a non-threadsafe object means you can only use that object from
164 that GMainContext's thread.
166 2009-03-26 Milan Crha <mcrha@redhat.com>
168 Bug 574957 - soup-session-sync doesn't unlock mutex on proxy error
170 * libsoup/soup-session-sync.c: (wait_for_connection):
171 Unlock private lock also on proxy error.
173 2009-03-24 Dan Winship <danw@gnome.org>
175 Bug 571283 - Allow LF LF instead of CRLF CRLF as header/body separator
177 * libsoup/soup-message-io.c (read_metadata): Change how this
178 works; instead of taking a boundary string, just always pass "\n"
179 as the boundary to soup_socket_read_until(), but call it multiple
180 times if the caller wants us to read until a blank line.
181 (io_read): update to deal with the fact that the headers might be
182 terminated by LF LF rather than CRLF CRLF.
184 2009-03-23 Dan Winship <danw@gnome.org>
186 Bug 566530 - Handle (illegal) unencoded spaces in URIs
188 * libsoup/soup-uri.c (uri_normalized_copy): optionally fix up
189 parts with unencoded spaces in them.
190 (soup_uri_new_with_base): tell uri_normalized_copy() to fix up
191 spaces in the path and query components
193 * tests/uri-parsing.c (abs_tests): test parsing and unparsing a
194 URI with an unencoded space in it.
196 * tests/redirect-test.c (tests, server_callback): add a test of
197 redirecting to a URI with an unencoded space in it.
199 2009-03-15 Dan Winship <danw@gnome.org>
201 * configure.in: 2.26.0
205 2009-03-14 Xan Lopez <xan@gnome.org>
207 Add G_{BEGIN,END}_DECLS guards to public headers.
209 * libsoup/soup-auth.h:
210 * libsoup/soup-cookie-jar-sqlite.h:
211 * libsoup/soup-cookie-jar-text.h:
212 * libsoup/soup-proxy-resolver.h:
214 2009-03-11 Dan Winship <danw@gnome.org>
216 * libsoup/soup-session.c (soup_session_cancel_message): add more
217 detail to the doc comment
219 * libsoup/soup-message.c (SoupMessage): Note in the doc comment
220 that reason phrases are not very useful, and should not be
221 presented to the user.
223 * libsoup/soup-status.c: add a comment explaining why reason
224 phrases aren't localized. Also some misc doc fixes.
225 (soup_status_get_phrase): Note in the doc comment that you
226 shouldn't present reason phrases to the user.
228 2009-03-09 Dan Winship <danw@gnome.org>
230 Bug 571527 – gvfsd-http crashed with SIGSEGV in
231 g_hash_table_lookup().
233 As currently written, libproxy's gnome plugin causes intermittent
234 gvfsd-http crashes, and I didn't have time to come up with either
235 a fix or a workaround. So for 2.26.0 we will fall back to using
236 the GConf-based proxy resolver. Hopefully to be fixed for 2.26.1.
238 * configure.in: require both gconf and libproxy if building
241 * libsoup/soup-proxy-resolver-gconf.c: bring this back.
243 * libsoup/soup-gnome-features.c
244 (soup_proxy_resolver_gnome_get_type): use gconf instead of
247 * libsoup/Makefile.am: updates
249 2009-03-08 Dan Winship <danw@gnome.org>
251 * libsoup/*.c: gtk-doc updates. In particular, document a bunch of
252 convenience #defines, and add "Since" tags where appropriate.
254 2009-03-06 Dan Winship <danw@gnome.org>
256 * libsoup/soup-session-async.c (run_queue): Process messages in
257 the CONNECTING iostate before messages in the QUEUED iostate.
258 Otherwise, if a bunch of messages are queued all at once, and the
259 server doesn't support persistent connections, some messages can
260 get stranded in the queue. Fixes #574365 (reported by Xan Lopez)
261 and removes a five-year-old FIXME...
263 2009-02-20 Gustavo Noronha Silva <gns@gnome.org>
265 * libsoup/soup-message-headers.c
266 (soup_message_headers_get_content_type): now returns NULL if there
267 is no Content-Type header; fix documentation to account for this
268 change and to actually be correct about how the Content-Type is
271 2009-02-19 Dan Winship <danw@gnome.org>
273 Bug 572153 – SoupServer doesn't support SOUP_ENCODING_EOF
275 * libsoup/soup-message-io.c (io_write): Various fixes to make
276 SOUP_ENCODING_EOF work correctly when sending response
277 bodies. (Previously, the code assumed that SoupServer responses
278 would always be chunked or Content-Length-encoded.)
280 * libsoup/soup-message-client-io.c (get_request_headers): when
281 changing a request body from SOUP_ENCODING_NONE to
282 SOUP_ENCODING_CONTENT_LENGTH, return the new encoding value to
283 soup-message-io, not the old one.
285 * libsoup/soup-message.c (set_property): when setting
286 priv->server_side to TRUE, set the default encoding on the
287 response headers to CONTENT_LENGTH. (Moved from SoupServer.)
288 (soup_message_cleanup_response): If priv->server_side is TRUE,
289 re-fix the response header encoding after clearing the headers.
290 Otherwise the response headers revert to SOUP_ENCODING_EOF after
291 sending a "100 Continue".
292 (soup_message_is_keepalive): reorganize a little, fix a bug in the
295 * libsoup/soup-server.c (start_request): remove request encoding
298 * tests/streaming-test.c: new test of SoupServer response
299 streaming, testing chunked, content-length, and eof-terminated
302 2009-02-19 Dan Winship <danw@gnome.org>
304 * libsoup/soup-socket.c (soup_socket_read_until): explain why @len
305 normally needs to be at least @boundary_len+1. Suggested by
307 (soup_socket_class_init): add longer gtk-docs to the non-blocking
308 property, to explain the way non-blocking I/O works in SoupSocket.
310 2009-02-19 Xan Lopez <xan@gnome.org>
312 * libsoup/soup-cookie-jar-sqlite.c:
315 (exec_query_with_try_create_table):
319 Fix a series of issues that prevented SoupCookieJarSQLite from working:
321 - Try to create cookies table on errors. The table was never created before.
322 - Store max_age in a gulong, not int.
323 - Parse correctly boolean values from query. It's 0/1, not FALSE/TRUE.
324 - The host is stored as host in the table, not as domain.
328 2009-02-16 Dan Winship <danw@gnome.org>
330 * configure.in: 2.25.91
334 2009-02-15 Dan Winship <danw@gnome.org>
336 * docs/reference/client-howto.xml: Updates: Mention
337 SoupSessionFeature (and link to SoupLogger, SoupCookieJar, and
338 SoupProxyResolverGNOME specifically). Mention forms and XML-RPC
339 support. Mention header-parsing methods. Give a concrete example
340 of connecting to SoupMessage signals. Document the (minimal)
341 thread-safety guarantees
343 * docs/reference/build-howto.xml: basic notes on pkg-config and
346 2009-02-06 Dan Winship <danw@gnome.org>
348 * libsoup/soup-auth-manager.c (authenticate_auth): Fix crash when
349 getting a 407 when using SoupProxyResolverGNOME (or when not using
350 any proxy). Launchpad bug #326099. (Note that this doesn't
351 actually make proxy-auth-with-SoupProxyResolverGNOME *work*, it
352 just makes it not crash.)
354 2009-02-02 Dan Winship <danw@gnome.org>
356 * configure.in: 2.25.5
360 2009-02-02 Dan Winship <danw@gnome.org>
362 * libsoup/soup-proxy-resolver-gconf.h:
363 * libsoup/soup-proxy-resolver-gconf.c: Remove this, as it was
364 incomplete, and libproxy is now officially a dependency of GNOME.
366 * libsoup/Makefile.am:
367 * libsoup/soup-gnome-features.c: remove gconf-vs-libproxy ifdefs
369 * configure.in: Remove GConf checks, require libproxy if building
372 2009-01-29 Dan Winship <danw@gnome.org>
374 * libsoup/soup-message-body.c (soup_message_body_wrote_chunk): Fix
375 this; previously it would discard the entire message body after
376 writing a SOUP_MEMORY_TEMPORARY chunk. Part of WebKit bug 18343.
378 * libsoup/soup-message-io.c (io_write): use
379 io->write_chunk->length *before* freeing io->write_chunk.
381 * tests/chunk-test.c (do_temporary_test): new test to make sure
382 that TEMPORARY buffers are handled properly.
384 2009-01-21 Dan Winship <danw@gnome.org>
386 * libsoup/soup-session-feature.h: remove the dummy typedef for
387 struct SoupSessionFeature that was needed because we weren't
388 scanning soup-types.h. Fixes the build with non-GNU compilers.
390 * libsoup/soup-session-feature.c: document
391 SoupSessionFeatureInterface
393 * docs/reference/Makefile.am (IGNORE_HFILES): oops, don't ignore
396 * docs/reference/libsoup-2.4-docs.sgml:
397 * docs/reference/libsoup-2.4-sections.txt: Split
398 SoupSessionFeature into its own file.
400 2009-01-12 Dan Winship <danw@gnome.org>
402 * libsoup/soup-cookie-jar.c (request_started): Don't pass NULL to
403 soup_message_headers_replace(), call soup_message_headers_remove()
404 if there are no cookies. Likely fix for webkit bug #23240.
406 * libsoup/soup-message-headers.c (soup_message_headers_append):
407 g_return_if_fail (value != NULL)
409 2009-01-05 Dan Winship <danw@gnome.org>
415 2008-12-23 Dan Winship <danw@gnome.org>
417 * configure.in: belated post-release bump to 2.25.4
419 * libsoup/soup-session.c (soup_session_get_features)
420 (soup_session_get_feature): add these to query session features.
423 2008-12-23 Dan Winship <danw@gnome.org>
425 * configure.in: add some more warning CFLAGS, inspired by Benjamin
426 Otte's blog post, although none of them picked out any actual
427 bugs. Annoyingly, the most interesting warnings came from
428 -Wwrite-strings and -Wshadow, both of which I decided against
429 keeping, because they had too many false positives.
431 * libsoup/soup-cookie-jar.c (soup_cookie_jar_get_cookies): rename
432 a variable to avoid shadowing.
434 * libsoup/soup-message-headers.c
435 (soup_message_headers_get_ranges): move a variable declaration to
436 avoid a possibly-confusing shadowing.
438 * tests/forms-test.c:
439 * tests/header-parsing.c:
440 * tests/range-test.c:
441 * tests/test-utils.c: constify some "char *"s that should have
444 * tests/get.c (find_hrefs): rename an arg whose name shadowed a
445 global, to avoid possible future confusion
446 (get_url): Likewise with a functional-internal shadowing.
448 2008-12-15 Dan Winship <danw@gnome.org>
450 * configure.in: 2.25.3
454 2008-12-09 Dan Winship <danw@gnome.org>
456 * libsoup/soup-uri.c (soup_uri_new): Explicitly document the fact
457 that you have to call soup_uri_set_path() when using
458 soup_uri_new(NULL), since path is required to be non-%NULL.
460 * libsoup/soup-connection.c (connect_message): initialize
463 * libsoup/soup-cookie.c (soup_cookie_applies_to_uri):
464 g_return_val_if_fail() rather than crashing if uri->path is %NULL.
465 Also, fix the cookie/uri path comparison to not potentially read
466 off the end of uri->path. #562191, Mark Lee.
468 2008-12-04 Dan Winship <danw@gnome.org>
470 * libsoup/soup-form.c (soup_form_decode): Correctly handle forms
471 that have URI-encoded parameter names. #563302, Evan Nemerson.
473 * tests/forms-test.c: test that
475 2008-12-03 Dan Winship <danw@gnome.org>
477 * libsoup/soup-proxy-resolver-gconf.c (finalize): disconnect from
478 gconf notifications. Fixes a crash, #563145.
480 2008-12-01 Dan Winship <danw@gnome.org>
482 * configure.in: 2.25.2
486 2008-11-28 Dan Winship <danw@gnome.org>
488 * libsoup/soup-auth-manager.c (auth_type_compare_func): Fix this
489 so we choose the *strongest* auth type first, rather than the
490 weakest. Doh. #562339, Pontus Oldberg.
492 * libsoup/soup-server.c (soup_server_add_auth_domain): use
493 g_slist_append() rather than prepend(), so auth headers get added
494 in the same order as the SoupAuthDomains were.
496 * tests/auth-test.c (do_select_auth_test): add a test of selecting
497 between Basic and Digest auth
499 2008-11-28 Dan Winship <danw@gnome.org>
501 * libsoup/Makefile.am (libsoupgnomeincludedir): make this
502 $(includedir)/libsoup-gnome-2.4/libsoup rather than being the same
503 as $(libsoupincludedir). Makes it easier to split into two
506 2008-11-28 Dan Winship <danw@gnome.org>
508 * docs/reference/client-howto.xml: fix method name in example.
509 #562411, Andreas Bruse.
511 2008-11-24 Dan Winship <danw@gnome.org>
513 * libsoup/soup-logger.c: clarify exactly when stuff gets logged
514 (and in particular, that SoupSession::authenticate gets emitted
515 before the response it is authenticating gets logged).
517 2008-11-06 Dan Winship <danw@gnome.org>
519 * libsoup/Makefile.am (libsoup_gnome_2_4_la_LIBADD): fix linking
520 with --as-needed. #559342, pointed out by Götz Waschk
522 2008-11-04 Dan Winship <danw@gnome.org>
524 * configure.in: 2.25.1
528 2008-11-04 Dan Winship <danw@gnome.org>
530 * libsoup/soup-address.c (soup_address_is_resolved):
531 * libsoup/soup-cookie.c (soup_cookie_copy):
532 * libsoup/soup-cookie-jar.c (soup_cookie_jar_class_init):
533 * libsoup/soup-message-headers.c (SoupMessageHeadersType):
534 * libsoup/soup-proxy-resolver.c
535 (soup_proxy_resolver_get_proxy_async)
536 (soup_proxy_resolver_get_proxy_sync):
537 * libsoup/soup-status.c (soup_status_proxyify): misc doc fixes
539 * libsoup/soup-cookie-jar-text.h: remove a "deprecated" API that
540 was never actually released
542 * libsoup/soup.h: include soup-proxy-resolver.h
544 * docs/reference/Makefile.am (SCAN_OPTIONS): set
545 --deprecated-guards correctly
546 (IGNORE_HFILES): ignore some more internal files
547 (GTKDOC_LIBS): link against libsoup-gnome, not libsoup
549 * docs/reference/libsoup-2.4-docs.sgml:
550 * docs/reference/libsoup-2.4.types:
551 * docs/reference/libsoup-2.4-sections.txt: add new stuff
553 2008-11-04 Dan Winship <danw@gnome.org>
555 * libsoup/soup-cookie-jar-text.c: implementation of SoupCookieJar
556 that persists to a text file in the old Mozilla cookies.txt
557 format. Written by Xan Lopez and myself.
559 * libsoup/soup-cookie-jar-sqlite.c: implementation of
560 SoupCookieJar that persists to an sqlite database in the new
561 Mozilla cookies.sqlite format. (Part of libsoup-gnome.) Written by
562 Diego Escalante Urrelo, based on soup-cookie-jar-text.c.
564 * libsoup/soup-cookie-jar.c: add various functionality needed by
565 the two new subclasses. (Mostly written by Xan.) Does not break
566 API/ABI compat with 2.24.
568 * libsoup/soup-cookie.c (soup_cookie_get_type): register
569 SoupCookie as a boxed type.
570 (domain_matches): fix a bug here that meant "foo.com" couldn't set
571 a cookie for domain=.foo.com
572 (soup_cookie_applies_to_uri): fix path checking
574 * configure.in: if building --with-gnome, require sqlite3
576 2008-11-03 Dan Winship <danw@gnome.org>
578 * libsoup/soup-session-sync.c (process_queue_item): don't remove
579 the item from the queue here; it should already have happened in
580 all circumstances. Possible fix for #559052.
582 * libsoup/soup-session.c (cancel_message): don't remove the item
583 from the queue here; the call to soup_message_finished() will do
586 * libsoup/soup-message-queue.c (soup_message_queue_remove): This
587 should only be called once, so g_return_if_fail (!item->removed)
589 * tests/test-utils.c (test_init): install a new default g_log
590 handler that increments the error count when it's called so that a
591 test won't pass if it triggers a g_warning() or
594 2008-11-03 Dan Winship <danw@gnome.org>
596 * tests/Makefile.am (get_LDADD): fix srcdir/builddir mixup.
598 2008-11-03 Dan Winship <danw@gnome.org>
600 * libsoup/soup-message-headers.c (set_content_foo): don't leak the
603 * libsoup/soup-multipart.c (generate_boundary): avoid a (harmless)
606 * libsoup/soup-proxy-resolver-static.c (get_proxy_sync): don't
607 leak the address on error
609 * libsoup/soup-session-sync.c (wait_for_connection): don't leak
612 * tests/misc-test.c: don't leak the SoupMessage signal ids
614 * tests/range-test.c (main): don't leak base_uri
616 * tests/libsoup.supp: update this using lots and lots of wildcards
618 2008-11-03 Dan Winship <danw@gnome.org>
620 * libsoup/soup-session.c (message_finished): Fix the signal
621 handler disconnection here: for "finished" we were passing the
622 wrong user_data to g_signal_handlers_disconnect_by_func(), and for
623 "got_body" it turns out you can't use _disconnect_by_func() when
624 there's a metamarshal, making it incompatible
625 withsoup_message_add_header_handler(). Fixes a crash in
626 evolution-exchange, #559054.
628 * tests/misc-test.c (do_msg_reuse_test): Ensure that SoupSession
629 and its features disconnect all of their signals from a message
630 when they're done with it.
632 2008-10-31 Dan Winship <danw@gnome.org>
634 Add libsoup-gnome, for new features that depend on GNOME
637 * configure.in: Check for libproxy and/or gconf, accept
638 --without-gnome option, output libsoup-gnome-2.4.pc
640 * libsoup-gnome-2.4.pc: pc file for libsoup with GNOME support
642 * libsoup/Makefile.am: build libsoup-gnome.la if so configured
644 * libsoup/soup-gnome.h: base header for libsoup-gnome
646 * libsoup/soup-proxy-resolver-libproxy.c: An implementation of
647 SoupProxyResolver that uses libproxy.
649 * libsoup/soup-proxy-resolver-gconf.c: An implementation of
650 SoupProxyResolver that uses the proxy keys in GConf. Does not
651 completely handle ignore_hosts; this is currently just used as a
652 fallback if libproxy is not available.
654 * libsoup/soup-gnome-features.c: provides
655 SOUP_TYPE_PROXY_RESOLVER_GNOME (abstracting over
656 SoupProxyResolverGConf and SoupProxyResolverLibproxy) and
657 SOUP_TYPE_GNOME_FEATURES_2_26, which adds "all GNOME-specific
658 features in libsoup 2.26", which is currently just the proxy
661 * libsoup/soup-session-async.c (resolved_proxy_addr): set
662 item->resolved_proxy_addr
663 (run_queue): resolve the proxy if !item->resolved_proxy_addr, not
664 if !item->proxy_addr, since the proxy addr might resolve to NULL.
666 * tests/Makefile.am (get_LDADD):
667 * tests/get.c: If we built libsoup-gnome, use it in "get" for
668 automatic proxy support
670 2008-10-31 Dan Winship <danw@gnome.org>
672 * libsoup-2.4.pc.in: rename from libsoup.pc.in; the attempt to
673 keep the source tree API-version-generic wasn't really working,
674 and we're probably not ever going to change the API version again
677 * Makefile.am (pkgconfig_DATA): install the .pc file the normal
678 way rather than using an install-data-local rule to rename the .pc
679 file as we install it
681 * libsoup/Makefile.am (libsoupincludedir):
682 * tests/Makefile.am (LIBS):
683 * docs/reference/Makefile.am (GTKDOC_LIBS): Say "2.4" everywhere,
684 instead of 2.4 in some places and $(SOUP_API_VERSION) in others.
686 * configure.in: updates for .pc renaming. Also, use
687 AS_HELP_STRING() in AC_ARG_ENABLE() and AC_ARG_WITH() rules
689 2008-10-31 Dan Winship <danw@gnome.org>
691 * libsoup/soup-proxy-resolver.c: new abstract base class for a
692 SoupSessionFeature that determines what proxy to use for a given
695 * libsoup/soup-proxy-resolver-static.c: a SoupProxyResolver that
696 always returns the same value.
698 * libsoup/soup-session.c (set_property, get_property): implement
699 the SOUP_SESSION_PROXY_URI property by creating/destroying a
700 SoupProxyResolverStatic as needed.
701 (soup_session_get_connection): Use the proxy address passed by the
702 caller rather than priv->proxy_uri.
704 * libsoup/soup-session-async.c (run_queue): if the session has a
705 proxy resolver, use it, and pass the resolved proxy to
706 soup_session_get_connection().
707 (request_restarted): clear the previously-resolved proxy address
708 when restarting the message
710 * libsoup/soup-session-sync.c (wait_for_connection): if the
711 session has a proxy resolver, use it, and pass the resolved proxy
712 to soup_session_get_connection().
714 * libsoup/soup-message-queue.h (SoupMessageQueueItem): add
715 proxy-address-resolving fields
717 * libsoup/soup-status.c (soup_status_proxify): moved from
718 soup-connection; turn SOUP_STATUS_CANT_RESOLVE into
719 SOUP_STATUS_CANT_RESOLVE_PROXY, and SOUP_STATUS_CANT_CONNECT into
720 SOUP_STATUS_CANT_CONNECT_PROXY (and pass all other statuses
723 2008-10-30 Dan Winship <danw@gnome.org>
725 * tests/simple-httpd.c: do directory listings. (wrote this a long
726 time ago, it just never made it into svn)
728 2008-10-27 Dan Winship <danw@gnome.org>
730 * libsoup/soup-cookie.c (soup_cookie_free): free the expires date,
733 * libsoup/soup-auth-domain-basic.h:
734 * libsoup/soup-auth-domain-digest.h:
735 * libsoup/soup-auth-domain.h:
736 * libsoup/soup-cookie-jar.h:
737 * libsoup/soup-logger.h:
738 * libsoup/soup-multipart.h: add G_BEGIN/END_DECLS
740 * libsoup/soup-date.c: add some g_return_if_fails
742 Patches from and inspired by Xan Lopez, #522125
744 2008-10-22 Dan Winship <danw@gnome.org>
747 * tests/Makefile.am: fix up some of the regression test
748 configuration stuff, and print warnings when some tests aren't run
749 do to missing dependencies
751 2008-10-20 Dan Winship <danw@gnome.org>
753 * tests/Makefile.am (INCLUDES): add SOUP_MAINTAINER_FLAGS here
756 * tests/dns.c (main):
757 * tests/getbug.c (main):
758 * tests/server-auth-test.c (do_test): replace deprecated glib
761 2008-10-20 Cosimo Cecchi <cosimoc@gnome.org>
764 * libsoup/Makefile.am:
765 * libsoup/soup-status.h:
766 * libsoup/soup-types.h:
767 * libsoup/soup-uri.c: (soup_uri_to_string):
768 Build with G_DISABLE_DEPRECATED and G_DISABLE_SINGLE_INCLUDES; enforce
769 the first switch under maintainer mode and the second one
770 unconditionally (#557072).
772 2008-10-19 Dan Winship <danw@gnome.org>
774 * libsoup/soup-auth.c (soup_auth_update): compare scheme name
775 case-insensitively, to prevent an infinite loop when it's not in
776 standard form. #536285
778 2008-10-10 Dan Winship <danw@gnome.org>
780 * libsoup/soup-message-headers.c
781 (soup_message_headers_get_ranges): if the caller passed the
782 total_length of the message body, then sort sort the ranges and
783 merge overlapping ones to generate a minimal set.
785 * tests/range-test.c: test it
787 2008-10-09 Andrew W. Nosenko <andrew.w.nosenko@gmail.com>
789 * libsoup/soup-uri.c (soup_uri_to_string): Verify whether uri is
790 non-NULL and avoid crash on NULL pointer dereference therefore.
792 2008-10-03 Dan Winship <danw@gnome.org>
794 * libsoup/soup-connection.c: Change the SoupURI properties to
795 SoupAddress properties.
797 * libsoup/soup-address.c (soup_address_resolve_async)
798 (soup_address_resolve_sync): Redo slightly so that multiple
799 simultaneous attempts to resolve the same address won't cause
801 (soup_address_hash_by_name, soup_address_equal_by_name):
802 (soup_address_hash_by_ip, soup_address_equal_by_ip): methods to
803 hash addresses by name or IP address
805 * libsoup/soup-message.c (soup_message_get_address): gets a
806 SoupAddress corresponding to the message's URI
808 * libsoup/soup-auth-manager.c (SoupAuthHost): hash hosts by
809 soup_address_hash_by_name() rather than by URI.
811 * libsoup/soup-session.c (soup_session_get_connection): pass
812 addresses to soup_connection_new(), not URIs.
813 (SoupSessionHost): hash hosts by soup_address_hash_by_ip() rather
814 than by URI. This requires that the addresses will have already
815 been resolved by the SoupSession subclasses before calling
816 soup_session_get_connection(), but also means that now requests
817 made to different virtual hosts on the same IP address can share a
820 * libsoup/soup-message-queue.c (SoupMessageQueueItem): add
821 address-resolving state
823 * libsoup/soup-session-sync.c (process_queue_item): resolve the
824 message's address before getting a connection
826 * libsoup/soup-session-async.c (run_queue, resolve_msg_addr)
827 (resolved_msg_addr): resolve the message's address before getting
829 (request_restarted): if the message gets requeued to a different
830 host, we'll need to re-resolve the address.
832 * libsoup/soup-uri.c (soup_uri_copy_root, soup_uri_host_hash)
833 (soup_uri_host_equal): No longer needed
835 * libsoup/soup-dns.c (do_async_callback): disconnect from the
836 cancellable before invoking the callback
838 * tests/proxy-test.c (tests): fix the 403 example; hostnames are
839 resolved by the session now, even when sending to a proxy, so we
840 need to use a hostname that actually exists
842 2008-10-03 Dan Winship <danw@gnome.org>
844 * libsoup/soup-message-queue.c: Make this more complicated, with a
845 SoupMessageQueueItem to keep track of the session's per-message
846 state. (Part of the process of moving session-related state out of
849 * libsoup/soup-session.c: Update to work in terms of
852 * libsoup/soup-session-async.c:
853 * libsoup/soup-session-sync.c: use SoupMessageQueueItem (and get
854 rid of SoupSessionAsyncQueueData and SoupSessionSyncAsyncData).
856 2008-10-01 Dan Winship <danw@gnome.org>
858 * libsoup/soup-multipart.c: New type and methods for working with
859 multipart HTTP bodies (eg, multipart/form-data and
860 multipart/byte-ranges)
862 * libsoup/soup-message-headers.c (soup_message_headers_get_ranges)
863 (soup_message_headers_set_ranges)
864 (soup_message_headers_set_range)
865 (soup_message_headers_get_content_range)
866 (soup_message_headers_set_content_range): New methods for dealing
867 with the Range and Content-Range headers.
869 * libsoup/soup-form.h (SOUP_FORM_MIME_TYPE_URLENCODED)
870 (SOUP_FORM_MIME_TYPE_MULTIPART): #define these MIME types here
872 * libsoup/soup-form.c (soup_form_decode_multipart): new utility
873 for parsing multipart/form-data forms.
874 (soup_form_request_new_from_multipart): new utility for
875 constructing multipart/form-data forms
877 * libsoup/soup-headers.c (soup_headers_parse): this is now
878 non-static, for use by soup-multipart
880 * libsoup/soup-message-server-io.c (get_response_headers)
881 (handle_partial_get): if the client requested a partial GET, and
882 the SoupServer is returning the full body, rebuild the response to
883 include only the requested range instead
885 * tests/forms-test.c: renamed from query-test and updated to do
886 both application/x-www-form-urlencoded and multipart/form-data
889 * tests/range-test.c: test of Range/Content-Range functionality
891 2008-10-01 Dan Winship <danw@gnome.org>
893 * libsoup/soup-headers.c (soup_header_parse_param_list)
894 (soup_header_parse_semi_param_list): Update these to deal with
895 RFC2231-encoded UTF-8 header params
896 (soup_header_g_string_append_param): new utility method to do
897 parameters with quoted-strings (handling escaping) and RFC2231.
899 * libsoup/soup-auth-digest.c (get_authorization):
900 * libsoup/soup-auth-domain-basic.c (challenge):
901 * libsoup/soup-auth-domain-digest.c (challenge): use
902 soup_header_g_string_append_param so we handle escaping correctly
904 * libsoup/soup-message-headers.c
905 (soup_message_headers_get_content_type)
906 (soup_message_headers_set_content_type)
907 (soup_message_headers_get_content_disposition)
908 (soup_message_headers_set_content_disposition): New convenience
911 * tests/header-parsing.c (do_rfc2231_tests): new test of RFC2231
912 encoded header parsing in Content-Disposition.
914 * tests/get.c (get_url): use
915 soup_message_headers_get_content_type()
917 * docs/reference/libsoup-2.4-sections.txt: update
919 2008-10-01 Dan Winship <danw@gnome.org>
921 * tests/xmlrpc-test.c (main): add a new -s flag to indicate that
922 it's being run from inside xmlrpc-server-test.
923 (test_echo): if we aren't running inside xmlrpc-server-test, and
924 the response strings don't match the request strings, then compare
925 them to echo_strings_broken instead; a bug in php-xmlrpc manifests
926 when using libxml2 >= 2.7.1, resulting in incorrect responses. :-/
928 * tests/xmlrpc-server-test.c (do_xmlrpc_tests): Pass -s to
931 2008-10-01 Dan Winship <danw@gnome.org>
933 * configure.in: bump version to 2.25.0
935 2008-10-01 Dan Winship <danw@gnome.org>
937 * libsoup/soup-cookie-jar.c:
938 * libsoup/soup-cookie.c:
939 * libsoup/soup-cookie.h:
940 * libsoup/soup-headers.c:
941 * libsoup/soup-logger.c:
942 * libsoup/soup-session-feature.c:
943 * libsoup/soup-session-feature.h:
944 * libsoup/soup-session.c: doc fixups
946 * docs/reference/libsoup-2.4-docs.sgml:
947 * docs/reference/libsoup-2.4-sections.txt:
948 * docs/reference/libsoup-2.4.types: Add missing bits
950 2008-09-30 Dan Winship <danw@gnome.org>
952 * libsoup/soup-xmlrpc.c (parse_value):
953 soup_value_hash_insert_value() copies the value, so we have to
954 g_value_unset() our copy.
956 * tests/chunk-test.c:
958 * tests/ntlm-test.c: fix leaks
960 * tests/libsoup.supp: update
962 2008-09-30 Dan Winship <danw@gnome.org>
964 * libsoup/soup-session-async.c (do_idle_run_queue): store the
965 GSource in priv, don't ref the session. Otherwise the session
966 won't get destroyed if you abort it and then don't return to its
967 main loop. (addendum to #498509, Arnout Vandecappelle)
968 (finalize): Destroy the idle_run_queue source when finalizing.
969 (run_queue, got_connection): Ref the session when calling
970 soup_connection_connect_async(), and do a
971 do_idle_run_queue()+unref in got_connection, to ensure correct
972 handling regardless of what the application does with its own ref
974 (final_finished): Likewise, ref/do_idle_run_queue/unref rather
975 than calling run_queue directly and playing with weak pointers.
977 * libsoup/soup-session.c (connect_result): ref the session around
978 the cancel-if-error loop
980 Fixes #533473, crash in seahorse when connecting to a
981 non-responsive key server.
983 * tests/misc-test.c (do_callback_unref_test): Add a test for the
986 * tests/test-utils.c (soup_test_session_abort_unref): abort and
987 unref a SoupSession, and consider it an error if the session still
988 exists afterward. Suggested by Arnout Vandecappelle.
989 (test_server_shutdown): Likewise, consider it an error if the
992 * tests/*.c: Use soup_test_session_abort_unref().
994 2008-09-26 Dan Winship <danw@gnome.org>
996 * libsoup/soup-auth-manager-ntlm.c
997 * libsoup/soup-auth-manager.c
998 * libsoup/soup-cookie-jar.c
1000 * libsoup/soup-logger.c:
1001 * libsoup/soup-message-body.h:
1002 * libsoup/soup-message.h
1003 * libsoup/soup-misc.h:
1004 * libsoup/soup-xmlrpc.h:
1006 * tests/continue-test.c:
1007 * tests/ntlm-test.c: Fix warnings pointed out by gcc -pedantic.
1008 #553976, Sander Dijkhuis.
1010 2008-09-23 Dan Winship <danw@gnome.org>
1012 * configure.in: 2.24.0.1
1016 * libsoup/soup-session.c (redirect_handler):
1017 * libsoup/soup-message.c (soup_message_new):
1018 (soup_message_new_from_uri, soup_message_set_uri): Revert the
1019 2008-08-25 change; it breaks the rhythmbox DAAP plugin. #553466.
1022 2008-09-22 Dan Winship <danw@gnome.org>
1024 * configure.in: 2.24.0
1026 2008-09-08 Dan Winship <danw@gnome.org>
1028 * configure.in: 2.23.92
1032 2008-09-07 Dan Winship <danw@gnome.org>
1034 * libsoup/soup-session.c (redirect_handler): a 302 response to
1035 HEAD (or any other safe method) should be treated like a 307, not
1036 a 303. #551190, Jonathan Matthew.
1038 * tests/redirect-test.c: test that
1040 2008-09-01 Dan Winship <danw@gnome.org>
1042 * configure.in: 2.23.91
1046 2008-08-25 Dan Winship <danw@gnome.org>
1048 * libsoup/soup-uri.h (SOUP_URI_VALID_FOR_HTTP): new macro to check
1049 if a URI is a valid http or https URI.
1051 * libsoup/soup-uri.c (soup_uri_new_with_base): Update http/https
1052 check to use SOUP_URI_VALID_FOR_HTTP().
1054 * libsoup/soup-session.c (redirect_handler): Check
1055 SOUP_URI_VALID_FOR_HTTP() and call it an error if the check fails.
1057 * libsoup/soup-message.c (soup_message_new): Remove the uri->host
1058 check from here. Update docs to clarify that @uri must be an
1060 (soup_message_new_from_uri): Check SOUP_URI_VALID_FOR_HTTP().
1062 (soup_message_set_uri): Check SOUP_URI_VALID_FOR_HTTP(). Update
1065 Should prevent the crash in #528882, but there's still something
1066 going wrong there at a higher level.
1068 2008-08-22 Bastien Nocera <hadess@hadess.net>
1070 * libsoup/soup-date.c (soup_date_to_time_t),
1071 (soup_date_to_timeval):
1072 * libsoup/soup-date.h: Add a SoupDate to GTimeVal conversion
1073 function, for use in gvfs. #549006, with help from Dan Winship
1076 2008-08-18 Dan Winship <danw@gnome.org>
1078 * libsoup.pc.in (Requires): Revert previous commit; that would
1079 still fail in the case of an application linking against a library
1080 that privately links against libsoup. The only correct solution in
1081 the face of --as-needed (or on OSes where the linker always works
1082 that way) is for the module that actually calls g_thread_init() to
1083 explicitly link against libgthread.
1085 2008-08-14 Dan Winship <danw@gnome.org>
1087 * libsoup.pc.in (Requires): Add gthread-2.0; the app must call
1088 g_thread_init(), but libsoup won't pull it in itself if built with
1089 --as-needed, so make sure it gets pulled in from here. Noted by
1092 * libsoup/soup-auth.c (soup_auth_authenticate): g_return_if_fail
1093 if either username or password is NULL. Noted on the mailing list.
1095 * libsoup/soup-auth-basic.c (authenticate): remove redundant check
1097 2008-08-04 Dan Winship <danw@gnome.org>
1099 * configure.in: 2.23.6
1103 2008-07-26 Dan Winship <danw@gnome.org>
1105 * libsoup/soup-misc.c (soup_add_completion): Add this to schedule
1106 a callback in a GMainContext "right away", as opposed to
1107 soup_add_idle(), which uses a lower priority and therefore may not
1108 end up calling the callback for a long time if the application is
1109 busy with I/O. #536676, Benjamin Otte.
1111 * libsoup/soup-dns.c (resolver_thread, async_cancel)
1112 (soup_dns_lookup_resolve_async):
1113 * libsoup/soup-message-io.c (soup_message_io_unpause):
1114 * libsoup/soup-session-sync.c (queue_message_thread):
1115 * libsoup/soup-session-async.c (do_idle_run_queue):
1116 * libsoup/soup-socket.c (async_cancel)
1117 (soup_socket_connect_async):
1118 * tests/test-utils.c (test_server_shutdown): Use
1119 soup_add_completion() rather than soup_add_idle().
1121 * docs/reference/libsoup-2.4-sections.txt: add soup_add_completion
1123 2008-07-26 Dan Winship <danw@gnome.org>
1125 * libsoup/soup-message-client-io.c (get_request_headers): don't
1126 add a Host header to the message if the caller already added one.
1127 #539803, Marc Maurer.
1129 * libsoup/soup-logger.c (print_request): likewise
1131 * tests/misc-test.c: new test file for small miscellaneous test
1133 (do_host_test): test Host-header overriding
1135 2008-07-26 Dan Winship <danw@gnome.org>
1137 * tests/Makefile.am (LIBS): add $(GLIB_LIBS) so this still works
1138 when building with weird LDFLAGS. #541506, Götz Waschk.
1140 * docs/reference/Makefile.am (GTKDOC_LIBS): likewise
1142 * libsoup/soup-auth-digest.c (soup_auth_digest_parse_algorithm):
1143 if the server response doesn't include an algorithm, it is
1144 supposed to default to MD5. #544681, Mads Chr. Olesen.
1146 * libsoup/soup-message-io.c (SoupMessageIOData): change
1147 read_length, write_length, and written to goffset so we can
1148 properly handle message bodies > 4G. #539861, Peter Christensen.
1150 * libsoup/soup-gnutls.c: Fix horrible bizarre brokenness in
1151 GIOChannel subclassing. #536417, Tor Lillqvist.
1153 2008-06-04 Tor Lillqvist <tml@novell.com>
1155 * libsoup/soup-socket.c (set_fdflags): The SO_RCVTIMEO and
1156 SO_SNDTIMEO options to setsockopt() take int values, in
1157 milliseconds, on Windows. Not struct timeval. Eek. So passing a
1158 struct timeval meant that the tv_sec value (which is first in the
1159 struct) is interpreted as milliseconds. setsockopt apparently
1160 doesn't even get upset by the fact that the option size doesn't
1161 match the sizeof(int) it should expect.
1163 2008-05-02 Dan Winship <danw@gnome.org>
1165 * libsoup/soup-cookie.c (soup_cookie_applies_to_uri): fix the path
1168 2008-04-29 Tor Lillqvist <tml@novell.com>
1170 * libsoup/soup-dns.c (soup_dns_is_ip_address): Fix compilation
1171 error in the !HAVE_IPV6 && !HAVE_INET_PTON && !HAVE_INET_ATON
1174 2008-04-21 Dan Winship <danw@gnome.org>
1176 * configure.in: 2.23.1, bump AGE and CURRENT
1180 2008-04-20 Dan Winship <danw@gnome.org>
1182 Fixes for GnuTLS support on Win32. #528752, patch from Marc Maurer
1184 * libsoup/soup-gnutls.c (soup_ssl_wrap_iochannel): add an argument
1185 saying whether or not the socket is non-blocking, since there's no
1186 way to determine this from the fd in WinSock.
1187 (do_handshake, soup_gnutls_read, soup_gnutls_write): Update for
1190 * libsoup/soup-socket.c (soup_socket_start_proxy_ssl): Update for
1193 * libsoup/soup-nossl.c (soup_ssl_wrap_iochannel): update the
1194 declaration here too
1196 * tests/ssl-test.c: Some updates to get this closer to working on
1199 2008-04-14 Chris Lord <chrislord.net@gmail.com>
1201 reviewed by: Dan Winship <danw@gnome.org>
1203 * libsoup/soup-cookie-jar.c (soup_cookie_jar_set_cookie):
1204 Check that the cookie was parsed successfully before setting it
1206 2008-04-08 Dan Winship <danw@gnome.org>
1208 Initial HTTP cookie support imported from development git repo,
1209 including patches from Xan Lopez.
1211 TODO: make sure the logic in soup_cookie_jar_get_cookies() is
1212 right. Add a test program to tests/.
1214 * libsoup/soup-cookie.c: Code for parsing and generating HTTP
1217 * libsoup/soup-cookie-jar.c: Code for managing SoupCookies and
1218 integrating cookie management with a SoupSession.
1220 * libsoup/soup-date.c (soup_date_is_past): New, checks if a
1221 SoupDate refers to a time in the past
1223 * libsoup/soup-dns.c (soup_dns_is_ip_address): New, checks if a
1224 string is a valid IP address
1226 * libsoup/soup-headers.c (soup_header_parse_semi_param_list): New,
1227 like soup_header_parse_param_list, but for semicolon-delimited
1230 2008-04-08 Dan Winship <danw@gnome.org>
1232 * libsoup/soup-auth-manager.c: Make this a GObject and
1233 specifically a SoupSessionFeature. Add an "authenticate" signal,
1234 and emit that rather than explicitly calling into the SoupSession
1235 and telling it when to emit its own authenticate signal.
1237 * libsoup/soup-auth-manager-ntlm.c: Make this a subclass of
1238 SoupAuthManager, with NTLM support controllable via a property.
1240 * libsoup/soup-session.c (soup_session_init): create an
1241 auth_manager of type SOUP_TYPE_AUTH_MANAGER_NTLM, but defaulting
1242 to USE_NTLM=FALSE. Connect to its "authenticate" signal, and call
1243 soup_session_add_feature() on it.
1244 (set_property, get_property): proxy the USE_NTLM property to the
1246 (auth_manager_authenticate): signal handler for SoupAuthManager
1247 "authenticate" signal. (Replaces soup_session_emit_authenticate(),
1248 which is no longer needed)
1250 2008-04-08 Dan Winship <danw@gnome.org>
1252 * libsoup/soup-session-feature.c: New interface type representing
1253 a feature that can be added to a SoupSession.
1255 * libsoup/soup-session.c (soup_session_add_feature): Add a feature
1256 to the session by prepending it to priv->features and calling
1257 soup_session_feature_attach() on it.
1258 (soup_session_add_feature_by_type): Add a feature to the session
1259 by creating an object of the indicated type and passing it to
1260 soup_session_add_feature.
1261 (soup_session_remove_feature)
1262 (soup_session_remove_feature_by_type): Likewise, remove features
1263 (soup_session_class_init, set_property): register/handle
1264 construct-time feature adding/removing properties
1265 (dispose): cleanup features
1267 * libsoup/soup-logger.c: port to SoupSessionFeature
1269 * tests/test-utils.c (soup_test_session_new): Use
1270 soup_session_add_feature rather than soup_logger_attach.
1272 2008-04-08 Dan Winship <danw@gnome.org>
1274 * configure.in: Having branched for gnome-2-22, bump version to
1275 2.23.0 for the GNOME 2.23 series. SOUP_API_VERSION will stay at
1276 2.4, which is confusing but seemed like the best solution at this
1279 2008-04-07 Dan Winship <danw@gnome.org>
1281 * configure.in: 2.4.1. Bump AGE and CURRENT.
1285 * docs/reference/libsoup-2.4-sections.txt: add new symbols
1287 2008-04-07 Dan Winship <danw@gnome.org>
1289 * libsoup/soup-message-io.c (soup_message_io_pause): If pausing a
1290 message that was waiting to unpause, cancel the unpause.
1292 2008-04-05 Dan Winship <danw@gnome.org>
1294 * libsoup/soup-dns.c (resolve_address, resolve_name): Don't
1295 cache negative results, even if the DNS server explicitly states
1296 that the host does not exist; some servers give different answers
1297 to clients inside and outside their firewall. #523269, Jörgen
1300 2008-04-05 Dan Winship <danw@gnome.org>
1302 * libsoup/soup-message-body.c (soup_message_body_set_accumulate)
1303 (soup_message_body_get_accumulate): New, replaces
1304 SOUP_MESSAGE_OVERWRITE_CHUNKS, but can be set on either the
1305 incoming or outgoing message body.
1306 (soup_message_body_get_chunk): update to still dtrt if !accumulate
1307 (soup_message_body_got_chunk, soup_message_body_wrote_chunk): New
1308 methods to handle accumulating/discarding chunks.
1310 * libsoup/soup-message-io.c (read_body_chunk): Use
1311 soup_message_body_got_chunk.
1312 (io_write): Use soup_message_body_wrote_chunk, to discard unneeded
1313 chunks after writing them. Fixes most of #522146.
1315 * libsoup/soup-message.c (soup_message_class_init): add a new
1316 flag, "server-side", to indicate whether the message is
1317 client-side or server-side, and update several methods to use it.
1318 (got_body): Update for accumulate
1319 (soup_message_set_flags): If the caller changes OVERWRITE_CHUNKS,
1320 update the corresponding accumulate flag.
1322 * libsoup/soup-message.h (SOUP_MESSAGE_OVERWRITE_CHUNKS):
1325 * tests/chunk-test.c (do_request_test): Use
1326 soup_message_body_set_accumulate() now, and verify that the chunks
1327 are being discarded appropriately.
1328 (do_response_test): Use
1329 soup_message_body_set_accumulate() instead of OVERWRITE_CHUNKS.
1331 * tests/pull-api.c (do_fully_async_test)
1332 (do_synchronously_async_test): Use
1333 soup_message_body_set_accumulate().
1335 2008-04-05 Dan Winship <danw@gnome.org>
1337 * libsoup/soup-dns.c (resolve_address): fix test for
1338 AI_ADDRCONFIG. Noticed while looking at #526321.
1340 2008-04-05 Dan Winship <danw@gnome.org>
1342 * libsoup/soup-socket.c (soup_socket_class_init)
1343 (soup_socket_write): globally ignore SIGPIPE rather than only
1344 doing it around socket write calls, since with SSL even socket
1345 read calls may need to write, and also because SIGPIPE is
1346 completely moronic and no one should be using it, and the previous
1347 "solution" wasn't thread-safe anyway. Fixes #524397, reported by
1350 2008-04-05 Dan Winship <danw@gnome.org>
1352 Misc fixes noticed by "sparse" or by running gcc with additional
1355 * libsoup/soup-auth-manager-ntlm.c (ntlm_authorize_post): fix a
1356 potentially uninitialized variable. (Grumble. gcc needs
1357 -Wdo-optimization-so-you-can-generate-code-flow-related-warnings-
1358 but-then-emit-unoptimized-code-for-ease-of-debugging)
1360 * libsoup/soup-gnutls.c (soup_gnutls_channel_funcs): make this
1363 * libsoup/soup-uri.c (uri_decoded_copy, uri_normalized_copy): add
1364 "static". (This doesn't change the generated code; the prototype
1365 was already declared static and so gcc was treating the function
1366 as static even though the main declaration *wasn't* declared
1367 static. I'm not sure if this is a bug in gcc or an oddity of the
1368 spec, but it's confusing, so...)
1370 * libsoup/soup-xmlrpc.c (soup_xmlrpc_build_method_response):
1373 * libsoup/soup-xmlrpc.h: add G_GNUC_PRINTF to
1374 soup_xmlrpc_build_format
1376 * tests/*.c: misc minor fixes, mostly involving missing "const"s
1377 and "static"s to get better warnings, and then remove some unused
1380 * tests/continue-test.c (do_message): fix a crash when the test
1383 * tests/test-utils.h (debug_printf): add G_GNUC_PRINTF to
1386 2008-04-05 Dan Winship <danw@gnome.org>
1388 * libsoup/soup-method.c: Explicitly assign each of the variables
1389 to NULL, because that apparently causes the OS X linker to treat
1390 them differently than if they are left implicitly NULL. #522957.
1392 2008-04-04 Dan Winship <danw@gnome.org>
1394 * libsoup/soup-message.c: add a new signal "wrote-body-data" to
1395 address the problem that "wrote-chunk" is not usable for progress
1396 info (especially with non-chunked encoding). #525101, suggested by
1399 * libsoup/soup-message-io.c (write_data): emit wrote-body-data as
1401 (io_write): update so that (a) Content-Length writes can be done
1402 in multiple chunks (as long as the caller explicitly sets the
1403 Content-Length header beforehand), and (b) the body data doesn't
1404 get copied an extra time. Based on a patch from Christian.
1406 * libsoup/soup-message-client-io.c (get_request_headers): Don't
1407 update the Content-Length header if it's already set, even if it
1408 doesn't match the (current) body length.
1410 * tests/chunk-test.c: test some chunk-encoding-related behavior
1412 2008-04-03 Dan Winship <danw@gnome.org>
1414 Be more aggressive about closing unused persistent connections
1415 when needed, to avoid slow load times in WebKit.
1417 * libsoup/soup-session-async.c (run_queue): Remove the
1418 "try_pruning" flag from here and from all the callers, and
1419 *always* try pruning idle connections if it would help.
1421 * libsoup/soup-session.c (soup_session_try_prune_connection):
1422 Rather than only closing a single connection, close all idle
1425 2008-03-29 Dan Winship <danw@gnome.org>
1427 * libsoup/soup-message.h (SoupMessage): de-constify
1428 msg->reason_phrase; it's no more const than any other struct
1431 * libsoup/soup-message.c (finalize)
1432 (soup_message_cleanup_response, soup_message_set_status)
1433 (soup_message_set_status_full): don't need to cast reason_phase to
1434 non-const when freeing it now
1436 * libsoup/soup-message-client-io.c (parse_response_headers):
1437 Likewise, remove reason-phrase non-const casts
1439 2008-03-29 Dan Winship <danw@gnome.org>
1441 * libsoup/soup-date.c (parse_day): fix the test for no-day-parsed
1442 (parse_year): likewise fix the test for no-year-parsed
1443 (parse_time): don't accept empty components here
1444 (parse_textual_date): don't accept a comma if it wasn't preceded
1446 (soup_date_weekday): Fix leap year handling here; the code this
1447 was originally based on only had to work between 1970 and 2038, so
1448 it didn't worry about the mod 100 and mod 400 rules...
1450 * tests/date.c: Add date/string conversion tests (in particular,
1451 to make sure soup_date_weekday is working). Also add test cases
1452 with missing components and make sure they *don't* parse.
1454 2008-03-25 Dan Winship <danw@gnome.org>
1456 * libsoup/soup-auth-domain-digest.c (accepts): don't crash if the
1457 auth_callback returns NULL (meaning "unrecognized user").
1459 * tests/server-auth-test.c (do_test, do_auth_tests): Test bad
1460 usernames as well as bad passwords.
1461 (main): Remove erroneous local run_tests variable.
1463 Pointed out by Curtis Magyar.
1465 2008-03-19 Dan Winship <danw@gnome.org>
1467 * libsoup/soup-auth.c (soup_auth_new): compare WWW-Authenticate
1468 auth schemes case-insensitively.
1470 * libsoup/soup-auth-digest.c (update): allow Digest
1471 WWW-Authenticate header with no "qop" option. (The original RFC
1472 2069 style of Digest auth.)
1473 (soup_auth_digest_parse_qop): this returns a bitfield, so don't
1474 return -1 if there are no recognized values.
1476 * tests/httpd.conf.in: use "AuthDigestQop none" in /Digest/realm3
1479 Fixes #498484 (Digest auth against Apple's Calendar Server).
1481 2008-03-18 Dan Winship <danw@gnome.org>
1483 * libsoup/soup-session.c (soup_session_class_init): Add a new
1484 property, SOUP_SESSION_IDLE_TIMEOUT, to specify a timeout after
1485 which idle connections should be closed.
1486 (soup_session_get_connection): pass the idle_timeout value on to
1489 * libsoup/soup-connection.c (soup_connection_class_init): Add
1490 SOUP_CONNECTION_IDLE_TIMEOUT.
1491 (start_idle_timer, stop_idle_timer): add/remove a timeout to call
1492 soup_connection_disconnect().
1493 (socket_connect_result, soup_connection_connect_sync): start the
1494 idle timer after connection is complete
1495 (set_current_request): call stop_idle_timer() when starting a new
1497 (clear_current_request): call start_idle_timer() when finishing a
1499 (dispose): call stop_idle_timer() when destroying the connection
1501 #518214, based on a patch from Jorn Baayen.
1503 2008-03-18 Dan Winship <danw@gnome.org>
1505 * libsoup/soup-message-io.c (soup_message_io_unpause): if delaying
1506 the unpause to idle time, we need to keep track of the idle source
1507 (soup_message_io_stop): if the message is waiting to unpause
1510 * libsoup/soup-server.c (soup_server_pause_message): call
1511 soup_message_io_pause(), not soup_message_io_unpause(). Duh.
1513 2008-03-15 Dan Winship <danw@gnome.org>
1515 * libsoup/soup-session.c: Define two new signals, request_queued
1516 and request_unqueued, to provided a clearer (and
1517 clearly-documented) lifecycle for messages, helping us (and other
1518 people) avoid bugs like #522601, SoupSession::authenticate signal
1519 emitted multiple times per message (reported and analyzed by Tommi
1522 * libsoup/soup-logger.c:
1523 * libsoup/soup-auth-manager.c:
1524 * libsoup/soup-auth-manager-ntlm.c: Use request_queued/unqueued
1526 * tests/auth-test.c (do_async_auth_test): add a regression test
1528 2008-03-14 Dan Winship <danw@gnome.org>
1530 * libsoup/soup-message-client-io.c (get_request_headers): Fix Host
1531 header syntax when the host is an IPv6 address literal. Noticed
1532 while poking at #522519.
1534 2008-03-14 Dan Winship <danw@gnome.org>
1536 * libsoup/soup-message-private.h (SoupMessagePrivate): add
1537 an orig_http_version field.
1539 * libsoup/soup-message.c (soup_message_init): initialize
1541 (soup_message_set_http_version): If called before the status code
1542 is received, set orig_http_version too.
1543 (soup_message_cleanup_response): Restore orig_http_version, so
1544 that we don't send an HTTP/1.0 request in response to an HTTP/1.0
1545 redirect. #521848, Tommi Komulainen.
1547 * libsoup/soup-message-server-io.c (get_response_headers):
1548 actually output "HTTP/1.0", not "HTTP/1.1", if the message's http
1551 * tests/redirect-test.c (server_callback): Add a regression test;
1552 set http_version to 1.0 when returning a redirect, but require it
1553 to be 1.1 when processing the following request
1555 2008-03-13 Xan Lopez <xan@gnome.org>
1557 * libsoup/soup-address.c:
1558 * libsoup/soup-auth-domain-basic.c:
1559 * libsoup/soup-auth-domain-digest.c:
1560 * libsoup/soup-auth-domain.c:
1561 * libsoup/soup-auth.c:
1562 * libsoup/soup-connection.c:
1563 * libsoup/soup-message.c:
1564 * libsoup/soup-server.c:
1565 * libsoup/soup-session.c:
1566 * libsoup/soup-socket.c:
1568 Use G_OBJECT_WARN_INVALID_PROPERTY_ID in all get/set_property functions.
1572 2008-03-13 Xan Lopez <xan@gnome.org>
1574 * tests/dns.c: (main):
1575 * tests/get.c: (main):
1576 * tests/getbug.c: (main):
1577 * tests/simple-httpd.c: (main):
1578 * tests/simple-proxy.c: (main):
1579 * tests/ssl-test.c: (main):
1580 * tests/test-utils.c: (test_init):
1582 g_thread_init should be called before any other glib function. (#522117)
1584 2008-03-10 Dan Winship <danw@gnome.org>
1586 * configure.in: 2.4.0!
1590 2008-02-28 Dan Winship <danw@gnome.org>
1592 * libsoup/soup-session.c (finalize): free priv->user_agent.
1593 #518798, Wouter Cloetens.
1594 (redirect_handler): PROPFIND is defined to be "safe and
1595 idempotent", so allow automatic redirects of it. (Pointed out by
1596 Christian Kellner. FIXME: need a way for apps to declare
1597 additional safe methods). Also, treat 302 like 307, not like 303,
1598 because that behavior is universal in the real world, despite the
1601 * tests/redirect-test.c (tests): update POST 302 behavior check
1603 * tests/Makefile.am (TESTS): oops, add redirect-test so it gets
1604 run by "make check"/"make distcheck"
1606 * tests/ssl-test.c: Re-revert the change from 2008-02-09; the
1607 problem with ssl-test.c was not that soup_gnutls_init() wasn't
1608 thread-safe, it's that the server thread doesn't do anything that
1609 would ever cause soup_gnutls_init() to be called, and so if the
1610 client thread doesn't start first, the server thread will run
1611 without initializing GNUTLS.
1613 2008-02-27 Benjamin Otte <otte@gnome.org>
1615 * libsoup/soup-socket.c: (read_from_network), (soup_socket_read),
1616 (soup_socket_read_until), (soup_socket_write):
1617 ensure that nread/nwrote parameters aren't NULL. They are also
1618 properly set on error paths now.
1620 2008-02-25 Dan Winship <danw@gnome.org>
1622 * configure.in: 2.3.4
1626 2008-02-25 Dan Winship <danw@gnome.org>
1628 * docs/reference/Makefile.am (DOC_MODULE): rename from libsoup to
1630 (TARGET_DIR): don't need to override this now
1632 * docs/reference/libsoup-2.4.types:
1633 * docs/reference/libsoup-2.4-docs.txt:
1634 * docs/reference/libsoup-2.4-overrides.txt:
1635 * docs/reference/libsoup-2.4-sections.txt: Rename these from
1636 unversioned, to match DOC_MODULE
1638 Fixes doc installation to work with devhelp again. #518384, Mart
1641 2008-02-25 Benjamin Otte <otte@gnome.org>
1643 * libsoup/soup-address.h:
1644 * libsoup/soup-auth-domain.h:
1645 * libsoup/soup-auth.h:
1646 * libsoup/soup-message.h:
1647 * libsoup/soup-server.h:
1648 * libsoup/soup-session-async.h:
1649 * libsoup/soup-session-sync.h:
1650 * libsoup/soup-session.h:
1651 * libsoup/soup-socket.h:
1652 * libsoup/soup-types.h:
1653 * libsoup/soup-uri.h:
1654 use an underscore for struct definitions. Fixes bug #518317.
1656 2008-02-20 Sebastian Dröge <slomo@circular-chaos.org>
1658 * libsoup.pc.in: Add gobject-2.0 and gio-2.0 to Requires.
1659 Move libxml-2.0 and the SSL dependency to Requires.private
1660 as no header is including them. Fixes bug #517631.
1662 2008-02-11 Dan Winship <danw@gnome.org>
1664 * configure.in: post-release bump to 2.3.3
1666 2008-02-11 Dan Winship <danw@gnome.org>
1668 * configure.in: 2.3.2
1669 (SOUP_CURRENT): bump for API changes
1673 2008-02-09 Dan Winship <danw@gnome.org>
1675 * Misc gtk-doc fix-ups
1677 2008-02-09 Dan Winship <danw@gnome.org>
1679 * libsoup/soup-misc.h: remove prototype for
1680 soup_signal_connect_once, which is only used by soup-connection
1681 now, and will go away once that code is rewritten.
1683 * libsoup/soup-connection.c: prototype it here now (the definition
1684 is still in soup-misc.c)
1686 2008-02-09 Dan Winship <danw@gnome.org>
1688 * libsoup/soup-auth-manager-ntlm.c: mark the DES magic number
1691 * libsoup/soup-date.c (months, days): add an extra "const" to each
1692 of these declarations, as one "const" is apparently not enough.
1693 (soup_date_to_time_t): remove redundant copy of days_before array.
1695 * libsoup/soup-dns.c (soup_dns_init): use g_once_init_enter/leave
1697 * libsoup/soup-gnutls.c (soup_ssl_supported)
1698 (soup_gnutls_channel_funcs): Mark these const
1699 (soup_gnutls_init, init_dh_params): Use g_once_init_enter/leave
1701 * libsoup/soup-status.c (reason_phrases): mark this const
1703 * tests/ssl-test.c: Remove the workaround for soup_gnutls_init()
1704 not being thread-safe, since it is now.
1706 2008-02-08 Dan Winship <danw@gnome.org>
1708 * libsoup/soup-message-headers.c (SoupMessageHeadersIter)
1709 (soup_message_headers_iter_init, soup_message_headers_iter_next):
1710 Add an iterator type for SoupMessageHeaders.
1712 * libsoup/soup-message-client-io.c (get_request_headers):
1713 * libsoup/soup-message-server-io.c (get_response_headers): Use
1714 SoupMessageHeadersIter.
1716 * libsoup/soup-logger.c (print_request, print_response): Use
1717 SoupMessageHeadersIter. And take advantage of the simplification
1718 to fix the kludge where 'direction' was stored as a field in
1719 SoupLoggerPrivate rather than being an argument to
1722 * tests/get.c (get_url):
1723 * tests/header-parsing.c (check_headers):
1724 * tests/simple-httpd.c (server_callback): Use
1725 SoupMessageHeadersIter
1727 2008-02-06 Dan Winship <danw@gnome.org>
1729 * libsoup/soup-server.c (soup_server_add_auth_domain): Ref the
1730 auth domain when adding it.
1732 * tests/continue-test.c (setup_server):
1733 * tests/server-auth-test.c (main): Add unrefs here to avoid
1736 2008-02-06 Dan Winship <danw@gnome.org>
1738 * libsoup/soup-message.c (soup_message_set_chunk_allocator): New
1739 method that lets the application set a callback function to use to
1740 allocate SoupBuffers for reading into, so as to avoid needing
1743 * libsoup/soup-message-body.c (soup_buffer_new_with_owner): new,
1744 to create a SoupBuffer pointing to memory owned by another object,
1745 with a GDestroyNotify to unref/free that object when the
1746 SoupBuffer is freed.
1747 (soup_buffer_get_owner): Returns the owner of a buffer created
1748 with soup_buffer_new_with_owner.
1749 (soup_buffer_free, etc): update SoupBuffer code for owned buffers.
1751 Suggested by Wouter Cloetens, #513810.
1753 * tests/simple-httpd.c (do_get): Use mmap() and
1754 soup_buffer_new_with_owner(), as a demo/test.
1756 2008-02-06 Dan Winship <danw@gnome.org>
1758 * libsoup/soup-date.c (soup_date_to_time_t): clamp the result to
1759 the time_t range, and document that. Remove the #ifdef HAVE_TIMEGM
1762 * configure.in: remove check for timegm
1764 2008-02-04 Dan Winship <danw@gnome.org>
1766 * libsoup/Makefile.am: Fix the handling of soup-enum-types.h to
1767 ensure that it gets built before the things that depend on it.
1769 2008-02-03 Benjamin Otte <otte@gnome.org>
1771 * libsoup/soup-socket.c: update documentation to new API
1773 2008-02-02 Dan Winship <danw@gnome.org>
1775 * libsoup/soup-session.c: fix default connections-per-host again;
1776 it was defined in two places. Add SOUP_SESSION_USER_AGENT property
1777 (setup_message): set the User-Agent request header on the request
1779 * libsoup/soup-server.c: add SOUP_SERVER_SERVER_HEADER property
1780 (start_request): set the Server response header on the request.
1783 * tests/simple-httpd.c: set the User-Agent/Server headers
1785 2008-02-02 Dan Winship <danw@gnome.org>
1787 * libsoup/soup-headers.c (soup_headers_parse_request): if the
1788 request headers contain an unrecognized Expect: header, return
1789 SOUP_STATUS_EXPECTATION_FAILED. Also, process Connection headers
1790 in HTTP/1.0 messages as required by 2616 14.10.
1791 (soup_headers_parse_response): Likewise handle Connection headers
1792 in HTTP/1.0 messages
1794 * tests/header-parsing.c: test those things
1796 2008-02-02 Dan Winship <danw@gnome.org>
1798 * libsoup/soup-session.c (redirect_handler): Misc fixes: don't
1799 redirect on "300 Multiple Choices", "304 Not Modified", "305 Use
1800 Proxy", or any unrecognized status code. Don't redirect unsafe
1801 methods on 301, 302, or 307. Redirect POST to GET on 303.
1803 * tests/redirect-test.c: test of redirection handling behavior.
1805 2008-02-02 Dan Winship <danw@gnome.org>
1807 * libsoup/soup-method.h (SOUP_METHOD_GET, etc): Fix these so that
1808 direct comparisons against them actually *are* faster than doing
1809 strcmp, as the docs claim.
1811 * libsoup/soup-uri.h (SOUP_URI_SCHEME_HTTP,
1812 SOUP_URI_SCHEME_HTTPS): likewise
1814 2008-02-01 Dan Winship <danw@gnome.org>
1816 * libsoup/soup-address.c: Use GObject properties.
1817 (soup_address_new, soup_address_new_from_sockaddr)
1818 (soup_address_new_any): Make these just wrappers around
1821 * libsoup/soup-message-body.c (soup_message_body_get_type):
1822 * libsoup/soup-message-headers.c (soup_message_headers_get_type):
1823 * libsoup/soup-server.c (soup_client_context_get_type):
1824 Register these as boxed types, for language bindings.
1826 * libsoup/soup-date.c (soup_date_get_type):
1827 * libsoup/soup-message-body.c (soup_buffer_get_type):
1828 * libsoup/soup-value-utils.c (soup_byte_array_get_type):
1829 * libsoup/soup-uri.c (soup_uri_get_type): Upgrade to the latest
1830 yummiest type-registering idiom.
1832 2008-02-01 Dan Winship <danw@gnome.org>
1834 * libsoup/soup-connection.c (soup_connection_disconnect):
1835 Reorganize this; emitting DISCONNECTED may cause the session to
1836 unref the connection, causing it to be destroyed, so do everything
1837 else before that. #437835 and dups. Also, call
1838 soup_message_cleanup_response() when requeuing an IO_ERROR-ed
1839 message, so soup_session_send_message() will requeue it rather
1840 than treating it as failed.
1842 * docs/reference/Makefile.am (TARGET_DIR): override this to
1843 include the API version, to fix the last remaining parallel
1844 install issue between libsoup 2.2 and 2.4. #512810, Daniel
1847 * tests/query-test.c (do_test): don't use "stdout" as a variable
1848 name; it's allowed to be a macro (and it is one on Solaris).
1849 #513602, patch from Jeff Cai.
1851 2008-01-31 Dan Winship <danw@gnome.org>
1853 * libsoup/soup-date.c (soup_date_to_time_t): new
1855 * libsoup/soup-form.c (soup_form_decode): Remove "_urlencoded"
1856 from name. (And add back-compat #define.)
1857 (soup_form_encode): New, takes varargs parameters for each form
1859 (soup_form_encode_hash, soup_form_encode_datalist): renamed, with
1860 back-compat #defines
1861 (soup_form_request_new, soup_form_request_new_from_hash)
1862 (soup_form_request_new_from_datalist): New methods to construct a
1863 GET or POST message with form data.
1865 * libsoup/soup-uri.c (soup_uri_set_query_from_fields): New, takes
1866 varargs like soup_form_encode().
1868 * libsoup/soup-value-utils.c (soup_value_hash_new_with_vals)
1869 (soup_value_hash_insert_vals, soup_value_hash_lookup_vals): New
1870 routines to work with multiple value hash values at once.
1871 (soup_value_array_new): tiny wrapper, for naming consistency
1872 (soup_value_array_new_with_vals, soup_value_array_append_vals):
1873 New routines to work with multiple value array values at once.
1875 2008-01-28 Dan Winship <danw@gnome.org>
1877 * configure.in: post-release bump to 2.3.1
1879 2008-01-28 Dan Winship <danw@gnome.org>
1881 * configure.in: Bump version to 2.3.0.1
1885 * docs/reference/Makefile.am (content_files): include
1888 2008-01-28 Dan Winship <danw@gnome.org>
1890 * libsoup/soup-message.c (soup_message_set_auth)
1891 (soup_message_set_proxy_auth): Use soup_message_headers_replace(),
1892 not soup_message_headers_append(), since only a single
1893 Authorization/Proxy-Authorization header is allowed. #512517.
1895 * libsoup/soup-auth-manager-ntlm.c (ntlm_request_started): Don't
1896 set an NTLM Authorization header if the message already has a
1897 Basic or Digest one.
1899 * tests/ntlm-test.c: Add some Basic auth and mixed NTLM/Basic auth
1902 2008-01-28 Wouter Bolsterlee <wbolster@svn.gnome.org>
1904 * docs/reference/libsoup-docs.sgml:
1906 Changed section titles so that they actually show
1907 something useful in DevHelp.
1909 2008-01-27 Dan Winship <danw@gnome.org>
1911 * libsoup/soup-dns.c (resolver_thread): fix mutex use to avoid a
1914 * libsoup/soup-xmlrpc.c (soup_xmlrpc_build_faultv):
1915 (soup_xmlrpc_set_response, soup_xmlrpc_set_fault):
1916 (soup_xmlrpc_parse_method_call): Fix misc server-side stuff
1917 (soup_xmlrpc_parse_method_response): Fix fault parsing
1919 * libsoup/soup-xmlrpc.h (SoupXMLRPCFault): add semi-standard fault
1921 http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php
1923 * tests/xmlrpc-server.php (sum): return a <fault> if the arguments
1924 are wrong (so that xmlrpc-test can test that case).
1925 (dateChange): change to take two parameters, a date and a struct,
1926 instead of putting the date in the struct, since we weren't
1927 previously testing multiple parameter handling.
1929 * tests/xmlrpc-test.c (main): Add a -u flag to specify an
1931 (do_xmlrpc): Remove level 3 debug output, which is now redundant
1932 with the SoupLogger stuff.
1933 (test_dateChange): update for dateChange prototype change
1934 (test_fault_malformed, test_fault_method, test_fault_args): test
1937 * tests/xmlrpc-server-test.c: Test the server-side XML-RPC API (by
1938 implementing the same methods as xmlrpc-server.php and then
1941 2008-01-27 Dan Winship <danw@gnome.org>
1943 * libsoup/soup-headers.c (soup_header_parse_quality_list): fix to
1944 not sometimes read beyond the end of the string.
1946 * libsoup/soup-message-body.c (soup_message_body_append): When
1947 appending a 0-length SOUP_MEMORY_TAKE buffer, we need to free the
1948 passed-in buffer rather than just ignoring it.
1950 * libsoup/soup-message-headers.c (soup_message_headers_free): Fix
1951 leak introduced by patch for 511980.
1953 * libsoup/soup-server.c (got_headers): fix leak when decoding path
1955 * libsoup/soup-session.c (finalize): free ntlm_manager
1957 * tests/libsoup.supp: update for libsoup 2.4, glib 2.14, etc
1959 * tests/header-parsing.c (do_qvalue_tests):
1960 * tests/uri-parsing.c (main): more cleanup
1962 2008-01-27 Dan Winship <danw@gnome.org>
1964 * libsoup/soup-logger.c (soup_logger_attach): Fix session ids by
1965 using weak refs for the logger cleanup rather than trying to use
1966 the same qdata for two different things.
1967 (print_request, print_response): use full type names in the
1968 Soup-Debug line, since SoupSessionSync and SoupSessionAsync get
1969 numbered separately.
1971 2008-01-27 Dan Winship <danw@gnome.org>
1973 * libsoup/soup-session-async.c (final_finished): Don't run the
1974 queue again if the callback destroyed the session. #511868, Stef
1977 2008-01-25 Srinivasa Ragavan <sragavan@novell.com>
1979 ** Fix for bug #511980
1981 * libsoup/soup-message-headers.c: (soup_message_headers_clear):
1982 Instead of destroying the hashtable, just remove the contents of the
1985 2008-01-23 Tor Lillqvist <tml@novell.com>
1987 * configure.in: Allow autogening even without AM_PATH_LIBGCRYPT
1990 * libsoup/soup-date.c (soup_date_new_from_time_t): Correct use of
1993 * libsoup/soup-headers.c (soup_headers_parse_status_line): Return
1994 FALSE if neither HTTP nor ICY. Avoids crash in
1995 tests/header-parsing.
1997 * libsoup/soup-socket.c: On Windows SHUT_RDWR is called SD_BOTH.
1998 (set_nonblocking): Fix typo.
2000 * tests/continue-test.c: Seems to build fine without <pthread.h>,
2003 2008-01-18 Dan Winship <danw@gnome.org>
2005 * tests/server-auth-test.c: test SOUP_AUTH_DOMAIN_REMOVE_PATH
2007 2008-01-18 Dan Winship <danw@gnome.org>
2009 * configure.in: require glib 2.15.3, not 2.15.0, since
2010 AM_PATH_GLIB_2_0 didn't know about gio until post-2.15.2. Pointed
2011 out by Matthew Barnes, #510216.
2013 2008-01-18 Dan Winship <danw@gnome.org>
2015 * libsoup/soup-auth-domain.c
2016 (soup_auth_domain_set_generic_auth_callback):
2017 (soup_auth_domain_check_password): add a new generic auth callback
2018 that can be used with any subclass to do cleartext password
2019 checking against messages. Suggested by Mathias Hasselmann.
2021 * libsoup/soup-auth-domain-basic.c: Implement generic auth
2023 * libsoup/soup-auth-domain-digest.c: Implement generic auth.
2024 (soup_auth_domain_digest_evil_check_password): Gone, use the
2025 generic version now.
2027 2008-01-17 Dan Winship <danw@gnome.org>
2029 * libsoup/soup-auth-digest.c (soup_auth_digest_compute_hex_urp)
2030 (soup_auth_digest_compute_hex_a1)
2031 (soup_auth_digest_compute_response): cast the second arg to
2032 g_checksum_update to (guchar *) to avoid warnings
2034 2008-01-16 Dan Winship <danw@gnome.org>
2036 * libsoup/soup-headers.c (soup_headers_parse_status_line): Deal
2037 with Shoutcast servers, which return "ICY 200 OK", but are
2038 otherwise straight HTTP/1.0. #502325, Wouter Cloetens.
2040 * tests/header-parsing.c (resptests): add a test for it
2042 2008-01-16 Dan Winship <danw@gnome.org>
2044 * libsoup/soup-auth-manager.c (authorize_handler, etc): Allow the
2045 session authenticate signal to be handled asynchronously, by
2046 pausing the message and then authenticating the auth later.
2047 (auth_type_compare_func): make this work. oops.
2048 (extract_challenge): plug leak
2050 * libsoup/soup-auth-manager-ntlm.c: Make this work async too.
2052 * libsoup/soup-headers.c (soup_header_parse_list):
2053 (soup_header_parse_param_list): plug leaks
2055 * tests/auth-test.c (do_async_auth_test): test async auth
2057 * docs/reference/client-howto.xml (Handling Authentication):
2060 2008-01-16 Dan Winship <danw@gnome.org>
2062 * configure.in: Bomb out if glib 2.15.0 isn't found.
2063 (AM_PATH_GLIB_2_0 doesn't do this itself.)
2065 2008-01-15 Dan Winship <danw@gnome.org>
2067 * libsoup/soup-auth-manager-ntlm.c: Replaces SoupConnectionNTLM;
2068 now works as a SoupSession::request_started watcher.
2070 * libsoup/soup-connection.c: remove the no-longer-needed
2071 "authenticate" signal
2073 * libsoup/soup-session.c: Use a SoupAuthManagerNTLM if USE_NTLM is
2074 set. Remove connection-authenticate-signal references.
2076 2008-01-15 Dan Winship <danw@gnome.org>
2078 * Merge libsoup-2.4 branch to trunk
2080 2008-01-15 Dan Winship <danw@gnome.org>
2082 * libsoup/soup-dns.c (resolve_status): Fix the logic here
2084 2008-01-15 Dan Winship <danw@gnome.org>
2086 * docs/reference/porting-2.2-2.4.xml: add a few more updates
2088 2008-01-15 Dan Winship <danw@gnome.org>
2090 * libsoup/soup-auth-digest.c: Use GChecksum for MD5
2092 * libsoup/soup-md5-utils.[ch]: gone
2094 2008-01-15 Dan Winship <danw@gnome.org>
2096 * libsoup/soup-server.c (soup_server_run_async):
2097 (soup_server_quit): Don't ref/unref the server here. It doesn't
2098 match the way other things work. #494128, Mathias Hasselmann.
2100 2008-01-14 Dan Winship <danw@gnome.org>
2102 * libsoup/soup-address.h:
2103 * libsoup/soup-auth-domain-basic.h:
2104 * libsoup/soup-auth-domain-digest.h:
2105 * libsoup/soup-auth-domain.h:
2106 * libsoup/soup-auth.h:
2107 * libsoup/soup-logger.h:
2108 * libsoup/soup-message.h:
2109 * libsoup/soup-server.h:
2110 * libsoup/soup-session-async.h:
2111 * libsoup/soup-session-sync.h:
2112 * libsoup/soup-session.h:
2113 * libsoup/soup-socket.h: Add padding for future expansion to class
2116 2008-01-14 Dan Winship <danw@gnome.org>
2118 * libsoup/soup-uri.c: Add more documentation.
2119 (soup_uri_is_https): gone, replaced by SOUP_URI_SCHEME_HTTP /
2120 SOUP_URI_SCHEME_HTTPS
2121 (soup_uri_new): allow passing NULL to get back an "empty" SoupURI.
2122 (soup_uri_to_string): rename just_path to just_path_and_query, to
2123 avoid fooling people.
2124 (soup_uri_decode, soup_uri_normalize): Change these to return the
2125 decoded/normalized string rather than modifying it in place.
2126 (soup_uri_set_scheme, etc): provide setters for SoupURI parts.
2127 (soup_uri_set_query_from_form): set uri->query via
2128 soup_form_encode_urlencoded().
2130 2008-01-14 Dan Winship <danw@gnome.org>
2132 * configure.in: require glib 2.15.0, and gio
2134 * libsoup/soup-dns.c (soup_dns_lookup_resolve)
2135 (soup_dns_lookup_resolve_async): Add GCancellables, and support
2136 cancellation of DNS lookups.
2137 (resolve_address, resolve_name): If we get a DNS failure (eg,
2138 because we're disconnected from the network), don't cache that
2139 result, just try again next time someone asks. [#508593]
2141 * libsoup/soup-address.c (soup_address_resolve_async)
2142 (soup_address_resolve_sync): Add GCancellables, pass them to
2145 * libsoup/soup-socket.c (soup_socket_connect_async)
2146 (soup_socket_connect_sync): Add GCancellables and implement
2148 (soup_socket_start_ssl, soup_socket_start_proxy_ssl)
2149 (soup_socket_read, soup_socket_read_until, soup_socket_write): add
2150 GCancellables, though these routines don't actually implement
2152 (soup_socket_disconnect): Don't close() the socket if someone is
2153 doing I/O on it, as that creates a race condition. (The fd number
2154 might be quickly recycled.) Instead, keep the socket open but
2155 dead, via shutdown().
2157 2008-01-14 Benjamin Otte <otte@gnome.org>
2159 * libsoup/soup-socket.c: (soup_socket_class_init): clarify docs for
2160 new-connection signal.
2162 2008-01-14 Dan Winship <danw@gnome.org>
2164 * tests/test-utils.c: renamed from apache-wrappers and expanded.
2165 (test_init): do option parsing and general setup
2166 (test_cleanup): print error count and do cleanup
2167 (debug_printf): define here rather than in each test, and rename
2168 from dprintf [#501631]
2169 (soup_test_server_new): create a SoupServer, optionally in its own
2170 thread, and clean it up when exiting.
2171 (soup_test_session_new): create a SoupSession, optionally with
2172 an attached SoupLogger (if requested via command line)
2174 * tests/*.c: use test-utils
2176 2008-01-13 Dan Winship <danw@gnome.org>
2178 * libsoup/soup-logger.c: New HTTP debug logging object. (Based on
2179 E2K_DEBUG and its clones.)
2181 * libsoup/soup-message.c (soup_message_class_init)
2182 (soup_message_add_header_handler)
2183 (soup_message_add_status_code_handler): Change things around a
2184 little; remove the "requeuing or cancelling the message stops
2185 signal emission" rule, and instead make that be a feature of just
2186 the header and status code handlers. (Makes the basic signal
2187 handlers behave more predictably.)
2189 2008-01-11 Dan Winship <danw@gnome.org>
2191 * libsoup/soup-auth-domain.c (soup_auth_domain_set_filter):
2192 * libsoup/soup-auth-domain-basic.c
2193 (soup_auth_domain_basic_set_auth_callback):
2194 * libsoup/soup-auth-domain-digest.c
2195 (soup_auth_domain_digest_set_auth_callback):
2196 * libsoup/soup-message.c (soup_message_cleanup_response)
2197 (soup_message_set_flags, soup_message_set_http_version)
2198 (soup_message_set_uri, soup_message_set_status)
2199 (soup_message_set_status_full):
2200 * libsoup/soup-message-client-io.c (parse_response_headers):
2201 * libsoup/soup-message-server-io.c (parse_request_headers):
2202 Call g_object_notify() when changing properties.
2204 * libsoup/soup-session.c (soup_session_class_init): bump the
2205 default value of SOUP_SESSION_MAX_CONNS_PER_HOST down to 2, per
2208 * libsoup/soup-message-body.c (soup_buffer_copy): When copying a
2209 TEMPORARY buffer, keep a reference to the copy, so that a second
2210 copy will get that same buffer, rather than actually copying it
2213 * libsoup/soup-types.h: remove SoupMessageFilter, which doesn't
2216 2008-01-07 Dan Winship <danw@gnome.org>
2218 * libsoup/soup-session.c (soup_session_class_init): Change
2219 request_started signal to have a SoupSocket as its last parameter.
2221 * libsoup/soup-server.c: Fix request_* signals to all be (server,
2222 msg, client) rather than (server, client, msg).
2224 2008-01-07 Dan Winship <danw@gnome.org>
2226 * docs/reference/porting-2.2-2.4.xml: Notes on porting from 2.2 to
2229 2008-01-07 Dan Winship <danw@gnome.org>
2231 * libsoup/*.c: Move gtk-doc stuff from docs/reference/tmpl/ to the
2232 C files themselves. Some updates.
2234 * docs/reference/Makefile.am: fix (kludge?) this up to not require
2237 * docs/reference/client-howto.xml:
2238 * docs/reference/server-howto.xml: update
2240 2008-01-06 Dan Winship <danw@gnome.org>
2242 * libsoup/soup-soap-message.c:
2243 * libsoup/soup-soap-response.c: For the second time, remove SOAP
2244 support from libsoup... These APIs are not really all that helpful
2245 in the grand scheme of SOAPiness, and are only used by the
2246 Evolution GroupWise backend, which can just import this code and
2247 integrate it better there.
2249 * libsoup/soup-misc.c (soup_xml_real_node):
2250 * libsoup/soup-xmlrpc.c: Move soup_xml_real_node out of soup-misc
2251 to soup-xmlrpc, and make it private. libxml is no longer exposed
2254 2008-01-06 Dan Winship <danw@gnome.org>
2256 * libsoup/soup-date.c (soup_date_new_from_now): new method to
2257 generate a date relative to now.
2258 (soup_date_new, etc): document SoupDate methods
2260 * libsoup/soup-server.c (got_headers): set Date header, as
2261 required by RFC 2616
2263 2008-01-06 Dan Winship <danw@gnome.org>
2265 * libsoup/soup-server.c (got_headers): if raw_paths isn't set,
2266 decode the request's uri->path before doing anything else
2267 (soup_server_class_init): add "raw-paths" property, to tell
2268 SoupServer to NOT decode the Request-URI path.
2270 * libsoup/soup-auth-domain.c (soup_auth_domain_covers): Revert
2271 earlier path-decoding change; that happens at the SoupServer level
2274 2008-01-06 Dan Winship <danw@gnome.org>
2276 * libsoup/soup-message-body.c (soup_buffer_get_type): Register
2277 SoupBuffer as a boxed type.
2279 * libsoup/soup-message.c (soup_message_class_init): Use
2280 SOUP_TYPE_BUFFER in got_chunk signal definition
2282 * libsoup/soup-server.c (soup_client_context_get_type): Register
2283 SoupClientContext as a pointer type
2284 (soup_server_class_init): use SOUP_TYPE_CLIENT_CONTEXT in signal
2287 * libsoup/soup-marshal.list: clean this up
2289 2008-01-06 Dan Winship <danw@gnome.org>
2291 * libsoup/soup-server.c (SoupClientContext): Make this opaque.
2292 (soup_client_context_get_socket)
2293 (soup_client_context_get_auth_domain)
2294 (soup_client_context_get_auth_user): New accessors
2295 (soup_server_class_init): Make the signals take a
2296 SoupClientContext rather than a SoupSocket.
2297 (start_request, check_auth, call_handler, request_finished): Clean
2298 these up by using a SoupClientContext to communicate between them.
2299 (soup_server_add_handler): tweak the argument order to match the
2300 gtk standard (callback, user_data, destroynotify).
2302 2008-01-06 Dan Winship <danw@gnome.org>
2304 * libsoup/soup-address.c: remove the "dns_result" signal, which
2305 was just an implementation detail of soup_address_resolve_async().
2307 2008-01-06 Dan Winship <danw@gnome.org>
2309 * libsoup/*.c: misc documentation updates/gtk-doc fixes
2311 * libsoup/soup-server.c: finally start documenting this properly.
2313 * libsoup/soup-status.h (SoupStatusClass): kill this, since
2314 soup_message_add_status_class_handler() is gone now.
2316 * libsoup/soup-status.c (soup_status_get_phrase): Update docs to
2317 explain that you probably don't want to use this.
2319 * libsoup/soup-misc.h (SOUP_SSL_ERROR, SoupSSLError): Move these
2320 here, since soup-ssl.h isn't installed.
2322 * docs/references: start updating this...
2324 2008-01-04 Dan Winship <danw@gnome.org>
2326 * libsoup/soup-message-body.c (soup_buffer_new)
2327 (soup_message_body_append): Reorder the arguments to match
2328 soup_message_set_request/response, so it's not confusing.
2330 * libsoup/soup-message.c (wrote_chunk): remove the "chunk" arg
2331 from the signal, as it turns out to be *in*convenient, since most
2332 callers use this signal to mean "need another chunk", so they want
2333 it to have the same prototype as "wrote_headers", which means
2336 2008-01-04 Dan Winship <danw@gnome.org>
2338 * libsoup/soup-auth-domain.c: add documentation
2339 (soup_auth_domain_set_filter): take a GDestroyNotify, for better
2342 * libsoup/soup-auth-domain-basic.c:
2343 * libsoup/soup-auth-domain-digest.c: Add documentation. Replace
2344 authentication signals with more-easily-bindable authentication
2345 callbacks (with GDestroyNotifys).
2346 (soup_auth_domain_digest_evil_check_password): Add this for the
2347 benefit of code that depends on being able to do the equivalent
2348 of the old soup_server_auth_check_passwd().
2350 2008-01-02 Dan Winship <danw@gnome.org>
2352 * libsoup/soup-message-body.h (SoupMessageBody): add data and
2353 length parameters like SoupBuffer, to make this easier for callers
2356 * libsoup/soup-message-body.c (soup_message_body_append)
2357 (soup_message_body_append_buffer)
2358 (soup_message_body_truncate): Update body->length
2359 (soup_message_body_flatten): Fill in body->data (and NUL-terminate
2360 it as an added bonus).
2362 * libsoup/soup-message.c (got_body): flatten the newly-gotten
2364 (soup_message_get_request, soup_message_get_response): gone
2366 * libsoup/soup-message-client-io.c (get_request_headers):
2367 * libsoup/soup-message-server-io.c (get_response_headers):
2368 * libsoup/soup-soap-message.c (soup_soap_message_parse_response):
2369 * tests/*.c: simplify
2371 2008-01-02 Dan Winship <danw@gnome.org>
2373 * libsoup/Makefile.am (soup_headers): oops, move soup-auth.h here
2375 2008-01-02 Dan Winship <danw@gnome.org>
2377 * libsoup/soup-form.c: new HTML-form-related methods (just URI
2378 decoding/encoding at the moment).
2380 * libsoup/soup-server.h (SoupServerCallback): change the prototype
2381 to include the decoded path and query rather than the undecoded
2384 * libsoup/soup-server.c (call_handler): %-decode the URI path
2385 before looking up a handler. Decode query if available. Pass path
2386 and query to the callback.
2388 * libsoup/soup-auth-domain.c (soup_auth_domain_covers): fix this
2389 to %-decode the URI path before testing it
2391 * libsoup/soup-message-body.c (soup_message_body_append): allow
2394 * tests/query-test.c: URI query parsing test
2396 2008-01-02 Dan Winship <danw@gnome.org>
2398 * libsoup/soup-uri.c:
2399 * libsoup/soup-uri.h: Change all the "const SoupURI *" to just
2400 "SoupURI *", since the const is just there to be annoying.
2404 2008-01-02 Dan Winship <danw@gnome.org>
2406 * libsoup/soup-message-body.c (soup_message_body_get_length)
2407 (soup_message_body_get_chunk): Use goffset rather than gsize for
2408 references to the entire size of the message body. (SoupBuffer
2409 still uses gsize, so individual chunks can only be G_MAXSIZE
2412 * libsoup/soup-message-headers.c
2413 (soup_message_headers_get_content_length):
2414 (soup_message_headers_set_content_length): Likewise, use goffset.
2416 2008-01-02 Dan Winship <danw@gnome.org>
2418 * libsoup/soup-message-headers.c (soup_message_headers_get):
2419 Renamed from soup_message_headers_find, and with new behavior; now
2420 multiple headers with the same name are automatically merged
2421 together into a single comma-separated value, to ensure that apps
2422 treat multivalued headers the same regardless of how upstream
2423 servers generate them.
2424 (soup_message_headers_find_nth): no longer needed/wanted
2426 * libsoup/soup-auth-manager.c: Update to deal with
2427 SoupMessageHeaders change. (Ugh.)
2429 * tests/header-parsing.c: Update multiple-values test, and undo a
2430 change that mistakenly got committed while debugging something
2433 2008-01-01 Dan Winship <danw@gnome.org>
2435 * libsoup/soup-auth-manager.c:
2436 * libsoup/soup-dns.c:
2437 * libsoup/soup-gnutls.c:
2438 * libsoup/soup-message.c:
2439 * libsoup/soup-message-io.c:
2440 * libsoup/soup-message-queue.c:
2441 * libsoup/soup-misc.c:
2442 * libsoup/soup-path-map.c:
2443 * libsoup/soup-server.c:
2444 * libsoup/soup-session.c:
2445 * libsoup/soup-session-sync.c:
2446 * libsoup/soup-socket.c: Use g_slice.
2448 2008-01-01 Dan Winship <danw@gnome.org>
2450 * libsoup/soup-session.c (soup_session_cancel_message): add a
2451 "status_code" argument rather than having the caller set the
2452 status code separately, to prevent a race condition.
2454 2008-01-01 Dan Winship <danw@gnome.org>
2456 * libsoup/soup-session.c (soup_session_queue_message): change the
2457 callback type to include the SoupSession as a parameter as well.
2461 2007-12-31 Dan Winship <danw@gnome.org>
2463 * libsoup/soup-session.c (soup_session_class_init): change
2464 the "authenticate" signal to include a SoupAuth rather than its
2465 components, and to have a "retrying" parameter rather than
2466 separating "authenticate" and "reauthenticate".
2468 * libsoup/soup-connection.c (soup_connection_class_init): Likewise
2470 * libsoup/soup-auth-manager.c (authenticate_auth): update
2472 * libsoup/soup-auth.c: make various attributes into gobject
2474 (soup_auth_is_for_proxy): check whether an auth is plain or proxy
2475 (soup_auth_get_host): get the hostname associated with an auth
2477 * libsoup/soup-auth-ntlm.c: dummy class used by SoupConnectionNTLM
2478 in the authenticate signal
2480 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): update for
2481 authenticate signals changes; use a fake SoupAuthNTLM to assist.
2483 2007-12-20 Dan Winship <danw@gnome.org>
2485 * libsoup/soup-message.c (soup_message_add_header_handler)
2486 (soup_message_add_status_code_handler): Make these be wrappers
2487 around g_signal_connect() rather than having a completely separate
2489 (soup_message_class_init): improve signal docs. Use
2490 "got_foo_signal_wrapper" to wrap the got-foo signals.
2491 (got_foo_signal_wrapper): Wraps the marshaller for the got-foo
2492 signals and cancels the signal emission if the message gets
2493 cancelled or requeued.
2494 (got_informational, got_headers, got_chunk, got_body): remove
2495 no-longer-needed default implementations.
2497 * libsoup/soup-message-handlers.c: gone
2499 * tests/ntlm-test.c (do_message): Simplify now that callback
2500 processing doesn't happen in two separate phases.
2502 2007-12-20 Dan Winship <danw@gnome.org>
2504 * libsoup/soup-auth-domain.c:
2505 * libsoup/soup-auth-domain-basic.c:
2506 * libsoup/soup-auth-domain-digest.c: New server-side auth system.
2508 * libsoup/soup-server.c: remove SoupServerAuth / SoupAuthContext
2509 stuff, add SoupAuthDomain support.
2510 (SoupServerCallbackFn): improve the args here
2511 (SoupClientContext): renamed from SoupServerContext and made less
2514 * libsoup/soup-server-auth.c: gone!
2516 * libsoup/soup-auth-digest.c (soup_auth_digest_parse_algorithm)
2517 (soup_auth_digest_get_algorithm, soup_auth_digest_parse_qop)
2518 (soup_auth_digest_get_qop, soup_auth_digest_compute_hex_urp)
2519 (soup_auth_digest_compute_hex_a1)
2520 (soup_auth_digest_compute_response): New routines shared between
2521 client-side and server-side digest auth.
2523 * tests/server-auth-test.c: test server-side auth, using curl for
2526 * configure.in: check for curl, for server-auth-test
2528 2007-12-20 Dan Winship <danw@gnome.org>
2530 * libsoup/soup-headers.c (soup_header_parse_list)
2531 (soup_header_parse_quality_list): New methods to parse list-type
2532 headers (with optional qvalues) correctly.
2533 (soup_header_parse_param_list): Rename to match the other methods,
2534 and update the semantics a bit.
2535 (soup_header_contains): Correctly check for a token in a list
2537 * libsoup/soup-message.c (soup_message_is_keepalive):
2538 * libsoup/soup-message-client-io.c (get_request_headers):
2539 * libsoup/soup-message-server-io.c (parse_request_headers): Use
2540 soup_header_contains() with Connection headers.
2542 * tests/header-parsing.c (do_qvalue_tests): add
2543 soup_header_parse_quality_list() test
2545 2007-12-20 Dan Winship <danw@gnome.org>
2547 * libsoup/soup-auth-manager.c: Move auth-related code from
2548 SoupSession and SoupAuth here, and make various cleanups and
2549 beginnings of cleanups.
2551 * libsoup/soup-session.c: lots of stuff moved to
2554 * libsoup/soup-auth.c (soup_auth_new_from_headers): partly moved
2555 to soup-auth-manager.c, partly renamed to soup_auth_new().
2556 (soup_auth_update): new method to update an existing auth based on
2557 a new WWW-Authenticate/Proxy-Authenticate header. Also replaces
2558 the old "construct" method.
2560 * libsoup/soup-auth-digest.c (update): Implement. If the new auth
2561 has stale=true, don't invalidate the auth, just update the nonce.
2562 (get_authorization): add a header handler to the message to catch
2563 Authentication-Info/Proxy-Authentication-Info headers so that if
2564 there's a nextnonce, we can start using it. #471380.
2566 * libsoup/soup-auth-basic.c (update): Implement. (Updating an
2567 existing Basic auth always invalidates it.)
2569 * tests/http.conf.in:
2570 * tests/auth-test.c: add a test for digest nonce handling
2572 2007-12-20 Dan Winship <danw@gnome.org>
2574 * libsoup/soup-path-map.c: New type representing a sparse
2575 path->something mapping
2577 * libsoup/soup-server.c: Use SoupPathMap to record handlers. Make
2578 SoupServerHandler a private type.
2579 (soup_server_new): Rewrite this to just be a thin wrapper, and put
2580 all of the code into a constructor override. #491653
2581 (soup_server_add_handler): Turn the "unregister" arg into a
2582 GDestroyNotify, for better bindability.
2584 2007-12-19 Dan Winship <danw@gnome.org>
2586 * libsoup/soup-server.c: define new request_started, request_read,
2587 request_finished, and request_aborted signals, for finer-grained
2588 tracking than normal handlers allow.
2589 (check_auth): split this out of call_handler, and run it
2590 immediately after "got_headers", not "got_body", so that we can
2591 preemptively reject "Expect: 100-continue" messages that will
2594 * libsoup/soup-message-io.c (io_write, io_read): Fix up
2595 100-continue processing
2597 * tests/continue-test.c: new test of client/server 100-continue
2600 2007-12-19 Dan Winship <danw@gnome.org>
2602 * libsoup/soup-socket.c: Cleanup. Remove the "connect_result"
2603 signal. Make local_address and remote_address
2604 into (construct-only) properties.
2605 (soup_socket_connect_async, soup_socket_connect_sync): Replace
2606 soup_socket_connect. _async takes a callback+user_data (like the
2607 old soup_socket_client_new_async), but doesn't implement the
2608 callback in terms of a connect_result signal.
2609 (soup_socket_client_new_async, soup_socket_client_new_sync): Gone.
2610 (Unused since the async_context addition anyway). Replaced by the
2611 new construct properties and connect methods.
2612 (soup_socket_read, soup_socket_read_until, soup_socket_write):
2613 Make these actually take a GError rather than doing an ugly hack
2614 to preserve the old API.
2615 (SOUP_SOCKET_FLAG_NODELAY, SOUP_SOCKET_FLAG_REUSEADDR)
2616 (SOUP_SOCKET_FLAG_CLOEXEC): kill these off (all three are always
2617 TRUE now); SoupSocket is libsoup's socket API; it's not
2618 necessarily intended to be generically useful for everyone.
2620 * *.c: Update for SoupSocket changes
2622 2007-12-19 Dan Winship <danw@gnome.org>
2624 * libsoup/soup-server-message.c: Kill!
2626 * libsoup/soup-message-server-io.c (parse_request_headers):
2627 Generate the full request URL from the socket's data, since we no
2628 longer have soup_server_message_get_server().
2630 * libsoup/soup-server.c (request_finished, call_handler)
2631 (start_request, new_connection): update
2633 2007-12-19 Dan Winship <danw@gnome.org>
2635 * libsoup/soup-message-headers.c: Add some more fields to
2636 SoupMessageHeaders, and start caching the parsed values of certain
2638 (soup_message_headers_get/set_encoding): replaces old SoupMessage
2639 methods, and only deals with the declared transfer encoding, not
2641 (soup_message_headers_get/set_content_length): Handle
2643 (soup_message_headers_get_expectations): Handle Expect. (Replaces
2644 the SOUP_MESSAGE_EXPECT_CONTINUE flag).
2646 * libsoup/soup-message.c (soup_message_get_request_encoding):
2647 (soup_message_get_response_encoding):
2648 (soup_message_set_response_encoding): replaced by
2649 SoupMessageHeaders methods.
2651 * libsoup/soup-message-client-io.c:
2652 * libsoup/soup-message-server-io.c:
2653 * libsoup/soup-message-io.c: Update for SoupMessageHeaders changes
2654 with encoding/content-length stuff.
2656 2007-12-19 Dan Winship <danw@gnome.org>
2658 * libsoup/soup-message-body.c (SoupMessageBody): new opaque type
2659 for request/response bodies allowing less hacky handling of
2661 (SoupBuffer): refcounted buffer type
2663 * libsoup/soup-message.h (SoupMessage): turn request and response
2664 members into SoupMessageBody.
2665 (SoupOwnership, SoupDataBuffer): gone, replaced by
2666 SoupMessageBody/SoupBuffer.
2668 * libsoup/soup-message.c (soup_message_wrote_chunk)
2669 (soup_message_got_chunk): add the chunk as a signal param rather
2670 than having it be visible in msg->request/response.
2671 (soup_message_add_chunk, soup_message_add_final_chunk)
2672 (soup_message_pop_chunk): replaced by SoupMessageBody methods now.
2674 2007-12-19 Dan Winship <danw@gnome.org>
2676 * libsoup/soup-xmlrpc.c:
2677 * libsoup/soup-value-utils.c: Oops. Change the API a bunch so this
2678 works on x86; apparently I was doing illegal things with va_lists
2679 before that only work on x86_64.
2681 2007-12-14 Dan Winship <danw@gnome.org>
2683 * libsoup/soup-message.c: use GObject properties for SoupMessage
2686 * libsoup/soup-message-server-io.c:
2687 * libsoup/soup-soap-message.c: update for that
2689 2007-12-14 Dan Winship <danw@gnome.org>
2691 * libsoup/soup-uri.c: Rename from SoupUri to SoupURI. Use the
2692 slice allocator and register as a boxed type.
2693 (SoupURI): Rename "protocol" field to "scheme" and "passwd" to
2694 "password". Make scheme an interned string. Replace
2695 SOUP_PROTOCOL_HTTPS with soup_uri_is_https().
2699 2007-12-14 Dan Winship <danw@gnome.org>
2701 * libsoup/Makefile.am: Use glib-mkenums to build soup-enum-types.c
2702 and soup-enum-types.h
2704 * libsoup/soup-address.h (SoupAddressFamily): redo this definition
2705 again, to make glib-mkenums happy.
2707 2007-12-13 Dan Winship <danw@gnome.org>
2709 * libsoup/soup-xmlrpc.c: New easier-to-use and
2710 easier-to-do-language-bindings-of XML-RPC code.
2712 * libsoup/soup-xmlrpc-message.c:
2713 * libsoup/soup-xmlrpc-response.c: gone
2715 * libsoup/soup-value-utils.c: Utilites for working with
2716 GValueArray, and GHashTables of GValues, used by soup-xmlrpc.
2719 * tests/xmlrpc-test.c: Update to use new XML-RPC stuff
2721 2007-12-13 Dan Winship <danw@gnome.org>
2723 * libsoup/soup-date.c: Make a SoupDate type, and redo in terms of
2724 that rather than struct tm and time_t. Also be much more liberal
2727 * libsoup/soup-xmlrpc-message.c (soup_xmlrpc_message_write_datetime):
2728 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_datetime):
2731 * tests/date.c: Use SoupDate, test parsing lots more formats
2733 * tests/xmlrpc-test.c: update for SoupDate
2735 2007-12-12 Dan Winship <danw@gnome.org>
2737 * libsoup/soup-message.c:
2738 * libsoup/soup-message-private.h: Remove SoupMessageStatus,
2739 msg->status, and soup_message_io_* from the public API, as they
2740 all really belong to the session, not the message. (For now
2741 they've just been moved to soup-message-private.h, but some day
2742 they'll be fully refactored away from SoupMessage.)
2744 * libsoup/soup-server.c (soup_server_pause_message)
2745 (soup_server_unpause_message):
2746 * libsoup/soup-session.c (soup_session_pause_message)
2747 (soup_session_unpause_message): session/server-level methods to
2748 replace soup_message_io_pause() and soup_message_io_unpause().
2750 * libsoup/soup-server-message.c: Remove some unused methods
2754 2007-12-05 Dan Winship <danw@gnome.org>
2756 * libsoup/soup-connection.c:
2757 * libsoup/soup-session.c: replace message filters with a
2758 "request_started" signal
2760 * libsoup/soup-message-filter.c: gone
2762 * libsoup/soup-types.h (SOUP_MAKE_INTERFACE): no longer needed
2764 2007-12-05 Dan Winship <danw@gnome.org>
2766 * libsoup/soup-uri.c: Update for RFC 3986 changes, bgo 266516, and
2768 (soup_uri_get_protocol): match protocols case-insensitively
2769 (soup_uri_new_with_base): Don't fully %-decode the fragment,
2770 query, and path, but do %-decode anything which isn't supposed to
2771 be encoded. Recognize IPv6 address literals. Use stricter
2772 "../"-stripping rules on the path. Reject URIs with junk between
2773 the port number and the path.
2774 (soup_uri_to_string): Update for the fact that the host might be
2775 an IPv6 literal, and for the fact that path, query, and fragment
2776 are now pre-escaped.
2777 (soup_uri_equal): compare hostnames case-insensitively
2778 (uri_encoded_char): update to match RFC 3986
2779 (append_uri_encoded): use uppercase hex letters as recommended by
2781 (soup_uri_normalize): decode only %-escapes that don't belong
2784 * docs/reference/tmpl/soup-uri.sgml: add some more SoupUri docs
2786 * tests/uri-parsing.c: Add new tests from RFC 3986, RFC 2732, RFC
2787 2616, bgo 266516, and elsewhere. Update some tests to match new
2788 parsing/unparsing rules.
2790 2007-12-05 Dan Winship <danw@gnome.org>
2792 * libsoup/soup-message.c (soup_message_new)
2793 (soup_message_new_from_uri): g_intern_string() the method name
2794 rather than assuming it's static. Also remove the NULL==GET
2797 * libsoup/soup-method.c:
2798 * libsoup/soup-method.h: remove the SOUP_METHOD_ID_* macros, and
2799 have the SOUP_METHOD_* macros return interned strings
2801 * libsoup/soup-server.h (SoupServerContext): remove method_id
2804 * libsoup/soup-server-message.c (finalize): no longer needed,
2805 since smsg->method is now an interned string just like with a
2808 * libsoup/soup-soap-message.c (soup_soap_message_new_from_uri):
2809 remove NULL==GET assumption
2813 2007-12-05 Dan Winship <danw@gnome.org>
2815 * libsoup/soup-message.h (SoupHTTPVersion): rename (from
2818 * libsoup/soup-message-headers.c: New opaque type representing
2819 message headers, and new methods that work on it. Uses an array
2820 rather than a hash table, to preserve header ordering as required
2821 by RFC 2616. (Also fixes the API wart that
2822 "soup_message_get_header", etc, did not actually take a
2825 * libsoup/soup-message.c: Kill off old header-manipulating
2828 * libsoup/soup-headers.c (soup_headers_parse_request): return a
2829 guint rather than gboolean, so we can properly return
2830 SOUP_STATUS_HTTP_VERSION_NOT_SUPPORTED where appropriate. Also fix
2831 up HTTP-Version parsing to conform with the RFC.
2832 (soup_headers_parse_status_line): Likewise update HTTP-Version
2835 * libsoup/soup-message-server-io.c (parse_request_headers): set
2836 return status appropriately on parse errors
2838 * tests/header-parsing.c: update / add more tests
2842 2007-12-05 Dan Winship <danw@gnome.org>
2844 * libsoup/soup-misc.c: remove deprecated base64 methods
2846 * tests/auth-test.c (identify_auth): oops, update to use
2849 2007-12-05 Dan Winship <danw@gnome.org>
2851 * libsoup/Makefile.am (libsoupinclude_HEADERS): remove
2852 soup-connection.h and soup-message-queue.h
2854 * libsoup/soup-types.h: remove SoupConnection and SoupMessageQueue
2855 which are no longer public
2857 * libsoup/soup.h: sync this to reality for the first time in years
2859 * libsoup/soup-session.c (soup_session_get_queue): Add this, for
2860 subclasses, as the queue is no longer a public part of the session
2863 * libsoup/soup-message.h:
2864 * libsoup/soup-message-private.h: Move soup_message_send_request()
2865 and soup_message_receive_request() to soup-message-private.h,
2866 remove soup_message_send_request_internal().
2868 * libsoup/soup-session-private.h: Move "protected" SoupSession
2869 methods (soup_session_get_connection,
2870 soup_session_try_prune_connection) here from soup-session.h
2871 Add soup_session_get_queue.
2873 2007-12-05 Dan Winship <danw@gnome.org>
2875 * configure.in: bump version to 2.3.0 and SOUP_API_VERSION to 2.4,
2876 and drop AGE/CURRENT/REVISION all to 0.
2878 * libsoup/Makefile.am: Rename library to libsoup-2.4.la
2880 (start of libsoup-2.4 branch)
2882 2007-11-26 Dan Winship <danw@gnome.org>
2884 * configure.in: 2.2.104
2888 2007-11-21 Dan Winship <danw@gnome.org>
2890 * libsoup/soup-message-io.c (soup_message_io_cleanup): make this
2893 * libsoup/soup-message.c (finalize): Use soup_message_io_cleanup()
2894 rather than soup_message_io_stop(), to avoid leaks when finalizing
2895 an unfinished message. (Another part of #498509, Wouter Cloetens.)
2897 2007-11-20 Dan Winship <danw@gnome.org>
2899 Fix up SOUP_SESSION_ASYNC_CONTEXT. #498509, Wouter Cloetens
2901 * libsoup/soup-message-io.c (soup_message_io_unpause): don't leak
2904 * libsoup/soup-server.c (soup_server_quit): disconnect the
2905 "new_connection" handler.
2906 (soup_server_get_async_context): Convenience method to return the
2907 server's async_context.
2909 * libsoup/soup-server-message.c: don't circularly ref the server,
2910 there's no need anyway.
2912 * libsoup/soup-session.c (soup_session_get_async_context):
2913 Convenience method to return the session's async_context.
2915 * libsoup/soup-session-async.c (queue_message): call run_queue in
2916 the session's async_context, not the main context.
2917 (send_message): don't leak the async_context
2919 * libsoup/soup-session-sync.c (queue_message_thread): don't leak
2922 * tests/context-test.c: test that SOUP_SESSION_ASYNC_CONTEXT works
2925 2007-11-20 Dan Winship <danw@gnome.org>
2927 * libsoup/soup-connection.c (soup_connection_connect_async): don't
2928 leak the SoupAddress.
2930 * libsoup/soup-dns.c (soup_dns_lookup_resolve_async): fix a leak
2931 when re-looking up an address
2933 * libsoup/soup-session.c (soup_session_abort): close all
2934 connections in addition to cancelling messages (needed because
2935 connections currently end up holding a ref on their session,
2936 preventing them from being destroyed).
2938 * tests/auth-test.c:
2939 * tests/ntlm-test.c:
2940 * tests/proxy-test.c:
2943 * tests/xmlrpc-test.c: clean up more memory on exit, to help find
2944 leaks in the library
2946 * tests/libsoup.supp: add a zillion new suppressions so we
2947 can use --leak-resolution=med
2949 2007-11-16 Dan Winship <danw@gnome.org>
2951 * libsoup/soup-message-io.c (read_body_chunk): Fix the guards
2952 around the got_chunk emission so that it doesn't get messed up if
2953 you pause the I/O from the got_chunk handler. (#452280, Marco
2955 (soup_message_io_pause, soup_message_io_unpause): Update docs
2956 again; these are now allowed with client-side I/O as well. Fix
2957 unpause() to unpause asynchronously on async sockets.
2959 * libsoup/soup-session-async.c (send_message): Iterate session's
2960 async_context, not the default main context.
2962 * tests/pull-api.c: Test/sample of creating a pull-style API using
2965 * tests/index.txt: new file to act as DirectoryIndex for the
2966 tests. (In particular, pull-api wants this to be largeish.)
2968 2007-10-28 Dan Winship <danw@gnome.org>
2970 * configure.in: 2.2.103
2974 2007-10-28 Dan Winship <danw@gnome.org>
2976 * libsoup/soup-server.c (start_request, request_finished): ref the
2977 socket around the processing of the message, since otherwise it
2978 might already be freed when request_finished runs. #459896.
2980 * libsoup/soup-message-io.c (soup_message_io_pause)
2981 (soup_message_io_unpause): Clarify the docs here; this is for
2982 server-side use only. Inspired by #452280.
2984 * docs/reference/server-howto.xml: You need to watch the
2985 "finished" signal on the message if using soup_message_io_pause()
2986 or chunked encoding, because the client might disconnect while
2987 you're paused. Clarification inspired by #471385.
2989 * tests/simple-proxy.c (client_msg_failed): Fix this to DTRT since
2990 server-howto.xml points to it as an example of what to do.
2992 2007-10-28 Dan Winship <danw@gnome.org>
2994 * libsoup/soup-session.c (finalize): free proxy-related stuff
2996 * libsoup/soup-session-async.c (idle_run_queue): clean up the weak
2997 pointer. (From the dev repo, but identical to a patch from Rob
2998 Bradford in #484988.)
3000 * tests/*.c: fix leaks
3002 2007-10-28 Dan Winship <danw@gnome.org>
3004 * tests/auth-test.c:
3006 * tests/header-parsing.c:
3007 * tests/ntlm-test.c:
3008 * tests/proxy-test.c:
3009 * tests/uri-parsing.c:
3010 * tests/xmlrpc-test.c: Make these less verbose by default (to make
3011 it easier to see what failed when a "make check" fails).
3013 2007-10-15 Dan Winship <danw@gnome.org>
3015 * configure.in: 2.2.102
3019 2007-10-08 Dan Winship <danw@gnome.org>
3021 * libsoup/soup-nossl.c: Update for current soup-ssl.h prototypes
3023 * tests/proxy-test.c (run_test): wrap https tests in #if HAVE_SSL
3025 2007-10-05 Dan Winship <danw@gnome.org>
3027 * configure.in: 2.2.101
3031 * tests/httpd.conf.in:
3032 * tests/Makefile.am:
3033 * tests/ssl-test.c: srcdir != builddir fixes
3035 2007-10-05 Dan Winship <danw@gnome.org>
3037 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Don't crash
3038 if the authenticate callback returns a username and no password
3039 (even though it's not supposed to do that). #480987
3041 2007-09-24 Dan Winship <danw@gnome.org>
3043 * libsoup/soup-auth.h (SoupAuth): add "realm" field to the struct.
3044 (SoupAuthClass) remove "get_realm" virtual method.
3046 * libsoup/soup-auth.c (soup_auth_new_from_header_list): Parse the
3047 WWW-Authenticate/Proxy-Authenticate header here, set realm, and
3048 pass the params hash to the construct method.
3049 (soup_auth_get_info): Return an identifier for the auth:
3052 * libsoup/soup-auth-basic.c:
3053 * libsoup/soup-auth-digest.c: update
3055 * libsoup/soup-session.c (invalidate_auth, update_auth_internal):
3056 use soup_auth_get_info().
3058 2007-09-24 Dan Winship <danw@gnome.org>
3060 * libsoup/soup-date.c (soup_date_parse): minor rfc850-date parsing
3061 improvement suggested by RFC2616 19.3.
3063 * libsoup/soup-headers.c (soup_headers_parse_request): allow
3064 erroneous trailing whitespace after HTTP version. #475169
3066 * libsoup/soup-message-server-io.c (parse_request_headers): fix
3067 the parsing of the Host header to assume it already includes the
3068 port (which it should; the only reason this ever worked is because
3069 SoupUri ignores the second port number when parse_request_headers
3070 generates a URL like "http://localhost:9999:9999/").
3072 * tests/header-parsing.c (reqtests): add a test for #475169
3074 2007-09-23 Dan Winship <danw@gnome.org>
3076 * libsoup/soup-message.c (soup_message_class_init): remove a
3077 mysterious partial sentence in the ::wrote-chunk docstring.
3080 * docs/reference/libsoup-sections.txt: Remove documentation of MD5
3081 methods, which are not public. #440092
3083 2007-09-23 Dan Winship <danw@gnome.org>
3085 * libsoup/soup-message.c (soup_message_set_auth)
3086 (soup_message_set_proxy_auth): Only remove the Authorization /
3087 Proxy-Authorization header from the message if it was previously
3088 set by soup_message_set_auth(). (Eg, not if it was added by
3089 SoupConnectionNTLM.) #471389
3091 * libsoup/soup-connection-ntlm.h: fix a search-and-replace-o
3093 * tests/ntlm-test.c: Simple NTLM regression test; doesn't really
3094 test the crypto/encoding bits, just that the right headers are
3095 being sent at the right times.
3097 2007-09-14 Dan Winship <danw@gnome.org>
3099 Make "make check" pass on Fedora 7:
3101 * configure.in: update apache/php tests with additional filenames
3103 * tests/httpd.conf.in: updates for configure.in changes and
3104 slightly-more-recent apache
3106 * tests/ssl-test.c (start_writing): fix uninitialized struct field
3107 (main): start server after setting up client since otherwise
3108 there's a race condition since soup_gnutls_init() isn't actually
3109 thread-safe. (FIXME)
3111 * tests/xmlrpc-server.php: rewrite to not use $HTTP_RAW_POST_DATA
3112 (which only exists if register_globals is set)
3114 2007-06-01 Dan Winship <danw@novell.com>
3116 * libsoup/soup-message-filter.h (SOUP_IS_MESSAGE_FILTER_CLASS):
3117 fix. noted by "cascardo" on libsoup-list.
3119 2007-05-16 Jonathon Jongsma <jjongsma@gnome.org>
3121 * libsoup/*.h: add G_BEGIN_DECLS / G_END_DECLS to all installed
3122 headers so that libsoup can be used from C++ programs. #438776
3124 2007-04-16 Dan Winship <danw@novell.com>
3126 * libsoup/soup-ssl.h: Make a real SoupSSLCredentials type rather
3127 than just using gpointer
3129 * libsoup/soup-server.c (SoupServerPrivate): use it
3131 * libsoup/soup-session.c (SoupSessionPrivate): use it
3133 * libsoup/soup-gnutls.c: Use it, and consistently use "creds"
3134 rather than "cred" as the abbreviation for "credentials".
3136 * docs/reference/libsoup-sections.txt:
3137 * docs/reference/tmpl/soup-misc.sgml:
3138 * docs/reference/tmpl/soup-ssl.sgml: update
3140 2007-03-29 Dan Winship <danw@novell.com>
3142 * libsoup/soup-session-sync.c (queue_message): Implement this by
3143 sending the message (synchronously) in another thread and then
3144 queueing the callback back in the main thread.
3146 * libsoup/soup-session.c (soup_session_queue_message): update docs
3147 to be more explicit about what thread the callback occurs in
3149 2007-03-17 Dan Winship <danw@novell.com>
3151 * libsoup/soup-message.c (soup_message_set_auth)
3152 (soup_message_get_auth, soup_message_set_proxy_auth)
3153 (soup_message_get_proxy_auth): get/set auth/proxy_auth info for a
3156 * libsoup/soup-session.c (add_auth): Use soup_message_set_auth and
3157 soup_message_set_proxy_auth.
3158 (update_auth_internal): Call soup_message_get_auth or
3159 soup_message_get_proxy_auth to determine the message's prior auth,
3160 rather than calling lookup_auth() again, since it isn't guaranteed
3161 to return the same thing now as it did when the message was
3162 originally sent. Fixes erroneous 401s when queuing multiple
3163 messages at once to an as-yet-unauthenticated-to server. #271540
3165 * libsoup/soup-session-async.c (queue_message): don't run the
3166 queue right away, do it at idle time. Otherwise in some cases
3167 (especially errors), the message callbacks could be invoked before
3168 queue_message returns.
3170 * tests/auth-test.c: add a regression test for #271540.
3172 2007-03-17 Dan Winship <danw@novell.com>
3174 * configure.in: require glib 2.12. check for timegm().
3176 * libsoup/soup-date.c (soup_mktime_utc): Use timegm if available.
3177 (soup_date_iso8601_parse): use g_time_val_from_iso8601. #337010,
3178 patch from Emmanuele Bassi.
3180 * libsoup/soup-types.h: remove local copy of
3181 G_GNUC_NULL_TERMINATED since we now depend on a new-enough copy of
3184 * libsoup/soup-misc.c (soup_base64_encode_close)
3185 (soup_base64_encode_step, soup_base64_encode)
3186 (soup_base64_decode_step): Make these just be wrappers around the
3187 glib base64 methods. (For now; eventually they'll just go away.)
3189 * libsoup/soup-auth-basic.c (authenticate):
3190 * libsoup/soup-auth-digest.c (authenticate):
3191 * libsoup/soup-connection-ntlm.c (soup_ntlm_parse_challenge)
3192 (soup_ntlm_response):
3193 * libsoup/soup-server-auth.c (soup_server_auth_new):
3194 * libsoup/soup-soap-message.c (soup_soap_message_write_base64):
3195 * libsoup/soup-xmlrpc-message.c
3196 (soup_xmlrpc_message_write_base64):
3197 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_base64):
3198 Use glib base64 methods
3200 2007-03-16 Dan Winship <danw@novell.com>
3202 * libsoup/soup-message.c (soup_message_get_response_encoding):
3203 update the handling of CONNECT: it has no response body by
3204 default, but does have a body if its headers say so.
3206 * tests/proxy-test.c: test libsoup's behavior when talking to
3209 * tests/httpd.conf.in: Load mod_proxy and mod_ssl, and add
3210 sections configuring them, for proxy-test
3212 * configure.in: update the apache-module-dir-finding code to deal
3213 with the fact that some modules (eg, mod_ssl) might only be in the
3214 mpm-specific module dir, while others (eg, mod_php5) might only be
3215 in the generic module dir.
3217 2007-03-12 Dan Winship <danw@novell.com>
3219 * tests/Makefile.am (INCLUDES): add $(LIBGNUTLS_CFLAGS) for
3220 ssl-test. #417617, patch from Elijah Newren.
3222 2007-03-12 Dan Winship <danw@novell.com>
3224 * libsoup/soup-session-sync.c (wait_for_connection): if
3225 soup_connection_connect_sync() returns SOUP_STATUS_TRY_AGAIN, then
3226 try again. (Duh.) Fixes SSL-via-proxy-when-using-synchronous-I/O-
3227 where-the-proxy-closes-the-connection-when-returning-407. (Reported
3230 * tests/get.c: Rewrite to use soup_session_send_message rather
3231 than soup_session_queue_message, and add a "-s" flag to use
3232 SoupSessionSync rather than SoupSessionAsync (so we can test bugs
3233 in the sync code paths).
3235 2007-03-08 Dan Winship <danw@novell.com>
3237 * libsoup/soup-gnutls.c (do_handshake): don't return
3238 G_IO_STATUS_AGAIN if we're doing blocking I/O; just keep retrying
3239 until the handshake is complete.
3240 (soup_gnutls_read, soup_gnutls_write): if we get
3241 GNUTLS_E_REHANDSHAKE, call do_handshake() immediately rather than
3242 returning G_IO_STATUS_AGAIN; if the socket is blocking then
3243 G_IO_STATUS_AGAIN is wrong, and if the socket is non-blocking, we
3244 might already need to return SOUP_SSL_ERROR_HANDSHAKE_NEEDS_WRITE
3245 or SOUP_SSL_ERROR_HANDSHAKE_NEEDS_READ.
3247 #415402, based on a patch from Jacob Berkman.
3249 * tests/ssl-test.c: basic ssl test. In particular, tests that
3250 rehandshake requests are handled correctly during both synchronous
3251 and asynchronous I/O. Might eventually test other stuff too...
3254 * tests/Makefile.am: updates for ssl-test
3256 2007-02-19 Dan Winship <danw@novell.com>
3258 * configure.in: Get gcrypt libs/cflags.
3260 * libsoup/Makefile.am (INCLUDES, libsoup_2_2_la_LIBADD): add
3261 gcrypt flags. Patch from "Cygwin Ports Maintainer", #384498
3263 2007-02-12 Dan Winship <danw@novell.com>
3265 * configure.in: 2.2.100
3267 2007-02-12 Dan Winship <danw@novell.com>
3269 * libsoup/soup-headers.c (soup_headers_parse_status_line): Fix
3270 this to handle "\0"-terminated status lines (eg, from WebDAV
3271 responses), like the docs say it does. #406997
3272 (soup_headers_parse): Balance that out by rejecting internal "\0"s
3274 (soup_headers_parse_request, soup_headers_parse_response): Update
3275 docs to warn that @dest may be modified even on error. (This was
3276 always true, it just wasn't documented.)
3278 2007-01-16 Dan Winship <danw@novell.com>
3280 * tests/header-parsing.c (do_request_tests, do_response_tests):
3281 initialize "errors" to 0. duh. Pointed out by Michael Wolf.
3283 2007-01-08 Dan Winship <danw@novell.com>
3285 * configure.in: 2.2.99
3289 2007-01-06 Dan Winship <danw@novell.com>
3291 * libsoup/soup-headers.c (soup_headers_parse): Rewrite this to be
3292 easier to understand and more correct, and make the "str" param
3293 const rather than overwriting it during parsing.
3294 (soup_headers_parse_request, soup_headers_parse_response):
3295 Likewise, make "str" param const. Fix the doc comment to describe
3296 the correct constraint on str. Make the parsing slightly more
3297 lenient as per sections 4.1 and 19.3 of RFC 2616.
3299 * tests/header-parsing.c: new regression test, for Request-Line,
3300 Status-Line, and message-header parsing.
3302 Inspired by #391970 (crash in SoupServer when certain invalid
3303 requests are received).
3305 2006-12-05 Dan Winship <danw@novell.com>
3307 * libsoup/soup-message.c (soup_message_set_uri): Remove the calls
3308 to soup_message_io_stop() here; the corresponding calls were
3309 needed back in the SoupContext days, but they are wrong now and
3310 cause async-redirects-to-other-hosts to fail. #382251. Also
3311 clarify docs with respect to soup_session_requeue_message().
3313 * libsoup/soup-message-io.c (soup_message_io_stop): Clarify docs
3315 * libsoup/soup-session.c (finalize): Free ssl_creds. Pointed out
3318 2006-11-20 Dan Winship <danw@novell.com>
3320 * configure.in: 2.2.98
3324 2006-11-20 Dan Winship <danw@novell.com>
3326 Patch from Andrew W. Nosenko:
3328 * libsoup/soup-message-client-io.c (parse_response_headers): Avoid
3329 memory leak when parse_response_headers() is called on a message
3330 that has a 'reason_phrase' already for some reason.
3332 * libsoup/soup-gnutls.c (soup_gnutls_free): Avoid memory leak:
3333 hostname was not freed.
3334 (soup_ssl_wrap_iochannel): Avoid memory leak: SoupGNUTLSChannel
3335 'chan' was not freed in case of initialization error. Avoid double
3336 close of the "real" (plain, non-ssl) channel FD.
3338 * libsoup/soup-socket.c (soup_socket_start_proxy_ssl): Avoid
3339 memory leak: the "real" (plain, non-ssl) GIOChannel was never
3340 "finally" unreffed (one more *_ref() than *_unref()) in case of
3343 2006-11-20 Dan Winship <danw@novell.com>
3345 * libsoup/soup-connection-ntlm.c (send_request):
3346 * libsoup/soup-session-sync.c (queue_message):
3347 * libsoup/soup-status.c (reason_phrases): Add some missing
3348 "static"s. Patch from Matthias Clasen, #376387
3350 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_type)
3351 (soup_xmlrpc_value_get_string): <value>foo</value> should mean the
3352 same thing as <value><string>foo</string></value>. Pointed out by
3353 Todd Kulesza. #364490
3355 2006-11-06 Dan Winship <danw@novell.com>
3357 * configure.in: Bump version to 2.2.97. Bump AGE and CURRENT for
3358 addition of soup_xml_real_node.
3362 2006-11-06 Dan Winship <danw@novell.com>
3364 * libsoup/soup-misc.c (soup_xml_real_node): new method to find a
3365 "real" (ie, not comment or whitespace) xml node
3367 * libsoup/soup-soap-response.c (parse_parameters)
3368 (soup_soap_response_from_string)
3369 (soup_soap_parameter_get_first_child)
3370 (soup_soap_parameter_get_next_child): Use soup_xml_real_node.
3371 Based on a patch from Andrew W. Nosenko.
3373 * libsoup/soup-xmlrpc-message.c (soup_xmlrpc_message_from_string):
3374 don't call xmlKeepBlanksDefault, which changes libxml's behavior
3375 globally! Instead, use soup_xml_real_node() when traversing the
3378 * libsoup/soup-xmlrpc-response.c
3379 (soup_xmlrpc_response_from_string): don't call
3380 xmlKeepBlanksDefault.
3381 (exactly_one_child): rewrite in terms of soup_xml_real_node()
3382 (which means it handles comments now as well)
3383 (soup_xmlrpc_value_get_struct)
3384 (soup_xmlrpc_value_array_get_iterator)
3385 (soup_xmlrpc_value_array_iterator_prev)
3386 (soup_xmlrpc_value_array_iterator_next): Use soup_xml_real_node.
3388 2006-11-05 Dan Winship <danw@novell.com>
3390 * libsoup/soup-headers.c (soup_headers_parse_request): document
3391 this (in particular, point out that str+len must point to exactly
3392 the right place). Allow req_method and req_path to be NULL.
3393 (soup_headers_parse_status_line, soup_headers_parse_response):
3394 document. Also, change "status_phrase" argument to "reason_phrase"
3395 to match the spec. Inspired by #339889.
3397 2006-11-03 Dan Winship <danw@novell.com>
3399 * libsoup/*.c: fix lots of warnings. Partially from patches from
3400 Andrew W. Nosenko, and also some fixes from libsoup-pre214-branch.
3402 2006-11-03 Dan Winship <danw@novell.com>
3404 * Makefile.am (uninstall-local): uninstall the pkgconfig file.
3405 Based on #356809 from Matthew Barnes.
3407 * libsoup/soup-server.c (get_property): Fix leaks pointed out by
3408 Paolo Borelli. #351500
3410 * libsoup/soup-uri.c (soup_uri_get_protocol): Fix an off by one
3411 pointed out by Andrew W. Nosenko.
3413 * configure.in: Use pkgconfig to find gnutls. Remove old static
3414 linking stuff that was only needed for rcd.
3416 * acinclude.m4: remove gnutls stuff
3418 * libsoup.pc.in: Use Requires rather than putting xml/ssl
3419 dependencies directly into Libs/Cflags. From Mikhail Zabaluev.
3422 * libsoup/Makefile.am (libsoup_2_2_la_LDFLAGS): fix build on
3423 cygwin. From "Cygwin Ports maintainer", #321827.
3425 2006-07-24 Dan Winship <danw@novell.com>
3427 * configure.in: 2.2.96. bump AGE and CURRENT for new API
3431 * libsoup/soup-xmlrpc-message.c (soup_xmlrpc_message_from_string):
3432 New, from Fernando Herrera, bug 348532.
3434 2006-07-21 Dan Winship <danw@novell.com>
3436 * libsoup/soup-auth.c (soup_auth_new_from_header_list): if the
3437 constructed auth doesn't have a realm, it's invalid, as per RFC
3438 2617. Based on a patch from Nate Nielsen on libsoup-list.
3439 (soup_auth_get_realm): remove "if available" from docs; all auths
3440 always have a realm.
3442 * libsoup/soup-message-server-io.c (get_response_headers): If the
3443 server handler set a Content-Length header on the message, don't
3444 add a second one. (Preserves compatibility with an old hacky way
3445 that people might have been handling HEAD from SoupServer.)
3447 * README: update to mention mailing list and bugzilla
3449 * HACKING: kill this since there's nothing here that isn't either
3450 obvious, or redundant with the README
3452 2006-07-21 Dan Winship <danw@novell.com>
3454 * libsoup/soup-server-message.c (soup_server_message_init):
3455 initialize encoding to SOUP_TRANSFER_CONTENT_LENGTH rather than
3456 SOUP_TRANSFER_UNKNOWN, since SOUP_TRANSFER_UNKNOWN has never
3457 actually worked here, and so there was an undocumented requirement
3458 that you manually set the encoding on every response
3459 (which SoupServer itself was not doing on internal errors).
3460 Problem pointed out by Dennis Jacobfeuerborn on libsoup-list.
3461 (soup_server_message_set_encoding): reject the new
3462 SoupTransferEncoding values, for compatibility
3464 * libsoup/soup-message.h (SoupTransferEncoding): Clarify that
3465 SOUP_TRANSFER_UNKNOWN is essentially an error value, since in the
3466 public API, it always has been, due to bugs. Add some new values,
3467 currently just for internal use: SOUP_TRANSFER_NONE (for cases
3468 like HEAD which never have a body), SOUP_TRANSFER_EOF (to replace
3469 SOUP_TRANSFER_UNKNOWN), and SOUP_TRANSFER_BYTERANGES (which isn't
3470 actually implemented yet).
3472 * libsoup/soup-message.c (soup_message_get_request_encoding,
3473 soup_message_get_response_encoding): figure out the body encoding
3474 being used by the request/response, including all the tricky
3475 cases like HEAD/1xx/etc.
3476 (soup_message_is_keepalive): if the response encoding is
3477 SOUP_TRANSFER_EOF, then the message isn't keepalive.
3479 * libsoup/soup-message-client-io.c (parse_response_headers): use
3480 soup_message_get_response_encoding.
3482 * libsoup/soup-message-server-io.c (parse_request_headers): use
3483 soup_message_get_request_encoding.
3484 (get_response_headers): use both soup_server_message_get_encoding
3485 and soup_message_get_response_encoding, to properly distinguish
3486 between the wire encoding and the alleged-by-headers encoding
3487 (which differ for HEAD, etc).
3489 * libsoup/soup-message-io.c (io_error, read_body_chunk):
3490 s/SOUP_TRANSFER_UNKNOWN/SOUP_TRANSFER_EOF/.
3491 (io_body_state): if encoding is SOUP_TRANSFER_NONE, jump right to
3492 SOUP_MESSAGE_IO_STATE_FINISHING.
3494 * libsoup/soup-server.c (request_finished): Check
3495 soup_socket_is_connected() *before* soup_message_is_keepalive(),
3496 since the message will be invalid if the client unexpectedly
3497 dropped the connection.
3499 * tests/simple-httpd.c (server_callback): handle HEAD requests.
3500 Remove no-longer-necessary soup_server_message_set_encoding()
3503 * tests/get.c: add -d (debug) flag to print headers, and -h flag
3504 to do a HEAD rather than GET
3506 2006-07-10 Dan Winship <danw@novell.com>
3508 * configure.in: 2.2.95.1, and bump SOUP_AGE/SOUP_CURRENT this
3509 time. Pointed out by Daniel Holbach.
3511 2006-07-10 Dan Winship <danw@novell.com>
3513 * configure.in: 2.2.95
3517 2006-06-19 Dan Winship <danw@novell.com>
3519 * tests/Makefile.am (noinst_PROGRAMS): don't build xmlrpc-test
3520 unless we have apache/php/xmlrpc-epi. Fixes the build. #345342
3522 * configure.in: fix some quoting
3524 2006-06-14 Dan Winship <danw@novell.com>
3526 * configure.in: add tests for apache mod_php5 and xmlrpc-epi-php
3528 * tests/xmlrpc-test.c: XML-RPC regression test
3530 * tests/xmlrpc-server.php: PHP server for xmlrpc-test
3532 * tests/httpd.conf.in: add php stuff
3534 * tests/apache-wrapper.c (apache_cleanup): Use "graceful-stop"
3535 rather than "stop", so that it stops listening on the socket
3536 before exiting, so that we can immediately start another apache
3537 (eg, in "make check").
3539 * libsoup/soup-date.c (soup_mktime_utc): Fix a bug in leap-year
3542 * libsoup/soup-xmlrpc-message.c
3543 (soup_xmlrpc_message_write_datetime): rename from
3544 "..._write_time", to make it consistent with the XML-RPC type name
3545 and the corresponding SoupXmlrpcResponse method. Also, fix it to
3546 use the same ISO 8601 format as the spec, and use the right value
3547 for the seconds field.
3548 (soup_xmlrpc_message_write_base64): Change the buf arg to a
3549 gconstpointer rather than a const char *.
3551 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_base64):
3552 Return a GByteArray containing the decoded data, rather than
3553 the base64-encoded string.
3554 (soup_xmlrpc_value_dump_internal): Update for that (and don't
3556 (soup_xmlrpc_value_array_get_iterator,
3557 soup_xmlrpc_value_array_iterator_get_value): Make these actually
3560 2006-06-12 Dan Winship <danw@novell.com>
3562 * configure.in: 2.2.94
3566 2006-06-12 Dan Winship <danw@novell.com>
3568 * docs/reference/client-howto.xml:
3569 * docs/reference/server-howto.xml: New client and server API
3572 * docs/reference/*: reorganize, regenerate, fill in some missing
3575 * libsoup/soup-connection.c (soup_connection_new): document the
3578 * libsoup/soup-date.h: sync prototypes to declarations for gtk-doc.
3580 * libsoup/soup-headers.c (soup_headers_parse_response): fix typo
3583 2006-06-12 Dan Winship <danw@novell.com>
3585 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_int,
3586 soup_xmlrpc_value_get_double): Further fixes from Brent Smith.
3588 (soup_xmlrpc_value_get_boolean): Similar fix, plus actually set
3589 the output parameter and make the return value match the other
3592 2006-06-09 Dan Winship <danw@novell.com>
3594 * configure.in: Add tests for apache, output tests/httpd.conf
3598 * tests/httpd.conf.in: Apache 2.2 config files for auth-test
3600 * tests/apache-wrapper.c (apache_init, apache_cleanup): functions
3601 to start/stop apache
3603 * tests/auth-test.c: Use apache-wrapper functions to start a local
3604 apache process to test authentication against, since the auth-test
3605 tree at developer.ximian.com went missing a long time ago. #311825
3607 * tests/Makefile.am (auth_test_SOURCES): use apache-wrapper.c
3608 (TESTS): include auth-test if HAVE_APACHE.
3610 * libsoup/soup-session.c (lookup_auth): Fix this in the case of a
3611 URI pointing to a directory rather than a file.
3613 2006-06-08 Dan Winship <danw@novell.com>
3615 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_int,
3616 soup_xmlrpc_value_get_double, soup_xmlrpc_value_get_boolean):
3617 Check return value of strtol/g_ascii_strtod correctly. #344222,
3618 patch from Brent Smith.
3620 2006-06-07 Dan Winship <danw@novell.com>
3622 * libsoup/soup-xmlrpc-response.c
3623 (soup_xmlrpc_response_from_string): record whether or not the
3624 response was a fault.
3625 (soup_xmlrpc_response_is_fault): test that. #343973, patch from
3628 2006-05-29 Dan Winship <danw@novell.com>
3630 * configure.in: 2.2.93
3634 2006-05-29 Dan Winship <danw@novell.com>
3636 * libsoup/soup-message-io.c (SoupMessageIOState): add a new state
3637 "FINISHING" which means "done I/O, but not yet done processing and
3638 cleanup" before "DONE" (which now always means "completely done").
3639 (soup_message_io_stop): disconnect the socket if the read state is
3640 "< FINISHING", not "!= DONE".
3641 (io_error): on an EOF-that-signals-end-of-data, set state to
3642 FINISHING and run io_read().
3643 (io_read, io_write): remove the g_return_if_fails from before.
3644 s/DONE/FINISHING/ in most places. In the FINISHING handler, stop
3645 listening for the readable/writable signal (eg, so we don't end up
3646 reading a following pipelined request), and set the state to DONE.
3647 (soup_message_io_unpause): Only reconnect the readable/writable
3648 signals if the io state isn't DONE. Guard the calls to
3649 io_read/io_write better so that it's safe to call this even after
3650 they are both DONE, since it may be easier for us to test that
3651 than for the caller to.
3653 Fixes 334469, 342640, and another bug caused by the earlier
3654 workaround to 334469. Based on patches and analysis from William
3655 Jon McCann and Armin Bauer.
3657 * tests/simple-proxy.c (main): add g_thread_init (NULL) to make
3658 this work again. (Pointed out by Alex Larsson)
3660 2006-05-26 Dan Winship <danw@novell.com>
3662 * libsoup/soup-socket.c: #include <sys/time.h> for struct timeval.
3665 * libsoup/soup-connection.c (soup_connection_connect_sync): Start
3666 SSL after CONNECTing! Doh. Part of bnc #174255.
3667 (SoupConnectionMode): new enum for the three types of
3668 SoupConnection (direct, proxy, tunnel).
3669 (set_property): set priv->mode according to proxy_uri and
3671 (socket_connect_result, soup_connection_connect_sync): use
3672 priv->mode to decide whether or not to tunnel.
3673 (send_request): Only pass TRUE for is_proxy to
3674 soup_message_send_request if mode is PROXY, not if it's TUNNEL.
3675 (Also part of bnc #174255).
3677 2006-05-26 Dan Winship <danw@novell.com>
3679 * libsoup/soup-message-io.c (soup_message_io_in_progress): tests
3680 if IO is currently in progress on a message.
3682 * libsoup/soup-session-async.c (run_queue): don't process messages
3683 that are io_in_progress. #342545, fix based on analysis from Wang
3684 Xin. (In the future we may want to re-fix this by adding a
3685 REQUEUED message status separate from QUEUED.)
3687 2006-05-22 Dan Winship <danw@novell.com>
3689 * libsoup/soup-session.c (cleanup_hosts): Don't free the hosts
3690 while holding host_lock; that's not allowed and can cause
3691 deadlock. #309867. Based on a patch from Veerapuram Varadhan for
3692 part of bnc #174255.
3694 2006-04-10 Dan Winship <danw@novell.com>
3696 * configure.in: bump version to 2.2.92
3700 2006-04-10 Dan Winship <danw@novell.com>
3702 * libsoup/soup-message-io.c (io_write, io_read): g_return_if_fail
3703 if these get called after the IO is done. This isn't supposed to
3704 happen, but apparently does. Workaround for #334469.
3706 * libsoup/soup-auth-digest.c (qop_types, algorithm_types):
3707 NULL-terminate these so we don't crash when trying to parse an
3708 invalid value. (Flip side of the previous #328615 patch.)
3710 2006-04-02 Dan Winship <danw@novell.com>
3712 * libsoup/soup-server-auth.c (soup_server_auth_context_challenge):
3713 Write out correct digest algorithm value. #328615.
3715 * libsoup/soup-headers.c (soup_headers_parse_request): Rewrite
3716 Request-Line-parsing code to not have a lame max length. #335040.
3718 * Makefile.am (install-data-local): Install the .pc file mode 644,
3721 * libsoup/soup-auth-digest.c:
3722 * libsoup/soup-auth.c:
3723 * libsoup/soup-message-client-io.c:
3724 * libsoup/soup-message-server-io.c:
3725 * libsoup/soup-message.c:
3726 * libsoup/soup-method.c:
3727 * libsoup/soup-server-auth.c:
3728 * tests/get.c: replace locale-ish strcasecmps with
3731 * libsoup/*.c: fix most signed/unsigned mismatch warnings
3733 2006-03-03 Dan Winship <danw@novell.com>
3735 * configure.in: bump version to 2.2.91.
3739 2006-03-03 Dan Winship <danw@novell.com>
3741 * libsoup/soup-dns.c (soup_dns_lookup_resolve_async): Take a
3742 GMainContext as well, and update the resolution code to dispatch
3743 each lookup result in the correct context.
3745 * libsoup/soup-address.c (soup_address_resolve_async_full): New
3746 method that takes a GMainContext to pass to
3747 soup_dns_lookup_resolve_async.
3749 * libsoup/soup-socket.c (soup_socket_connect): Use
3750 soup_address_resolve_async_full. Fixes a problem reported by Armin
3753 * configure.in: update to require glib 2.6, since apparently the
3756 2006-02-25 Veerapuram Varadhan <vvaradhan@novell.com>
3758 * libsoup/soup-connection.c:
3759 * libsoup/soup-session.c:
3760 * libsoup/soup-socket.c: add a "timeout" property,
3761 which gets passed from server to socket, and session to connection
3762 to socket, allowing blocking non-responsive sync connections to
3763 return. Combination of "EAGAIN" && "Blocking" connection is treated
3764 as error and the connection will be terminated and the control
3765 is returned to the caller immediately.
3767 2006-02-02 Tor Lillqvist <tml@novell.com>
3769 * configure.in: Don't use getaddrinfo() etc or try to support IPv6
3770 on Windows, as they are present by default on XP only. We do want
3771 to support Windows 2000, too.
3773 2005-12-21 Dan Winship <danw@novell.com>
3775 * libsoup/soup-date.c (soup_date_iso8601_parse): fix two bugs in
3778 * tests/date.c: add three more ISO 8601 cases, to exercise all the
3781 #324671, from Emmanuele Bassi
3783 2005-11-25 Dan Winship <danw@novell.com>
3785 * README: sync to text on wiki, and point to wiki
3787 * TODO: moved to http://live.gnome.org/LibSoup_2fToDo
3789 2005-11-17 Dan Winship <danw@novell.com>
3791 * libsoup/soup-message-io.c (io_cleanup): clear priv->io_data
3792 right away, to protect against this being re-entered mid-cleanup
3793 (when we unref the connection). #321208, based on a patch from
3796 2005-11-16 Dan Winship <danw@novell.com>
3798 * libsoup/soup-xmlrpc-message.c
3799 (soup_xmlrpc_message_start_member): add the "name" element to the
3800 struct member. #321362, patch from Sebastian Bauer.
3802 2005-11-10 Dan Winship <danw@novell.com>
3804 * configure.in: bump version to 2.2.90. This will not be
3805 officially released, but once these patches have gotten some
3806 testing they may be pulled up to the gnome-2-12 branch.
3808 * libsoup/soup-connection.c:
3809 * libsoup/soup-server.c:
3810 * libsoup/soup-session.c:
3811 * libsoup/soup-socket.c: add an "async-context" property,
3812 which gets passed from server to socket, and session to connection
3813 to socket, allowing async usage outside the main thread. Based on
3814 patches from Armin Bauer and Jürg Billeter.
3816 * libsoup/soup-misc.c (soup_add_io_watch, soup_add_idle,
3817 soup_add_timeout): utility routines to add watches, idles, and
3818 timeouts to non-default GMainContexts.
3820 * libsoup/soup-message-io.c (io_write): set the read state
3821 appropriately after writing a "100 Continue" response
3822 (io_read): More 100-Continue stuff. I don't think this is quite
3823 right so it will probably change again later.
3825 2005-11-01 Dan Winship <danw@novell.com>
3827 * docs/reference/libsoup-docs.sgml: tell it to generate an index
3829 * docs/reference/tmpl/*.sgml: regen with newer gtk-doc
3831 2005-11-01 Dan Winship <danw@novell.com>
3833 * libsoup/soup-connection.c (set_current_request,
3834 clear_current_request): Cast the argument to
3835 g_object_add/remove_weak_pointer to the wrong type, to make gcc
3836 4.1 happy, because C is stupid and "void **" means "a pointer to a
3837 void *", not "a pointer to any kind of pointer".
3839 * libsoup/soup-xmlrpc-response.c
3840 (soup_xmlrpc_value_dump_internal): fix gccism. #320349, from
3843 2005-10-27 Dan Winship <danw@novell.com>
3845 * libsoup/soup-socket.c (soup_socket_client_new_async,
3846 soup_socket_client_new_sync): unref the SoupAddress passed to
3847 soup_socket_connect to avoid a leak. Based on a patch from Wang
3849 (socket_read_watch, read_from_network, socket_write_watch,
3850 soup_socket_write): request and handle G_IO_ERR and G_IO_HUP
3851 events when polling, since poll() will return them whether or not
3852 you asked for them, but glib will ignore them unless you did,
3853 which will result in CPU suckage if such an error occurs. #319305,
3854 patch from Jonathan Matthew.
3856 2005-10-27 Dan Winship <danw@novell.com>
3858 bgo #316313 / bnc #116762, and probably also bgo #318252
3860 * libsoup/soup-message-io.c (soup_message_io_stop): clear io->conn
3861 after releasing it, to make sure we can't accidentally release it
3864 * libsoup/soup-connection.c (clear_current_request): Call
3865 soup_message_io_stop() on the cleared request.
3867 * libsoup/soup-connection-ntlm.c (ntlm_authorize_post): do a
3868 little dance here to make sure the session can't queue another
3869 message on the connection while we're in the process of requeuing
3872 2005-08-30 Tor Lillqvist <tml@novell.com>
3874 * libsoup-zip.in: Include documentation in developer zipfile.
3876 2005-08-22 Dan Winship <danw@novell.com>
3878 * libsoup/soup-soap-message.c (soup_soap_message_class_init): Call
3879 g_type_class_add_private.
3881 * configure.in: Bump to 2.2.6.1
3885 2005-08-22 Dan Winship <danw@novell.com>
3887 * configure.in: Bump to 2.2.6. Bump SOUP_AGE and SOUP_CURRENT for
3888 soup_server_get_socket() addition.
3892 2005-08-22 Dan Winship <danw@novell.com>
3894 * libsoup/soup-connection.c (set_current_request,
3895 clear_current_request): Fix g_object_add/remove_weak_pointer usage
3896 to prevent a crash when canceling a request. From Tambet.
3898 2005-08-16 Dan Winship <danw@novell.com>
3900 Fix a connection leak reported by Tambet.
3902 * libsoup/soup-connection.c (send_request): rather than tracking
3903 the message progress via signals, call
3904 soup_message_send_request_internal() and have it call
3905 soup_connection_release() when it's done.
3906 (request_restarted, request_done): gone
3907 (clear_current_request): handle disconnecting (if necessary) and
3908 updating last_used time here.
3909 (soup_connection_release): Call clear_current_request().
3910 (dispose): Call clear_current_request()
3912 * libsoup/soup-message-client-io.c
3913 (soup_message_send_request_internal): New. Takes a SoupConnection
3914 in addition to the other args, and passes that on to
3917 * libsoup/soup-message-io.c (SoupMessageIOData): add a
3918 SoupConnection field.
3919 (io_cleanup): if io->conn is set, unref it.
3920 (soup_message_io_stop): if io->conn is set, and we ended in a
3921 clean state, call soup_connection_release() on it.
3922 (soup_message_io_client): Add a SoupConnection arg, which gets
3923 reffed and stored in io->conn.
3925 * TODO: misc updates
3927 2005-08-15 Dan Winship <danw@novell.com>
3929 * libsoup/soup-connection.h (soup_connection_new):
3930 * libsoup/soup-server.h (soup_server_new):
3931 * libsoup/soup-session-async.h (soup_session_async_new_with_options):
3932 * libsoup/soup-session-sync.h (soup_session_sync_new_with_options):
3933 * libsoup/soup-socket.h (soup_socket_new): use G_GNUC_NULL_TERMINATED.
3935 * libsoup/soup-types.h (G_GNUC_NULL_TERMINATED): steal the
3936 definition of this from glib 2.8 for use when compiling against
3939 2005-08-15 Tambet Ingo <tambet@ximian.com>
3941 * libsoup/soup-socket.c (update_fdflags, set_property): Fix compilation
3944 * libsoup/soup-server.c (soup_server_get_listener): ditto.
3946 2005-08-12 Dan Winship <danw@novell.com>
3948 * libsoup/soup-server.c (soup_server_get_listener): new method to
3949 get the server's listening socket.
3951 * libsoup/soup-socket.c: add a new "cloexec" property, to set
3952 FD_CLOEXEC on the socket. Update everything for that.
3954 2005-08-05 Dan Winship <danw@novell.com>
3956 * libsoup/soup-socket.c (finalize): Free priv->read_buf. From
3958 (soup_socket_connect): Make sure that get_iochannel() gets called
3959 if the connect succeeds right away, or the socket will fail on
3960 the first read or write. [#312540]
3962 2005-08-01 Dan Winship <danw@novell.com>
3964 * configure.in: drop version back down to 2.2.5 and
3965 SOUP_API_VERSION back to 2.2; due to various snafus, there has
3966 never yet been an official release of the 2.4 API and the GNOME
3967 2.12 betas have been shipping with libsoup 2.2 tarballs (while
3968 jhbuild has been using 2.4, with evolution and related packages
3969 having configure hacks to build against either). As there never
3970 ended up being any API-incompatible changes in the 2.4 series, we
3971 can just merge it back into the 2.2 series and kill off 2.4.
3973 * NEWS: Copy in the 2.2-series news from the gnome-2-10 branch,
3976 * libsoup-zip.in: s/2.2/@SOUP_API_VERSION@/
3978 * libsoup/Makefile.am (libsoupincludedir, lib_LTLIBRARIES,
3979 libsoup_2_2_la_LDFLAGS, libsoup_2_2_la_LIBADD,
3980 libsoup_2_2_la_SOURCES): s/4/2/ in all the places automake won't
3981 let us use a variable.
3983 2005-08-01 Dan Winship <danw@novell.com>
3985 * libsoup/soup-md5-utils.c (soup_md5_final_hex): Finalize a
3986 SoupMD5Context and write out the digest in hex digits.
3988 * libsoup/soup-auth-digest.c (authenticate, compute_response):
3989 * libsoup/soup-server-auth.c (check_digest_passwd): Use that,
3990 rather than duplicating the code in both places here.
3992 Patch from Wim Lewis.
3994 2005-07-15 Dan Winship <danw@novell.com>
3996 * libsoup/soup-session.c (redirect_handler): Allow relative URIs,
3997 since some servers are lame. Based on a patch from Jean-Yves
4000 * tests/uri-parsing.c: add some more tests to make sure that
4001 things that should be %-escaped do get %-escaped
4003 2005-07-06 Tor Lillqvist <tml@novell.com>
4005 * libsoup/soup-date.c (soup_gmtime): Mention in the doc comment
4006 that gmtime() is thread-safe on Windows.
4007 (soup_date_generate): Use soup_gmtime() instead of gmtime_r().
4009 2005-06-14 Dan Winship <danw@novell.com>
4011 * configure.in: check for gmtime_r
4013 * libsoup/soup-date.c: date/time-manipulation functions
4015 * libsoup/soup-xmlrpc-message.c:
4016 * libsoup/soup-xmlrpc-response.c: XMLRPC message classes, from
4017 Mariano Suarez-Alvarez, Fernando Herrera, and Jeff Bailey.
4020 * tests/date.c: soup-date test code
4022 * tests/getbug.c: XMLRPC test code. (Should be switched to use
4023 bugzilla.gnome.org once bgo supports XMLRPC.)
4025 * TODO: XMLRPC is implemented now (but shares the problem with
4026 SOAP that the API is not very good).
4028 2005-06-14 Dan Winship <danw@novell.com>
4030 * libsoup/*.[ch]: add/fix gtk-doc comments, make functions match
4033 * docs/reference/*: update, fix, etc
4035 2005-06-13 Tor Lillqvist <tml@novell.com>
4037 * configure.in: Check also for inet_ntop(). Pre-cache knowledge
4038 that we do have inet_pton() and inet_ntop() on Windows (because we
4039 implement them ourselves in soup-dns.c).
4041 * libsoup/soup-dns.c (inet_pton, inet_ntop): Fix the Win32
4042 implementations, they were completely bogus.
4043 (soup_dns_ntop): Make it compile if HAVE_INET_NTOP.
4045 2005-06-08 Dan Winship <danw@novell.com>
4047 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Fix this to
4048 use just the domain name for the domain, not the whole
4049 DOMAIN\username. Based on a patch by Jeroen Hautekeete in #306877.
4051 2005-05-26 Dan Winship <danw@novell.com>
4053 * libsoup/soup-session.c (cleanup_hosts): lock host_lock around
4054 this, since it can be called from set_property(). Possible fix for
4057 2005-05-05 Dan Winship <danw@novell.com>
4059 * docs/reference/Makefile.am (SCANGOBJ_OPTIONS): Use
4060 --type-init-func to force g_thread_init to be called. [#302674]
4062 2005-04-18 Tor Lillqvist <tml@novell.com>
4064 * configure.in: Call AC_LIBTOOL_WIN32_DLL. Check for Win32, set
4065 Automake conditional OS_WIN32. Pre-cache information that we do
4066 have getaddrinfo(), getnameinfo(), and IPv6 on Win32. (The tests
4067 wouldn't notice as they don't include the necessary headers or
4068 link with -lws2_32. Easiest to just pre-cache it.)
4070 * libsoup-zip.in: New file, to build zipfile-based distribution of
4073 * Makefile.am (EXTRA_DIST)
4074 * configure.in (AC_OUTPUT): Add libsoup-zip(.in).
4076 * libsoup/Makefile.am: Use -no-undefined on Win32. Link with
4077 WinSock library -lws2_32.
4079 * libsoup/soup-portability.h: New file. On Unix it includes the
4080 traditional BSD socket etc headers. On Win32 it includes
4081 winsock2.h and ws2tcpip.h.
4084 * libsoup/*.h: Correspondingly, don't include the BSD socket API
4087 * libsoup/soup-address.h
4088 * libsoup/soup-dns.h: Include soup-portability.h
4090 * libsoup/soup-address.c (soup_address_class_init): This function
4091 should get called before libsoup uses the WinSock API, so this is
4092 a good place to call WSAStartup().
4094 * libsoup/soup-auth-digest.c (get_protection_space): Use
4095 g_strsplit() instead of the relatively unportable strtok_r().
4097 * libsoup/soun-dns.c: Remove unused headers. Implement
4098 inet_pton() and inet_ntop() on Win32 using WSAStringToAddress()
4099 and WSAAddressToString().
4101 * libsoup/soup-socket.c (SOUP_CLOSE_SOCKET, SOUP_IS_SOCKET_ERROR,
4102 SOUP_IS_INVALID_SOCKET, SOUP_IS_CONNECT_STATUS_INPROGRESS):
4104 (soup_socket_class_init): Call soup_address_get_type() to make
4105 sure WSAStartup() gets called (through soup_address_class_init()).
4106 (update_fdflags): Use ioctlsocket(FIONBIO) on Win32.
4107 (soup_socket_write): Conditionalize SIGPIPE use.
4109 * tests/get.c: mkdir() is different in Microsoft's C library.
4111 * tests/simple-httpd.c: Rename TRY_AGAIN label to AGAIN to avoid
4112 some clash with winsock2.h (which includes windows.h). The Win32
4113 headers pollute the namespace wildly.
4115 2005-04-15 Dan Winship <danw@novell.com>
4117 * libsoup/soup-dns.c (resolve_name): make this work with
4118 pre-EAI_OVERFLOW glibc [#300620]
4120 2005-04-12 Dan Winship <danw@novell.com>
4122 * configure.in: Remove the various gethostbyname_r checks and just
4123 check for getnameinfo/getaddrinfo.
4125 * libsoup/soup-dns.c: de-nastify. Make this use threads instead of
4126 forking. Change the API around a bunch in the process.
4128 * libsoup/soup-address.c: Update for soup-dns changes
4130 * tests/dns.c: take multiple hostnames on the command line and
4131 resolve them all at once (patch from tml)
4133 2005-04-11 Dan Winship <danw@novell.com>
4135 * configure.in: require glib-2.0 >= 2.4.0
4137 * libsoup/*.c: use G_DEFINE_TYPE and
4138 g_type_class_add_private/G_TYPE_INSTANCE_GET_PRIVATE
4140 * libsoup/soup-types.h: kill SOUP_MAKE_TYPE and
4141 SOUP_MAKE_TYPE_WITH_IFACE
4143 * tests/revserver.c: use GThread. (patch from tml)
4145 2005-04-11 Dan Winship <danw@novell.com>
4147 * configure.in: bump version to 2.3.0. bump SOUP_API_VERSION to
4150 * libsoup.pc.in: rename from libsoup-2.2.pc.in
4152 * Makefile.am (EXTRA_DIST, pkgconfig_DATA, install-data-local):
4153 install the .pc file by hand, renaming it to include the
4156 * libsoup/Makefile.am: s/2.2/2.4/
4158 2005-03-09 Dan Winship <danw@novell.com>
4160 * libsoup/soup-gnutls.c (soup_gnutls_read): return G_IO_STATUS_EOF
4161 if gnutls returns 0. [#73352]
4162 (verify_certificate): put an #ifdef around
4163 GNUTLS_CERT_NOT_TRUSTED so it works with gnutls 1.2.x. [#57811]
4165 2005-01-08 Not Zed <NotZed@Ximian.com>
4167 ** See ximian bug #70323.
4169 * libsoup/soup-connection-ntlm.c: replace all unsigned long/long
4170 types with guint32, as the code needs 32 bit longs.
4172 2004-10-20 Dan Winship <danw@novell.com>
4174 * libsoup/soup-gnutls.c: Commit the alleged changes from the 10-06
4175 commit, which somehow did not actually get committed then.
4177 * libsoup/soup-connection.c (SoupConnectionPrivate): add a flag
4178 indicating whether or not the connection is connected.
4179 (tunnel_connect_finished): If successful, set connected. If the
4180 server returns a 3xx response, translate it to 407 (under the
4181 assumption that it's trying to redirect us to an HTML login page,
4182 as in bug 68531). Use soup_socket_start_proxy_ssl() rather than
4183 soup_socket_start_ssl().
4184 (socket_connect_result, soup_connection_connect_sync): If
4185 successful, set connected
4186 (soup_connection_disconnect): Don't emit "disconnected" if we
4187 aren't yet connected, or the message that was waiting for this
4188 connection may get stranded in the queue. (also part of 68531)
4190 * libsoup/soup-socket.c (soup_socket_start_proxy_ssl): New, starts
4191 SSL and lets the caller pass the expected hostname. Fixes a
4192 problem where SSL certification validation would always fail if
4193 you used a proxy, because it was comparing the cert against the
4194 proxy's hostname. (68583)
4196 2004-10-06 Dan Winship <danw@novell.com>
4198 * libsoup/soup-ssl.h (SoupSocketError): add
4199 SOUP_SSL_ERROR_CERTIFICATE.
4201 * libsoup/soup-gnutls.c (do_handshake): Pass the GError to
4203 (verify_certificate): Set the GError appropriately rather than
4206 * libsoup/soup-socket.c (read_from_network, soup_socket_write): If
4207 the GIOChannel operation returns an error, store it as GOBject
4208 data on the socket (as a hack so soup-message-io.c can access it
4209 without us needing to change SoupSocket's API).
4211 * libsoup/soup-message-io.c (io_error): peek at the socket's
4212 "last_error" datum and set the message's status to SSL_FAILED
4213 (with the GError's message string) rather than IO_ERROR, if
4214 appropriate. For 64414.
4216 2004-09-30 Dan Winship <danw@novell.com>
4218 * libsoup/soup-gnutls.c (soup_gnutls_init): Add this, with some
4219 extra initialization needed for libgcrypt 1.2 or higher. Fixes
4221 (soup_ssl_get_client_credentials,
4222 soup_ssl_get_server_credentials): Call soup_gnutls_init().
4224 2004-08-26 Dan Winship <danw@novell.com>
4226 * configure.in: Bump version to 2.2.0.
4228 * AUTHORS: Update this to reflect the last 2 years.
4230 * NEWS: Brief summary of 1.99.x -> 2.2 changes
4232 * README, TODO: Updates
4234 2004-08-26 Dan Winship <danw@novell.com>
4236 * libsoup/*: add/fix lots of gtk-doc comments
4238 * libsoup/soup-misc.c (soup_str_case_hash, soup_str_case_equal):
4239 Fix bug noticed while documenting. (We were using the
4240 locale-case-insensitive functions rather than the g_ascii_ ones.)
4242 * libsoup/soup-message.h (SoupMessageFlags): remove the (never
4243 implemented) NO_PIPELINE and NO_COOKIE flags.
4245 * docs/reference/tmpl/*.sgml: Regenerate, fill in some stuff.
4246 There are still problems here with gtk-doc not recognizing many of
4247 the objects in libsoup...
4249 2004-08-13 JP Rosevear <jpr@novell.com>
4251 * configure.in: bump version, libtool number
4253 2004-08-09 Dan Winship <danw@novell.com>
4255 * libsoup/soup-connection.c (soup_connection_connect_sync): Don't
4256 use conn after emitting the "connect_result" signal, since it
4257 might be destroyed by that. Based on a patch from hpj.
4259 2004-08-02 Dan Winship <danw@novell.com>
4261 * libsoup/soup-uri.h: Add flag "broken_encoding" to SoupUri.
4263 * libsoup/soup-uri.c: (soup_uri_to_string): if broken_encoding is
4264 set, don't re-encode the URL parts. Based on a patch by
4265 Alfred.Peng@Sun.COM.
4267 2004-07-19 JP Rosevear <jpr@novell.com>
4269 * configure.in: bump version, libtool number
4271 2004-07-15 Dan Winship <danw@novell.com>
4273 * libsoup/soup-session-sync.c (send_message): Simplify this. If
4274 the message comes back from soup_connection_send_request not
4275 FINISHED, get a new connection rather than reusing the old one.
4276 This fixes a race condition in which a connection could end up
4277 double-booked, and fixes the handling of messages that get
4278 redirected to another server.
4280 2004-07-13 Dan Winship <danw@novell.com>
4282 * libsoup/soup-session.c (connect_result): If the connection
4283 attempt succeeded, reserve the connection before releasing
4284 host_lock. Otherwise, another thread might find it in the
4285 connection pool before the caller can queue a message on it.
4288 * libsoup/soup-session-async.c (got_connection): Call
4289 soup_connection_release(), since we don't have a specific message
4290 in mind for the connection, so we need it to be considered idle.
4292 * libsoup/soup-connection.c (soup_connection_release): New
4293 function, to undo a soup_connection_reserve().
4294 (soup_connection_send_request, soup_connection_reserve,
4295 soup_connection_authenticate, soup_connection_reauthenticate):
4298 2004-07-12 Dan Winship <danw@novell.com>
4300 * libsoup/soup-session-sync.c (send_message): signal the
4301 "connections available" condition after the message finishes. Duh.
4303 * libsoup-2.2.pc.in (Cflags, Libs): add XML_CFLAGS and XML_LIBS
4305 2004-07-08 Dan Winship <danw@novell.com>
4307 * libsoup/soup-soap-response.c: Revert previous change for now; it
4308 breaks the build on distros with older libxmls.
4310 2004-07-08 Dan Winship <danw@novell.com>
4312 * tests/dict.c: Basic SOAP test, using Aonaware's SOAP->DICT
4315 2004-07-07 Fernando Herrera <fherrera@onirica.com>
4317 * libsoup/soup-soap-response.c: (finalize), (init),
4318 (soup_soap_response_from_string): Use a parse context for the
4319 xml document, so we can safely use the option to ignore
4320 blank spaces and '\n'.
4322 2004-07-06 Dan Winship <danw@novell.com>
4324 * libsoup/soup-uri.c (soup_uri_new_with_base): if the protocol is
4325 http or https, require a hostname. For #61049
4327 * tests/uri-parsing.c (rel_tests, do_uri): Update for that
4329 2004-06-03 JP Rosevear <jpr@novell.com>
4331 * configure.in: bump version to 2.1.11, libtool number
4333 2004-06-01 Dan Winship <danw@novell.com>
4335 * libsoup/soup-address.c: Redo the various IPv4/IPv6-abstracting
4336 macros to not use ?: expressions as lvalues, since that's
4337 apparently a GNU extension.
4338 (soup_address_resolve_async): Use a timeout rather than an idle
4339 handler to poll the dns result. (soup-dns really should be
4340 rewritten to not require polling, but this is easier for now.)
4343 * libsoup/soup-server.c (call_handler): Don't use GNU-only
4344 non-constant structure initialization
4346 * tests/dns.c: Simple test of the dns code
4348 * tests/Makefile.am (noinst_PROGRAMS): build it
4350 2004-05-19 JP Rosevear <jpr@novell.com>
4352 * configure.in (SOUP_API_VERSION): bump version, libtool numbers
4354 2004-05-18 Dan Winship <danw@novell.com>
4356 * libsoup/soup-ssl.h:
4357 * libsoup/soup-nossl.c: define some GError codes and stuff
4359 * libsoup/soup-gnutls.c: add missing #include <gnutls/x509.h>
4360 (do_handshake): when returning G_IO_STATUS_AGAIN, set the GError
4361 to SOUP_SSL_ERROR_HANDSHAKE_NEEDS_READ or _NEEDS_WRITE
4364 * libsoup/soup-socket.c (soup_socket_write): Handle
4365 SOUP_SSL_ERROR_HANDSHAKE_NEEDS_READ, by setting an io watch for
4366 G_IO_IN instead of G_IO_OUT. Fixes the rcd-sucking-up-all-cpu bug
4368 (read_from_network): Handle the reverse case (which would cause
4369 hanging rather than spinning, and might be the cause of some
4370 connector 1.5 slowness?)
4372 2004-05-11 Dan Winship <danw@novell.com>
4374 * libsoup/soup-misc.c (soup_signal_connect_once): Do this less
4375 kludgefully, using the magic of GClosure, to fix x86_64 problems
4378 2004-05-04 Sivaiah Nallagatla <snallagatla@novell.com>
4380 * libsoup/soup-soap-message.c (finalize) : free
4381 the elements of priv structure before freeing priv
4383 2004-04-20 Dan Winship <danw@ximian.com>
4385 * libsoup/soup-connection-ntlm.c (ntlm_authorize_post): if
4386 re-sending the message, call soup_message_restarted()
4387 (send_request): Connect to "restarted" signal, and remove the 401
4388 handlers from there; doing it here didn't work because if the
4389 connection was closed, the message would be re-sent on a new
4390 connection, but would still have the handlers from the old
4391 connection attached to it, which would make authentication fail.
4393 * libsoup/soup-message-handlers.c (soup_message_run_handlers):
4394 Copy the handler list before starting, to protect against handlers
4395 that modify the handler list.
4397 2004-04-15 Dan Winship <danw@ximian.com>
4399 * libsoup/soup-connection.c (soup_connection_connect_sync):
4400 Connect to the socket's "disconnect" signal. (We were only doing
4401 this from the async version before, which meant that synchronous
4402 SoupConnections could outlive their sockets and start causing
4405 * libsoup/soup-connection-ntlm.c (send_request): Remove the old
4406 Authorization header before adding a new one.
4408 2004-04-02 JP Rosevear <jpr@ximian.com>
4410 * configure.in: bump version, libtool number
4412 2004-03-15 Dan Winship <danw@ximian.com>
4414 * libsoup/soup-soap-message.c (soup_soap_message_persist): Fix up
4415 types to kill a warning with -Wall -O2
4417 2004-03-05 JP Rosevear <jpr@ximian.com>
4419 * configure.in: bump version, libtool number
4421 2004-03-02 Dan Winship <danw@ximian.com>
4423 * libsoup/soup-dns.c (check_hostent): Only loop on EINTR if
4424 bytes_read is -1, since the value of errno is irrelevant when
4425 bytes_read is 0. Probably #54960.
4427 2004-03-01 Rodrigo Moya <rodrigo@ximian.com>
4429 * libsoup/soup-soap-response.h: removed not-implemented function's
4432 2004-02-27 Rodney Dawes <dobey@ximian.com>
4435 * libsoup/Makefile.am: Use a different variable for linking to the
4436 static version of gnutls, so we don't pull the .a files into the .pc
4440 2004-02-20 Dan Winship <danw@ximian.com>
4442 * libsoup/soup-message-io.c (read_metadata, read_body_chunk,
4443 write_data): Pass gsize *, not guint *, to soup_socket_read/write,
4444 to make this work on 64-bit platforms. (Grr. C type checking
4447 * tests/revserver.c: Likewise
4449 2004-02-18 Rodrigo Moya <rodrigo@ximian.com>
4453 * libsoup/soup-soap-response.c (soup_soap_parameter_get_int_value):
4454 don't leak the value returned from xmlNodeGetContent().
4455 (soup_soap_parameter_get_string_value,
4456 soup_soap_parameter_get_property): return a g_strdup'ed
4457 string, not the value returned by xmlNodeGetContent, so that
4458 callers can use g_free, and not xmlFree.
4460 * libsoup/soup-soap-response.h: made soup_parameter_get_property
4463 2004-02-17 Dan Winship <danw@ximian.com>
4465 * libsoup/soup-soap-message.h (SOUP_IS_SOAP_MESSAGE_CLASS): Fix a
4466 typo. #54433, from Mariano Suarez-Alvarez.
4468 * libsoup/soup-soap-response.h (SOUP_IS_SOAP_RESPONSE_CLASS):
4471 2004-02-17 Rodney Dawes <dobey@ximian.com>
4473 * libsoup/soup-message.c (soup_message_new): HTTP connections require
4474 a hostname, and we also hash on the host for message queueing in the
4475 session, if the host is NULL we free the SoupUri and return NULL
4477 2004-02-14 Dan Winship <danw@ximian.com>
4479 * configure.in: Use POSIX-compliant "test $foo = bar", rather than
4480 GNU-only "test $foo == bar". #54354, from Julio M. Merino Vidal.
4482 2004-02-12 Joe Shaw <joe@ximian.com>
4484 * libsoup/soup-dns.c (check_hostent): Call read() in a do-while
4485 loop to prevent DNS errors from short reads.
4487 2004-02-11 Joe Shaw <joe@ximian.com>
4489 * configure.in: Bumped version number to 2.1.7 and libtool
4492 2004-02-11 Dan Winship <danw@ximian.com>
4494 * libsoup/soup-connection.c (soup_connection_disconnect): Update
4495 Joe's comment here with a gory explanation of exactly what's going
4496 on. (It's not just an SSL bug either, it affects all connections.)
4498 2004-02-10 Joe Shaw <joe@ximian.com>
4500 * libsoup/soup-connection.c (soup_connection_disconnect): Add a
4501 workaround for SSL connections which time-out but don't close the
4502 socket until we try sending data again later.
4504 * libsoup/soup-socket.c (soup_socket_connect, soup_socket_listen):
4505 Don't free the sockaddr from soup_address_get_sockaddr(); we don't
4506 own it, the SoupAddress does.
4508 2004-02-09 JP Rosevear <jpr@ximian.com>
4510 * configure.in: Bump libtool numbers
4512 2004-02-05 Dan Winship <danw@ximian.com>
4514 * libsoup/soup-session.c (soup_session_add_filter): Ref the filter
4516 (soup_session_remove_filter): And unref it here (we were already
4517 unreffing it in dispose().)
4519 2004-02-05 Joe Shaw <joe@ximian.com>
4521 * libsoup/soup-dns.c (soup_dns_entry_unref): Don't try to free the
4522 hostent if it's NULL.
4523 (soup_dns_entry_check_lookup): If the entry is resolved, but the
4524 hostent is NULL, uncache it.
4526 2004-02-04 Dan Winship <danw@ximian.com>
4528 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Always
4529 remove the WWW-Authenticate headers before returning, so the
4530 session won't fall back to Basic auth. Also, leave the connection
4531 in the "authenticating" state rather than setting it to
4533 (ntlm_authorize_post): Only requeue the message if it's in the
4534 "authenticating" state (and set it to "authenticated"). Fixes an
4535 "unepectedly disconnected" error if authentication fails.
4537 2004-02-03 Dan Winship <danw@ximian.com>
4539 * libsoup/soup-message-io.c (io_cleanup): Call
4540 soup_message_io_stop so we don't get a callback on the io after
4541 it's been cleaned up.
4543 * libsoup/soup-session.c (add_auth): Only remove the Authorization
4544 header if we have another one to add. (Otherwise it messes up
4545 SoupConnectionNTLM.)
4547 * libsoup/soup-socket.c (read_from_buf): Use memmove rather than
4548 memcpy here, since the source and destination will overlap if
4549 *nread is small and read_buf->len is large. (Noticed by valgrind,
4552 2004-02-02 Joe Shaw <joe@ximian.com>
4554 * libsoup/soup-gnutls.c (soup_gnutls_close): Call gnutls_bye()
4555 with the GNUTLS_SHUT_WR flag (instead of RDWR) and check only for
4556 GNUTLS_E_INTERRUPTED. GNUTLS_E_AGAIN will be returned by recv()
4557 when there are no messages on the wire on a non-blocking socket.
4558 This sends a SSL hangup message and then allows us to immediately
4561 2004-01-30 Rodrigo Moya <rodrigo@ximian.com>
4563 * configure.in: bumped version number to 2.1.6.
4565 2004-01-29 Rodrigo Moya <rodrigo@ximian.com>
4567 * libsoup/soup-soap-response.[ch] (soup_soap_parameter_get_property):
4570 2004-01-29 Rodrigo Moya <rodrigo@ximian.com>
4572 * libsoup/soup-soap-response.[ch]
4573 (soup_soap_parameter_get_string_value): removed 'const' from return
4576 2004-01-29 Joe Shaw <joe@ximian.com>
4578 * libsoup/soup-gnutls.c (verify_certificate): Initialize the
4579 certificate before we try to use it. Ahem.
4581 2004-01-23 Joe Shaw <joe@ximian.com>
4583 * configure.in: Bump version to 2.1.5 and SOUP_RELEASE to 2
4585 2004-01-21 Joe Shaw <joe@ximian.com>
4587 * configure.in: Require at least GnuTLS 1.0.0.
4589 * libsoup/soup-gnutls.c: Fix the use of deprecated GnuTLS
4591 (verify_certificate): Use gnutls_x509_crt_import() and
4592 gnutls_x509_crt_check_hostname() instead of
4593 gnutls_x509_check_certificates_hostname().
4594 (init_dh_params): Use gnutls_dh_params_generate2() instead of
4595 gnutls_dh_params_generate() and gnutls_dh_params_set().
4597 2004-01-20 Joe Shaw <joe@ximian.com>
4599 * libsoup/soup-gnutls.c (soup_gnutls_close): gnutls_bye() doesn't
4600 close the socket itself, so we need to do it or else our
4601 connections stay in CLOSE_WAIT forever.
4603 2004-01-16 Jason Leach <leach@wam.umd.edu>
4605 * libsoup/Makefile.am: builddir != srcdir fixes.
4607 2004-01-14 Joe Shaw <joe@ximian.com>
4609 * libsoup/soup-gnutls.c (verify_certificate): Remove the
4610 check for GNUTLS_CERT_CORRUPTED, it's not in 1.0.x.
4612 2004-01-12 JP Rosevear <jpr@ximian.com>
4614 * configure.in: bump version and libtool revision
4616 2004-01-12 Dan Winship <danw@ximian.com>
4618 * tests/simple-httpd.c (main): Add a g_thread_init() so this works
4621 2004-01-10 Larry Ewing <lewing@ximian.com>
4623 * libsoup-2.2.pc.in (Libs): use LIBGNUTLS_LIBS in the substitution
4626 2004-01-09 Joe Shaw <joe@ximian.com>
4628 * acinclude.m4: Include the libgnutls.m4 file.
4630 * configure.in: Remove manual checking for libgnutls-config and
4631 use the AM_PATH_LIBGNUTLS so we can pass in a minimum required
4632 version, which is 0.9.7 for now.
4634 * libsoup/Makefile.am: Some changes for the above change.
4636 * libsoup/soup-gnutls.c: Check for HAVE_SSL, not
4637 HAVE_GNUTLS_GNUTLS_H.
4638 (verify_certificate): Uncomment the SSL certificate hostname
4641 * libsoup/soup-session.c (set_property): Be smart about flushing
4642 our SSL credentials only when the CA file is set to something
4643 different than it was before.
4645 2004-01-09 Harish K <kharish@novell.com>
4646 * libsoup/soup-soap-response.c (soup_soap_response_from_string):
4647 added code to ignore Header element, if present, while creating
4650 2004-01-05 Dan Winship <danw@ximian.com>
4652 * configure.in: Remove no-longer-relevant socklen_t check
4654 * libsoup/soup-address.c: Reorder #includes for FreeBSD (From Joe
4655 Marcus Clarke, #52566)
4657 * libsoup/soup-dns.c: Likewise
4659 2003-12-29 JP Rosevear <jpr@ximian.com>
4661 * configure.in: bump version and libtool numbers
4663 2003-12-22 Dan Winship <danw@ximian.com>
4665 * README, TODO: Update these
4667 2003-12-22 Dan Winship <danw@ximian.com>
4669 * libsoup/soup-socket.c: Lots of thread-safety stuff, primarly so
4670 you can disconnect a socket from one thread while doing I/O in
4673 * libsoup/soup-message-io.c (soup_message_io_cancel): Split into
4674 soup_message_io_stop() and io_cleanup(), to separate out the "stop
4675 reading/writing" and "free data" phases to allow thread-safe
4676 synchronous cancellation.
4677 (soup_message_io_finished): call both soup_message_io_stop() and
4679 (io_error): Only set SOUP_STATUS_IO_ERROR on the message if it
4680 doesn't already have a transport error status (eg, CANCELLED).
4681 (new_iostate): Call io_cleanup() if needed.
4683 * libsoup/soup-status.h: add "SOUP_STATUS_NONE" for 0, to make it
4684 clearer that it's not a status.
4686 * libsoup/soup-message.c (finalize, restarted, finished,
4687 soup_message_set_uri): s/soup_message_io_cancel/soup_message_io_stop/
4688 (soup_message_cleanup_response): s/0/SOUP_STATUS_NONE/
4690 * libsoup/soup-connection.c (send_request): Remove
4691 soup_message_io_cancel call.
4693 * libsoup/soup-session-sync.c (send_message): Connect to the
4694 connection's "disconnected" signal rather than using a weak ref,
4695 since that's what we really care about, and it's possible that the
4696 connection may have an extra ref on it somewhere that would keep
4697 it from being destroyed even if it was disconnected.
4699 2003-12-20 Joe Shaw <joe@ximian.com>
4701 * libsoup/soup-session.c (lookup_auth): If const_path is NULL un
4702 the non-proxy case, then use the root ("/").
4704 2003-12-19 Dan Winship <danw@ximian.com>
4706 * libsoup/soup-message-filter.c: New. An interface for objects
4707 that want to act on every message passing through a session.
4708 (Initially being used for authentication, but could also be used
4709 for cache handling, cookie management, etc.)
4711 * libsoup/soup-connection.c (class_init, etc): Add a message
4713 (send_request): If the connection has a message filter set, run
4714 it on the message before sending it.
4715 (soup_connection_connect_async, etc): When setting up a tunnel, if
4716 we get back a 407 and the session tries to requeue the message,
4717 either re-send it, or return SOUP_STATUS_TRY_AGAIN (depending on
4718 whether or not the proxy closed the connection).
4719 (soup_connection_connect_sync): Likewise
4720 (send_request, request_done): Ref/unref the connection
4722 * libsoup/soup-session.c (soup_session_get_type): Implement the
4723 SoupMessageFilter interface.
4724 (soup_session_get_connection): Use the session as the connection's
4726 (soup_session_add_filter, soup_session_remove_filter): Add/remove
4727 filters from the session
4728 (setup_message): do auth handling, and call each of the session's
4729 filters' setup_message methods as well.
4730 (soup_session_send_message_via): No longer needed.
4731 (connect_result): Handle SOUP_STATUS_TRY_AGAIN.
4733 * libsoup/soup-session-async.c (run_queue): Use
4734 soup_connection_send_request, since soup_session_send_message_via
4737 * libsoup/soup-session-sync.c (send_message): Likewise
4739 * libsoup/soup-message.c (soup_message_is_keepalive): A successful
4740 response to a CONNECT is always keepalive, even if it's HTTP/1.0
4741 with no Connection header.
4743 * libsoup/soup-status.h: add SOUP_STATUS_TRY_AGAIN
4745 * libsoup/soup-types.h: Add SoupMessageFilter, and macros for
4746 gobject interface types.
4748 * tests/get.c (main): Add a -p flag to specify a proxy
4750 * tests/simple-proxy.c: Fix #includes
4752 2003-12-18 Dan Winship <danw@ximian.com>
4754 * libsoup/soup-connection.c (soup_connection_disconnect): Actually
4755 disconnect the socket rather than just unreffing it, since the IO
4756 code may be holding an extra ref on it.
4757 (send_request): connect to the "restarted" signal too
4758 (request_restarted): Deal with "Connection: close"
4760 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Make this
4761 not go into an infinite loop if the server only supports Basic.
4763 2003-12-17 Rodrigo Moya <rodrigo@ximian.com>
4765 * libsoup/Makefile.am: install soup-message-queue.h with the rest
4768 2003-12-17 Dan Winship <danw@ximian.com>
4770 * configure.in: Add gthread to glib check
4772 * libsoup/soup-session.c: Make this an abstract class.
4774 * libsoup/soup-session-async.c: A SoupSession class for
4775 asynchronous gmain-based operation; replaces the old SoupSession.
4777 * libsoup/soup-session-sync.c: A SoupSession class for synchronous
4778 blocking operation for use with threaded apps.
4780 * libsoup/soup-types.h, libsoup/soup.h: add the new session
4783 * libsoup/soup-connection.c (soup_connection_connect_sync): Don't
4784 try to unref the socket if the socket creation fails.
4785 (soup_connection_reserve): New, to explicitly mark a connection as
4786 being in use without queueing a message on it.
4788 * libsoup/soup-dns.c (check_hostent): Oof. Fix the logic of the
4789 "block" flag to not be reversed.
4791 * libsoup/soup-message.c (finished): set status to FINISHED here.
4792 (soup_message_cancel): Gone; needs to be done at the session
4795 * libsoup/soup-message-queue.c: Add a mutex and make all of the
4796 operations thread-safe.
4798 * libsoup/soup-socket.c (disconnect_internal): Make this
4800 (soup_socket_connect): Make the sync case work correctly.
4802 * libsoup/Makefile.am: add the SoupSession subclasses
4804 * tests/Makefile.am: libsoup depends on libgthread now, so
4805 revserver doesn't need to explicitly.
4807 * tests/get.c, tests/auth-test.c, tests/simple-proxy.c: Use
4808 soup_session_async_new().
4810 2003-12-16 Rodrigo Moya <rodrigo@ximian.com>
4812 * libsoup/soup-soap-response.[ch] (soup_soap_parameter_get_int_value):
4815 2003-12-16 Joe Shaw <joe@ximian.com>
4817 * libsoup/soup-connection.c (socket_connect_result,
4818 soup_connection_connect_sync): Only set up a tunnel if the
4819 destination protocol is HTTPS.
4821 * libsoup/soup-message.c (class_init): Add a default handler for
4823 (wrote_body): Run the SOUP_HANDLER_POST_REQUEST handlers here.
4824 (soup_message_cancel): Don't set the status to
4825 SOUP_STATUS_CANCELLED and call soup_message_finished() if the
4826 status is already SOUP_MESSAGE_STATUS_FINISHED.
4828 * libsoup/soup-session.c (set_property): Don't cancel the session
4829 if the proxy URI set as a property isn't different from the old
4831 (get_host_for_message): Refactor some code so that we can easily
4832 get the right SoupSessionHost for proxies as well as from the
4834 (authenticate_auth): Take a gboolean proxy parameter. Check it to
4835 see which URI (message URI or proxy URI) to use for
4836 authentication. Add a long comment about lack of clarity in RFC
4837 2617 with respect to proxies and protection spaces.
4839 2003-12-15 Dan Winship <danw@ximian.com>
4841 * libsoup/soup-socket.h (soup_socket_read, soup_socket_read_until,
4842 soup_socket_write): s/guint/gsize/ to match the definitions in
4843 soup-socket.c. #52167.
4845 2003-12-12 Rodrigo Moya <rodrigo@ximian.com>
4847 * libsoup/soup-soap-message.c: removed debugging of the messages here.
4849 2003-12-12 Rodrigo Moya <rodrigo@ximian.com>
4851 * libsoup/soup-soap-message.c (soup_soap_message_start_envelope):
4852 added information for SOAP-ENV namespace.
4854 2003-12-10 Dan Winship <danw@ximian.com>
4856 * libsoup/soup-message-client-io.c (parse_response_headers): if we
4857 receive an HTTP/1.0 response to an HTTP/1.1 request, downgrade the
4858 message's http_version so the keep-alive handling is correct.
4859 Fixes a problem noticed almost simultaneously by Rodrigo and Joe.
4861 * libsoup/soup-message.c (soup_message_restarted, etc): Add a
4862 "restarted" signal as suggested by Joe.
4864 * libsoup/soup-message-io.c (soup_message_io_finished): emit
4865 either "restarted" or "finished" as appropriate
4867 * libsoup/soup-session.c (soup_session_queue_message): Connect to
4868 "restarted" and run the queue if a message gets restarted
4870 * libsoup/soup-status.h: Remove a stray comma that gtk-doc doesn't
4873 2003-12-10 Tambet Ingo <tambet@ximian.com>
4875 * configure.in: Use autoconfig to check for socklen_t ...
4877 * libsoup/soup-address.c: ... and remove it from here ...
4879 * libsoup/soup-dns.c: ... and here.
4881 2003-12-09 Rodrigo Moya <rodrigo@ximian.com>
4883 * libsoup/soup-soap-message.c (soup_soap_message_persist):
4884 (soup_soap_message_parse_response): print out request/response's
4885 contents, if in debug mode.
4887 2003-12-07 JP Rosevear <jpr@ximian.com>
4889 * configure.in: Bump version
4891 2003-11-28 Rodrigo Moya <rodrigo@ximian.com>
4893 * libsoup/soup-soap-response.[ch]
4894 (soup_soap_parameter_get_first_child,
4895 soup_soap_parameter_get_first_child_by_name,
4896 soup_soap_parameter_get_next_child,
4897 soup_soap_parameter_get_next_child_by_name): new functions to
4898 manage SoupSoapParameter's children.
4899 (soup_soap_response_get_first_parameter): dont return a GList, but
4900 a SoupSoapParameter contained in the GList.
4902 2003-11-26 Rodrigo Moya <rodrigo@ximian.com>
4904 * libsoup/soup-soap-response.[ch]
4905 (soup_soap_parameter_get_string_value): new function.
4907 2003-11-26 Rodrigo Moya <rodrigo@ximian.com>
4909 * libsoup/soup-soap-response.[ch]: added SoupSoapParameter
4910 structure, to "hide" the usage of xmlNode's.
4911 (soup_soap_parameter_get_name): functions to manage SOAP
4912 response parameters.
4913 (soup_soap_response_get_first_parameter,
4914 soup_soap_response_get_first_parameter_by_name,
4915 soup_soap_response_get_next_parameter,
4916 soup_soap_response_get_next_parameter_by_name):
4917 new functions for an easy access to the response's parameters.
4918 (soup_soap_response_from_string): removed warnings.
4920 2003-11-25 Rodrigo Moya <rodrigo@ximian.com>
4922 * libsoup/soup-soap-response.c (soup_soap_response_set_method_name):
4925 2003-11-25 Rodrigo Moya <rodrigo@ximian.com>
4927 * libsoup/soup-soap-response.[ch] (soup_soap_response_get_method_name,
4928 soup_soap_response_set_method_name, soup_soap_message_get_parameters):
4930 (finalize): NULL out new private fields.
4931 (soup_soap_response_from_string): added validation code.
4933 2003-11-23 Rodrigo Moya <rodrigo@ximian.com>
4935 * libsoup/soup-soap-response.[ch]: new class for managing SOAP
4938 * libsoup/soup-soap-message.[ch] (soup_soap_message_parse_response):
4941 * libsoup/Makefile.am: added new files.
4943 2003-11-18 Rodney Dawes <dobey@ximian.com>
4945 * gtk-doc.make: Add gtk-doc.make to cvs for systems without gtk-doc
4947 2003-11-18 Rodney Dawes <dobey@ximian.com>
4949 * acinclude.m4: Add GTK_DOC_CHECK
4951 2003-11-18 Dan Winship <danw@ximian.com>
4953 * configure.in: Replace old gtk-doc test with GTK_DOC_CHECK()
4954 (AC_OUTPUT): add docs/Makefile, docs/reference/Makefile
4956 * autogen.sh (REQUIRED_AUTOMAKE_VERSION): 1.6, for gtk-doc.make
4958 * Makefile.am: updates for gtk-doc
4959 (SUBDIRS): add back "docs"
4961 * docs/Makefile.am (EXTRA_DIST): remove, since those old docs
4962 aren't around any more
4964 * docs/reference/*: set up gtk-doc
4966 * libsoup/Makefile.am (INCLUDES): Change G_LOG_DOMAIN to
4967 "libsoup". Remove unused defines.
4969 * libsoup/soup-connection.c: Fix doc comments
4970 * libsoup/soup-message.c: Likewise
4971 * libsoup/soup-misc.c: Likewise
4972 * libsoup/soup-socket.c: Likewise
4973 * libsoup/soup-uri.c: Likewise
4975 * libsoup/soup-address.h: Fixes to please gtk-doc
4976 * libsoup/soup-connection.h: Likewise
4977 * libsoup/soup-message.h: Likewise
4978 * libsoup/soup-message-private.h: Likewise
4979 * libsoup/soup-misc.h: Likewise
4980 * libsoup/soup-server-auth.h: Likewise
4981 * libsoup/soup-socket.h: Likewise
4982 * libsoup/soup-status.h: Likewise
4984 2003-11-18 Dan Winship <danw@ximian.com>
4986 * configure.in: Fix up the SSL checks some. Remove some useless
4989 * libsoup/soup-misc.h: declare soup_ssl_supported.
4991 * libsoup/soup-gnutls.c: add soup_ssl_supported declaration.
4993 * libsoup/soup-nossl.c: Not an SSL implementation, built if
4994 HAVE_SSL is not defined.
4996 * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): add soup-nossl.c
4998 * libsoup/soup-socket.c (soup_socket_start_ssl): Return success or
5000 (listen_watch): Deal with soup_socket_start_ssl failing.
5002 * libsoup/soup-connection.c (tunnel_connect_finished,
5003 socket_connect_result, soup_connection_connect_sync): Deal with
5004 the soup_socket_start_ssl failing.
5006 * libsoup/soup-server.c (soup_server_new): Deal with
5007 soup_ssl_get_server_credentials failing
5009 2003-11-18 Rodrigo Moya <rodrigo@ximian.com>
5011 * libsoup/soup-soap-message.[ch] (soup_soap_message_start_fault,
5012 soup_soap_message_end_fault, soup_soap_message_start_fault_detail,
5013 soup_soap_message_end_fault_detail, soup_soap_message_start_header,
5014 soup_soap_message_end_header,
5015 soup_soap_message_start_header_element,
5016 soup_soap_message_end_header_element, soup_soap_message_write_int,
5017 soup_soap_message_write_double, soup_soap_message_write_base64,
5018 soup_soap_message_write_time, soup_soap_message_write_string,
5019 soup_soap_message_write_buffer, soup_soap_message_set_element_type,
5020 soup_soap_message_set_null, soup_soap_message_add_attribute,
5021 soup_soap_message_add_namespace,
5022 soup_soap_message_set_default_namespace,
5023 soup_soap_message_get_namespace_prefix,
5024 soup_soap_message_set_encoding_style, soup_soap_message_reset,
5025 soup_soap_message_persist): new functions from old SoupSerializer.
5027 2003-11-17 Rodrigo Moya <rodrigo@ximian.com>
5029 * libsoup/soup-soap-message.[ch] (soup_soap_message_new,
5030 soup_soap_message_new_from_uri): added a bunch of initialization
5032 (soup_soap_message_get_xml_doc, soup_soap_message_start_envelope,
5033 soup_soap_message_end_envelope, soup_soap_message_start_body,
5034 soup_soap_message_end_body, soup_soap_message_start_element,
5035 soup_soap_message_end_element):
5038 * configure.in: depend on libxml-2.0 for the SOAP code.
5040 * libsoup/Makefile.am: use XML CFLAGS and LIBS.
5042 2003-11-17 Joe Shaw <joe@ximian.com>
5044 * configure.in: Add in the --enable-libgpg-error flag from the 2.0
5047 * acinclude.m4: Include the gpg-error macros.
5049 2003-11-17 Rodrigo Moya <rodrigo@ximian.com>
5051 * libsoup/soup-soap-message.[ch]: new class to make it easier to
5052 build SOAP messages.
5054 * libsoup/Makefile.am: added new files.
5056 * configure.in: increased version number.
5058 2003-10-24 Joe Shaw <joe@ximian.com>
5060 * libsoup/soup-address.c (update_address_from_entry): Call
5061 soup_dns_entry_get_hostent() on the SoupAddress passed in, not the
5062 one in addr->priv->lookup. Fixes a crash on synchronous DNS
5065 * libsoup/soup-server.c (soup_server_new): We need to ref the
5066 address we're binding to, because soup_socket_get_local_address()
5069 2003-10-23 Dan Winship <danw@ximian.com>
5071 * libsoup/soup-socket.c (init): Initialize flags to default
5074 2003-09-23 Dan Winship <danw@ximian.com>
5076 * libsoup/soup-gnutls.c (SoupGNUTLSCred): Remove refcounting, but
5077 note whether or not the CA file has been loaded.
5078 (SoupGNUTLSChannel): add a "hostname" field.
5079 (verify_certificate): Remove the comment about not being able to
5080 verify the hostname because of soup problems. Now it's because of
5081 GNUTLS problems instead.
5082 (soup_ssl_wrap_iochannel): Renamed from soup_ssl_get_iochannel,
5083 and takes a hostname and a creds argument now.
5084 (soup_ssl_get_client_credentials,
5085 soup_ssl_get_server_credentials): Return client/server credentials
5087 (soup_ssl_free_client_credentials,
5088 soup_ssl_free_server_credentials): and free them.
5090 * libsoup/soup-session.c (class_init, set_property, get_property):
5091 add ssl_ca_file property
5092 (get_host_for_message): when returning an SSL host for the first
5093 time, create a client credentials structure for the session.
5094 (run_queue): Pass the ssl creds to the new connection. Also fix an
5095 unrelated bug that caused infinite loops on "bad hostname".
5097 * libsoup/soup-server.c: Use GObject properties, including
5098 ssl_cert_file and ssl_key_file properties.
5099 (soup_server_new): Remove "protocol" argument; if the cert file
5100 and key file properties were set, create a server credential
5101 structure from them and pass that to soup_socket_server_new.
5103 * libsoup/soup-connection.c (SoupConnectionPrivate): Rename
5104 dest_uri to origin_uri to match RFC 2616 terminology. Add an
5106 (class_init, set_property, get_property): add SSL_CREDS property
5107 (soup_connection_connect_async, soup_connection_connect_sync):
5108 Pass ssl_creds to soup_socket_client_new calls.
5110 * libsoup/soup-socket.c: Use GObject properties, including an
5112 (soup_socket_set_flags): Gone (replaced with boolean properties)
5113 (soup_socket_new): Make this take a list of properties
5114 (listen_watch): copy ssl creds from listener to new socket
5115 (soup_socket_start_ssl): Pass remote hostname and socket creds
5116 structure to soup_ssl_wrap_iochannel.
5117 (soup_socket_client_new_async, soup_socket_client_new_sync,
5118 soup_socket_server_new): Replace the SSL boolean with an ssl_creds
5121 * libsoup/soup-misc.c (soup_set_ssl_ca_file,
5122 soup_set_ssl_cert_files, soup_get_ssl_ca_file,
5123 soup_get_ssl_cert_files): Gone. SSL state is now per-session or
5126 * tests/get.c: add a "-c CAfile" argument, for loading a CA
5127 certificate file to validate https connections against
5129 * tests/simple-httpd.c: Add "-c certfile" and "-k keyfile"
5130 arguments for loading an SSL server certificate. Only start an SSL
5131 server if those arguments were used.
5133 * tests/test-cert.pem:
5134 * tests/test-key.pem: SSL certificate for testing simple-httpd
5136 * tests/revserver.c: Update for API changes
5137 * tests/simple-proxy.c: Likewise
5139 2003-09-22 Dan Winship <danw@ximian.com>
5141 * libsoup/soup-message-io.c: Move RESPONSE_BLOCK_SIZE #define here
5144 * libsoup/soup-misc.c (soup_load_config, etc): Remove all this.
5145 (soup_set_security_policy, soup_get_security_policy): Remove,
5146 since the GNUTLS backend doesn't actually implement it.
5147 (soup_set_ssl_ca_dir, soup_get_ssl_ca_dir): Likewise
5149 * libsoup/soup-misc.h: sync to soup-misc.c. Don't #include extra
5152 * libsoup/soup-types.h (SOUP_MAKE_TYPE): Move this here from
5155 * libsoup/soup-ssl.h: Merge soup_ssl_get_iochannel and
5156 soup_ssl_get_server_iochannel into a single function that takes a
5159 * libsoup/soup-gnutls.c: Remove soup_get_ssl_ca_dir() reference.
5160 (soup_ssl_get_iochannel): Renamed from soup_gnutls_get_iochannel.
5161 (soup_gnutls_set_security_policy): Gone
5163 * libsoup/soup-gnutls.h
5164 * libsoup/soup-ssl.c: Gone; soup-ssl.h is the #include file for
5167 * libsoup/soup-socket.c: Move soup_sockaddr_max
5168 #define here from soup-private.h
5169 (soup_socket_start_ssl): Update for new soup_ssl_get_iochannel
5172 * libsoup/soup-private.h: Gone
5174 * libsoup/soup-address.c: Fix #includes for soup-private.h and
5176 * libsoup/soup-auth-digest.c: Likewise
5177 * libsoup/soup-auth.c: Likewise
5178 * libsoup/soup-connection-ntlm.c: Likewise
5179 * libsoup/soup-connection.c: Likewise
5180 * libsoup/soup-dns.c: Likewise
5181 * libsoup/soup-gnutls.c: Likewise
5182 * libsoup/soup-headers.c: Likewise
5183 * libsoup/soup-message-client-io.c: Likewise
5184 * libsoup/soup-message-handlers.c: Likewise
5185 * libsoup/soup-message-io.c: Likewise
5186 * libsoup/soup-message-server-io.c: Likewise
5187 * libsoup/soup-message.c: Likewise
5188 * libsoup/soup-server-message.c: Likewise
5189 * libsoup/soup-server.c: Likewise
5190 * libsoup/soup-session.c: Likewise
5191 * libsoup/soup-socket.c: Likewise
5192 * tests/auth-test.c: Likewise
5194 2003-09-19 Dan Winship <danw@ximian.com>
5196 * libsoup/soup-address.c (update_address_from_entry): free the
5199 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Don't leak
5202 * libsoup/soup-gnutls.c (soup_gnutls_get_iochannel): Add some more
5203 iochannel initialization. Not sure how this worked before...
5205 * libsoup/soup-message.c (soup_message_cleanup_response): Renamed
5206 from soup_message_prepare (and a few things removed).
5208 * libsoup/soup-message-client-io.c (soup_message_send_request):
5209 s/soup_message_prepare/soup_message_cleanup_response/
5211 * libsoup/soup-message-io.c (io_read): Replace the final "\r\n"
5212 with "\0" on the headers before passing them to the parse
5214 (io_read): Call soup_message_cleanup_response after returning an
5215 informational response so the data doesn't leak.
5217 * libsoup/soup-headers.c (soup_headers_parse): Update for
5218 soup-message-io.c:io_read change
5220 * libsoup/soup-server.c (soup_server_new,
5221 soup_server_new_with_host): Don't leak the SoupAddress.
5223 * libsoup/soup-session.c (class_init): Make PROP_PROXY_URI not
5225 (set_property): If the proxy uri changes, call
5226 soup_session_abort() and cleanup_hosts().
5227 (request_finished, final_finished): Fix a bug when requeuing
5230 * tests/libsoup.supp: valgrind suppression file for soup tests
5232 * tests/Makefile.am (EXTRA_DIST): dist it.
5233 (noinst_PROGRAMS): move the former check_PROGRAMS to
5234 noinst_PROGRAMS instead.
5236 2003-09-18 Dan Winship <danw@ximian.com>
5238 * libsoup/soup-message.c: Add wrote_informational and
5239 got_informational signals.
5241 * libsoup/soup-message-client-io.c (get_request_headers): Set the
5242 EXPECT_CONTINUE flag on the message if that header is set.
5244 * libsoup/soup-message-server-io.c (parse_request_headers):
5247 * libsoup/soup-message-io.c (io_write): Set read_state to HEADERS
5248 when blocking on an expect-continue. Emit wrote_informational
5249 instead of wrote_headers in the 1xx case.
5250 (io_read): Set read_state to BLOCKING, not NOT_STARTED after
5251 reading a 100 Continue response. Emit got_informational instead of
5252 got_headers in the 1xx case.
5254 * libsoup/soup-session.c (soup_session_send_message): Reorder
5255 things to deal with the fact that the message could finish right
5256 away if there is a connection available and the server is very
5259 * libsoup/soup-status.h: Rename SOUP_STATUS_CLASS_TRANSPORT to
5260 SOUP_STATUS_CLASS_TRANSPORT_ERROR.
5262 2003-09-17 Dan Winship <danw@ximian.com>
5264 * libsoup/soup-session.c (find_oldest_connection): Fix two bugs
5265 (one that pruned too little, one that pruned too much).
5266 (queue_message): When requeuing, don't run the queue;
5267 final_finished will take care of that later.
5268 (soup_session_abort): New, to cancel all pending requests.
5270 * libsoup/soup-socket.c (soup_socket_connect, got_address): ref
5271 the socket while waiting for the address to resolve
5273 2003-09-17 Dan Winship <danw@ximian.com>
5275 * libsoup/soup-connection.c (soup_connection_new): Replaces the
5276 three previous soup_connection_new* functions and uses gobject
5277 properties to set the destination and proxy uris.
5278 (class_init): set up two more signals, authenticate and
5280 (soup_connection_send_request): virtualize
5281 (send_request): Default implementation
5283 * libsoup/soup-connection-ntlm.c: New SoupConnection subclass that
5284 also handles NTLM authentication. Includes all of the NTLM code
5285 formerly in soup-auth-ntlm.c.
5287 * libsoup/soup-auth-ntlm.[ch]: Gone.
5289 * libsoup/soup-auth.c: Remove NTLM refs
5291 * libsoup/soup-session.c (class_init): Add gobject properties for
5292 proxy, max_conns, use_ntlm. Change the "authenticate" and
5293 "reauthenticate" signal prototypes to not pass a SoupAuth (so they
5294 can be used for authenticating SoupConnectionNTLM as well, which
5295 doesn't use a SoupAuth).
5296 (soup_session_new): Renamed from soup_session_new_default.
5297 (soup_session_new_with_options): Replaces
5298 soup_session_new_with_proxy and soup_session_new_full. Takes
5300 (run_queue): Create a new connection of type SoupConnection or
5301 SoupConnectionNTLM depending on our "use_ntlm" property. Connect
5302 to its authenticate and reauthenticate signals.
5303 (connection_authenticate, connection_reauthenticate): proxy these
5306 * libsoup/soup-address.c (update_address_from_entry): Fix a
5307 crasher when failing to resolve the address.
5309 * libsoup/soup-dns.c (check_hostent): Fix some "how was this
5310 working before" bugs.
5312 * libsoup/soup-message-client-io.c (soup_message_send_request):
5313 call soup_message_prepare() to clean up the existing response
5316 * libsoup/soup-message-io.c (io_error): Set the read_state to DONE
5317 when processing an OK EOF.
5319 * libsoup/soup-status.h (SoupStatusClass): fix the numbering of
5320 these so that SOUP_STATUS_CLASS_SUCCESS is 2, etc.
5322 * tests/auth-test.c (authenticate, reauthenticate): Update for new
5324 (main): Use soup_session_new.
5325 * tests/get.c (main): Likewise.
5326 * tests/simple-proxy.c (main): Likewise.
5328 2003-09-10 Dan Winship <danw@ximian.com>
5330 * libsoup/soup-session.c: Add "authenticate" and "reauthenticate"
5332 (invalidate_auth): Remove the call to soup_auth_invalidate.
5333 (authenticate_auth): soup_auth_fn is gone. If the URI doesn't
5334 contain authentication, then emit "authenticate" or
5335 "reauthenticate" (depending on whether or not this is the first
5336 time we've asked for a password for this auth).
5337 (update_auth_internal): If the server rejects our
5338 username/password, don't bail out immediately. Try doing a
5339 "reauthenticate" first.
5341 * libsoup/soup-misc.c (soup_set_authorize_callback): Gone
5343 * libsoup/soup-auth.c (soup_auth_new_from_header_list): Remove the
5345 (soup_auth_invalidate): Remove this; it doesn't actually do
5346 anything useful for us.
5348 * libsoup/soup-auth-basic.c (invalidate): Remove
5349 * libsoup/soup-auth-digest.c: (invalidate): Remove
5350 * libsoup/soup-auth-ntlm.c: (invalidate): Remove
5352 * libsoup/soup-uri.c: Remove all references to "authmech".
5353 (soup_uri_set_auth): Remove this too.
5355 * tests/auth-test.c: Update to use the "authenticate" and
5356 "reauthenticate" signals instead of encoding usernames and
5357 passwords in the URIs. Add a few more test cases.
5359 2003-09-10 Dan Winship <danw@ximian.com>
5361 * libsoup/soup-message-private.h (SoupMessagePrivate): Remove the
5362 "status" field from here, since it's mostly used by SoupSession,
5363 which shouldn't need access to SoupMessagePrivate.
5365 * libsoup/soup-message.h (SoupMessage): Move it here.
5366 (SoupCallbackFn): Remove this alias for SoupMessageCallbackFn.
5367 (soup_message_set_uri): also moved from soup-message-private.h
5369 * libsoup/soup-message.c: s/msg->priv->status/msg->status/.
5371 * libsoup/soup-message-handlers.c:
5372 s/SoupCallbackFn/SoupMessageCallbackFn/ everywhere.
5374 * libsoup/soup-message-io.c (soup_message_io_client,
5375 soup_message_io_server, soup_message_io_unpause): Don't set up an
5376 idle handler, just jump right in to reading/writing; if this is a
5377 synchronous socket, then the caller wants to block, and if it's
5378 not, then we'll quickly get an EAGAIN anyway.
5380 * libsoup/soup-session.c: (queue_message): Likewise.
5381 (*) Update for SoupMessageStatus move and remove
5382 soup-message-private.h include.
5384 * libsoup/soup-server-message.c: Remove soup-message-private.h
5387 * libsoup/soup-server.c: Likewise.
5389 * libsoup/soup-connection.c (soup_connection_is_connected,
5390 soup_connection_is_new): Remove these, since they weren't being
5393 * libsoup/soup-md5-utils.c: Moved from md5-utils.c and renamed, to
5394 avoid namespace pollution.
5396 * libsoup/soup-auth-digest.c: Update for that.
5397 * libsoup/soup-server-auth.c: Likewise
5399 * tests/auth-test.c: Remove soup-message-private.h include
5401 2003-09-09 Dan Winship <danw@ximian.com>
5403 Beginnings of improved synchronous API support
5405 * libsoup/soup-dns.c: Simplify this by making it not automatically
5406 return the result: force the caller to poll. (This isn't really a
5407 performance issue: the results should come back quickly anyway.)
5408 Also, make the cache thread-safe.
5409 (soup_dns_entry_from_name): Was soup_gethostbyname
5410 (soup_dns_entry_from_addr): Was soup_gethostbyaddr
5411 (soup_dns_entry_check_lookup): Used to poll to see if DNS is done
5412 (soup_dns_entry_get_hostent): Gets the hostent from an entry (and
5413 blocks if it's not resolved yet).
5415 * libsoup/soup-address.c: Update for soup-dns changes.
5416 (soup_address_new): Don't automatically start resolving the
5417 hostname now, since we don't know if the caller is going to want
5418 it resolved synchronously or asynchronously.
5419 (soup_address_resolve_async): Renamed from soup_address_resolve.
5420 (soup_address_resolve_sync): New routine to do blocking
5423 * libsoup/soup-socket.c (soup_socket_connect): Now returns a
5424 status value directly when connecting synchronously.
5425 (soup_socket_client_new_async, soup_socket_client_new_sync):
5426 Separate async/sync client socket functions.
5427 (soup_socket_get_iochannel): Made static since it was not used
5428 outside soup-socket.
5430 * libsoup/soup-connection.c (soup_connection_new,
5431 soup_connection_new_proxy, soup_connection_new_tunnel): Just set
5432 up the data, don't actually start connecting.
5433 (soup_connection_connect_async, soup_connection_connect_sync): New
5434 async and sync SoupConnection connecting routines.
5435 (soup_connection_get_socket): Remove this since it wasn't being
5438 * libsoup/soup-session.c (final_finished): Run the queue since a
5439 connection is now freed up.
5440 (run_queue): Update for soup_connection_new* changes.
5442 * libsoup/soup-misc.c (soup_substring_index): Remove, since it
5443 wasn't being used any more.
5445 * libsoup/soup-private.h: Remove some prototypes for functions
5446 that no longer exist.
5448 * libsoup/soup-uri.c (soup_uri_copy_root): New utility function
5449 (copies the protocol, host, and port of a SoupUri).
5451 * tests/auth-test.c:
5453 * tests/simple-proxy.c: belatedly update for soup-session change
5455 * tests/revserver.c: Handle each new connection in its own thread,
5456 using synchronous SoupSocket calls.
5458 2003-09-05 Dan Winship <danw@ximian.com>
5460 * libsoup/soup-session.c: Move a bunch of logic here from
5461 soup-context. Now the session keeps track of hosts (instead of
5462 having a global soup_hosts hash) and their connections.
5463 (soup_session_new_with_proxy, soup_session_new_full): New session
5464 constructors to specify a proxy or a proxy and connection limits
5465 (send_request): Add Authorization and Proxy-Authorization headers
5466 before sending off the request.
5467 (soup_session_queue_message, et al): Improve the way this works.
5468 There's no need to use timeouts to wait for connections to become
5469 free; we *know* when they become free.
5471 * libsoup/soup-private.h: Remove SoupHost and some other
5472 no-longer-used stuff.
5474 * libsoup/soup-misc.c (soup_set_proxy, soup_get_proxy,
5475 soup_set_connection_limit, soup_set_connection_limit): Gone. These
5476 are all per-session now.
5478 * libsoup/soup-message.c: Remove all SoupContext references
5479 (mostly replaced with SoupUri references)
5480 (cleanup_message): priv->connect_tag and priv->connection are gone
5481 now, so this was just soup_message_io_cancel(). So remove
5482 cleanup_message and replace it with that everywhere.
5483 (soup_message_disconnect): Gone.
5484 (soup_message_set_uri): Replaces soup_message_set_context.
5485 (soup_message_set_connection, soup_message_get_connection): Gone
5487 * libsoup/soup-message-server-io.c (parse_request_headers):
5488 s/soup_message_set_context/soup_message_set_uri/
5490 * libsoup/soup-message-private.h (SoupMessagePrivate): Remove
5491 connect_tag, context, and connection.
5493 * libsoup/soup-message-client-io.c (encode_http_auth): Gone.
5495 * libsoup/soup-context.c: Gone
5497 * tests/auth-test.c (identify_auth): update for session/context
5500 2003-09-03 Dan Winship <danw@ximian.com>
5502 * libsoup/soup-status.h: Renamed from soup-error.h, with types
5503 and defines renamed accordingly.
5505 * libsoup/soup-message.h (SoupMessage): Rename errorcode to
5506 status_code and errorphrase to reason_phrase. Remove errorclass.
5507 (SOUP_MESSAGE_IS_ERROR): Remove this. You can't classify redirects
5508 as being either "errors" or "not errors", so its semantics are
5509 guaranteed to be wrong sometimes.
5511 * libsoup/soup-message.c (soup_message_set_status,
5512 soup_message_set_status_full): Renamed
5514 * libsoup/soup-message-handlers.c
5515 (soup_message_add_status_code_handler,
5516 soup_message_add_status_class_handler): Rename.
5518 * libsoup/soup-session.c (soup_session_send_message): Make this
5519 return a status code rather than a status class.
5521 * libsoup/soup-message-private.h (SoupMessagePrivate): Remove some
5522 unrelated unused fields (retries, callback, user_data).
5526 2003-09-02 Dan Winship <danw@ximian.com>
5528 * libsoup/soup-session.c: First draft at the new object to
5529 maintain formerly-global state. (Not yet complete; still need to
5530 get rid of SoupContext).
5532 * libsoup/soup-message-queue.c: Data structure used by SoupSession
5534 * libsoup/soup-queue.c: Gone. Mostly moved into soup-session, but
5535 some bits went into soup-connection.
5537 * libsoup/soup-connection.c (soup_connection_send_request): New,
5538 to send a request on a connection. The connection updates its
5539 internal state and then hands off to soup_message_send_request.
5540 (request_done): Callback set up by soup_connection_send_request.
5541 Marks the connection as no-longer-in-use, and disconnects it if
5542 the message says to.
5543 (soup_connection_set_in_use, soup_connection_mark_old): No longer
5544 needed; the connection takes care of this itself now.
5545 (soup_connection_new_proxy): New, to create a new connection that
5546 is explicitly marked as being through an HTTP proxy.
5547 (soup_connection_new_tunnel): New, to create a new HTTPS
5548 connection through a proxy. (Includes the code to send the
5551 * libsoup/soup-context.c (try_existing_connections): Don't need to
5552 call soup_connection_set_in_use.
5553 (try_create_connection): Use soup_connection_new,
5554 soup_connection_new_proxy, or soup_connection_new_tunnel as
5557 * libsoup/soup-message.c (soup_message_prepare): Replaces
5559 (soup_message_queue, soup_message_requeue, soup_message_prepare):
5560 Gone. This must be done via a SoupSession now.
5561 (soup_message_set_connection): don't need to mark in_use/not
5562 in_use. Also, msg->priv->socket is gone now.
5563 (soup_message_get_socket): Gone.
5565 * libsoup/soup-message-handlers.c (soup_message_run_handlers):
5566 Remove references to global handlers.
5567 (redirect_handler, authorize_handler): Moved to soup-session.c.
5569 * libsoup/soup-misc.c (soup_shutdown): Gone; just unref the
5570 session to shut down now.
5572 * libsoup/soup.h: add soup-session.h
5574 * libsoup/Makefile.am: updates
5576 * tests/auth-test.c, tests/get.c, tests/simple-proxy.c: Use
5579 2003-08-29 Dan Winship <danw@ximian.com>
5581 * libsoup/soup-message-io.c: Major rewrite. There is now only a
5582 single IO state object (instead of one for reading and one for
5583 writing), and the IO code handles switching back and forth between
5584 reading and writing as appropriate (including handling the extra
5585 switches needed for "Expect: 100-continue").
5586 (soup_message_io_client, soup_message_io_server): The new entry
5588 (soup_message_io_cancel): If the caller cancels the IO when we
5589 were expecting to read more data, disconnect the socket.
5591 * libsoup/soup-message.h (SoupMessageFlags): add
5592 SOUP_MESSAGE_EXPECT_CONTINUE, to indicate that the IO code should
5593 do the special expect-continue handling.
5595 * libsoup/soup-message.c: Move all the signal stuff here. Remove
5596 the "done_reading" and "done_writing" signals and replace them
5597 with a single "finished" signal. (A single signal. Say that 10
5599 (soup_message_got_headers, etc): Functions to emit signals.
5600 (got_headers, got_chunk, got_body): Default signal methods that
5601 call soup_message_run_handlers.
5602 (finished): Default signal method that replaces
5603 soup_message_issue_callback.
5604 ([various]): s/soup_message_issue_callback/soup_message_finished/
5605 (soup_message_requeue): There's no soup_message_set_read_callbacks
5606 any more, so if the caller requeues while it's still reading, just
5608 (soup_message_add_chunk, soup_message_add_final_chunk,
5609 soup_message_pop_chunk): Moved here from soup-server-message,
5610 although we don't actually quite support using chunked encoding
5613 * libsoup/soup-server-message.c (soup_server_message_new): No
5614 longer takes a socket argument.
5615 (soup_server_message_add_chunk, soup_server_message_get_chunk):
5616 Moved into SoupMessage.
5618 * libsoup/soup-message-handlers.c (global_handlers): Make these
5619 POST_BODY rather than PRE_BODY, so they won't mess up the IO
5620 channel when the requeue the message.
5621 (soup_message_run_handlers): Don't need to issue the message
5622 callback from here any more.
5623 (authorize_handler): Just leave the error as 401 or 407 (see
5624 soup-error.h change)
5626 * libsoup/soup-message-client-io.c (soup_message_send_request):
5627 Replaces soup_message_write_request and
5628 soup_message_read_response.
5630 * libsoup/soup-message-server-io.c: Parallel to
5631 soup-message-client-io.c, this defines the server-side header
5633 (soup_message_read_request): Its entry point.
5635 * libsoup/soup-server.c: Lots of code moved into
5636 soup-message-server-io.c. Update for other changes.
5638 * libsoup/soup-queue.c: Update for changes
5640 * libsoup/soup-socket.c (read_from_network, soup_socket_write):
5641 Don't call soup_socket_disconnect() on an error, just return
5642 SOUP_SOCKET_ERROR. Otherwise soup_socket_disconnect() could emit
5643 signals that will mess up the caller of the read/write function.
5645 * libsoup/soup-connection.c (soup_connection_disconnect): When
5646 disconnecting the socket, disconnect from its signals first to
5647 prevent bad reentrancy.
5649 * libsoup/soup-error.h: Kill off SOUP_ERROR_CANT_AUTHENTICATE and
5650 SOUP_ERROR_CANT_AUTHENTICATE_PROXY, since they don't really say
5651 anything that SOUP_ERROR_UNATHORIZED and
5652 SOUP_ERROR_PROXY_UNAUTHORIZED don't say. (And now, all of the
5653 "transport" errors actually are transport-related.)
5655 * tests/auth-test.c (main): s/CANT_AUTHENTICATE/UNAUTHORIZED/
5657 * tests/simple-proxy.c: Complicate this a bunch. In particular,
5658 use SOUP_MESSAGE_OVERWRITE_CHUNKS and the GOT_CHUNK signal, and
5659 pass the data back to the client in chunked format.
5661 2003-08-27 Dan Winship <danw@ximian.com>
5663 * libsoup/soup-types.h: New header with typedefs, to avoid
5664 #include loops among other headers.
5666 * libsoup/Makefile.am (libsoupinclude_HEADERS): add it
5668 * libsoup/*.[ch], tests/*.c: Update for soup-types.h
5670 2003-08-26 Dan Winship <danw@ximian.com>
5672 * libsoup/soup-message-client-io.c (soup_message_write_request,
5673 soup_message_read_response): Higher-than-soup-message-io-level
5674 functions to do client-side IO. (Code that used to be in
5676 (get_request_header_cb): Fix a bug in the generation of the Host:
5677 header; need to include the port number if it's not the default.
5679 * libsoup/soup-message-io.c (soup_message_write,
5680 soup_message_write_simple): Take separate user_datas for the get_*
5681 callbacks and the done callbacks.
5683 * libsoup/soup-queue.c: Update to use soup_message_write_request
5684 and soup_message_read_response.
5686 * libsoup/soup-connection.c (soup_connection_new): Change the
5687 prototype to take a SoupUri and a callback.
5689 * libsoup/soup-context.c (try_create_connection,
5690 soup_context_connect_cb): Update for soup_connection_new change.
5692 * libsoup/soup-server.c (read_done_cb, issue_bad_request): Update
5693 for soup_message_write changes
5695 * libsoup/soup-uri.c (soup_uri_uses_default_port): new utility
5698 2003-08-26 Dan Winship <danw@ximian.com>
5700 * libsoup/soup-message-private.h: Define SoupMessage signal stuff
5701 (READ_HEADERS, READ_CHUNK, READ_BODY, READ_ERROR, WROTE_HEADERS,
5702 WROTE_CHUNK, WROTE_BODY, WRITE_ERROR).
5704 * libsoup/soup-message.c (class_init): set up signals
5705 (requeue_read_finished): Update for changes.
5707 * libsoup/soup-message-io.c (soup_message_read): Split out
5708 parse_headers_cb from read_headers_cb. Also add a SoupDataBuffer *
5709 arg to say where to store the message body. Set up
5710 read_headers_cb, read_chunk_cb, read_body_cb, and error_cb as
5712 (do_read): Call r->parse_headers_cb, then emit READ_HEADERS
5713 (read_body_chunk): emit READ_CHUNK.
5714 (issue_final_callback): Set r->body. emit READ_BODY.
5715 (failed_read): emit READ_ERROR.
5716 (soup_message_read_set_callbacks): Disconnect old signal handlers,
5718 (soup_message_read_cancel): Disconnect signal handlers.
5719 (soup_message_write, soup_message_write_simple): Set up
5720 wrote_body_cb and error_cb as signal handlers.
5721 (do_write): emit WROTE_HEADERS and WROTE_CHUNK, even though
5722 nothing currently ever listens for them. emit WROTE_BODY when
5724 (failed_write): emit WRITE_ERROR
5726 * libsoup/soup-queue.c (soup_queue_parse_headers_cb,
5727 soup_queue_read_headers_cb): Split this into two unequal chunks.
5728 (read_header_cb only runs the pre-body handlers).
5729 (soup_queue_read_chunk_cb, soup_queue_read_done_cb): Update
5731 (soup_queue_write_done_cb): Update call to soup_message_read
5733 * libsoup/soup-server.c (parse_headers_cb): Renamed from
5735 (read_done_cb): Update prototype
5736 (start_request): Update soup_message_read call.
5738 2003-08-25 Dan Winship <danw@ximian.com>
5740 * libsoup/soup-message-io.c (soup_message_read,
5741 soup_message_write, soup_message_write_simple): Add a "user_data"
5742 arg, pass it to the callbacks.
5744 * libsoup/soup-message.c (soup_message_requeue,
5745 requeue_read_finished, requeue_read_error): Update for that
5747 * libsoup/soup-queue.c: Likewise
5749 * libsoup/soup-server.c: Likewise
5751 2003-08-25 Dan Winship <danw@ximian.com>
5753 * libsoup/soup-message.c (soup_message_new): Take a uri string
5754 instead of a context. Also, swap the args (so the method comes
5755 before the URI, just like in the protocol).
5756 (soup_message_new_from_uri): Like soup_messgae_new, but takes a
5757 SoupUri instead of a string
5758 (soup_message_set_request, soup_message_set_response): Replace
5759 soup_message_new_full.
5760 (cleanup_message): Was soup_message_cleanup, but is static now.
5761 (queue_message): Do the pre-queuing message cleanup here instead
5762 of in soup_queue_message.
5763 (soup_message_queue): Set the callback and user_data, then call
5765 (requeue_read_error, requeue_read_finished, soup_message_requeue):
5767 (soup_message_get_uri): Replaces soup_message_get_context.
5769 * libsoup/soup-message.h (SoupMessage): Remove msg->context. (It's
5770 part of SoupMessagePrivate now)
5772 * libsoup/soup-context.c: #include soup-message-private
5773 (soup_context_from_uri): constify the uri arg.
5775 * libsoup/soup-queue.c: Various context/uri fixes
5776 (proxy_https_connect): Use soup_message_new_from_uri.
5777 (soup_queue_message): Drastically simplified since most of the
5778 work is in soup-messsage.c:queue_message() now
5780 * libsoup/soup-auth-digest.c (compute_response,
5781 get_authorization): Use soup_message_get_uri.
5783 * libsoup/soup-server-auth.c (parse_digest): Likewise
5785 * libsoup/soup-server.c (call_handler): Likewise
5787 * tests/simple-httpd.c (server_callback): Likewise.
5789 * tests/simple-proxy.c (server_callback): Likewise
5791 * tests/get.c (got_url): Likewise.
5792 (get_url): Update soup_message_new usage.
5794 * tests/auth-test.c: #include soup-message-private. Update for
5795 context changes and soup_message_new change.
5797 2003-08-22 Dan Winship <danw@ximian.com>
5799 * libsoup/soup-message-private.h: New file containing
5800 SoupMessagePrivate and some other soup-message-internal
5801 types/functions. Also includes the new, expanded SoupMessageStatus
5804 * libsoup/soup-message-io.c: Replaces what used to be in
5805 soup-transfer, but now all the interfaces take SoupMessages
5806 instead of SoupReader/SoupWriter and deal with maintaining
5807 msg->priv->{read,write}_state themselves. Fixes up all the
5808 refcounting madness.
5810 * libsoup/soup-message-handlers.c: Move the handler code here,
5811 mostly unchanged. (But rename SoupHandlerType to SoupHandlerPhase
5812 to make the distinction from SoupHandlerKind clearer.)
5814 * libsoup/soup-message.c: Update for soup-message-io and new
5815 SoupMessageStatus values. Remove handler code.
5816 (soup_message_cleanup): Remove the hack to try to preserve the
5817 connection if the message gets cleaned up before it finishes
5818 reading. soup_message_requeue handles this in the requeuing case,
5819 and there's no especially compelling reason to bother doing it in
5820 any other case. (And the soup-message-io api doesn't support
5821 having a read operation that's not connected to any message.)
5823 * libsoup/soup-private.h: remove SoupMessagePrivate
5825 * libsoup/soup-queue.c: Update for soup-message-io and new
5826 SoupMessageStatus values.
5828 * libsoup/soup-server-message.c: Likewise
5830 * libsoup/soup-server.c: Likewise
5832 * libsoup/soup-transfer.c: Gone (yay)
5834 * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): update
5836 2003-08-20 Dan Winship <danw@ximian.com>
5838 * libsoup/soup-message.c: Make this a GObject. (Note that since
5839 SoupMessage was not refcounted before, it's not really refcounted
5841 (soup_message_free): Gone, replaced by g_object_unref
5842 (soup_message_copy, soup_message_foreach_remove_header): Remove
5843 these, since neither was currently functional.
5844 (soup_message_is_keepalive): New utility function to look at
5845 HTTP version and request/response headers to decide if a message
5846 indicates the connection should be kept alive.
5847 (soup_message_set_connection, soup_message_get_connection): New
5848 (soup_message_get_socket): New
5850 * libsoup/soup-server-message.c: Make this a subclass of
5852 (soup_server_message_new): Now takes a SoupServer and SoupSocket
5853 (soup_server_message_get_server): New
5854 (soup_server_message_set_encoding,
5855 soup_server_message_get_encoding): Get/set whether the message
5856 should be sent with content-length or chunked encoding
5857 (soup_server_message_is_started, soup_server_message_is_finished):
5858 Private member accessors.
5859 (soup_server_message_add_chunk): Renamed from add_data
5860 (soup_server_message_get_chunk): Pops a chunk from the list.
5861 (soup_server_message_get_source): Gone
5863 * libsoup/soup-server.c: Update for SoupServerMessage changes.
5864 (error_cb, write_done_cb): All the cleanup stuff that used to be
5865 here happens automatically by unreffing the message now.
5866 (get_response_header): Remove some erroneous leftover CGI stuff
5867 (issue_bad_request): add "Connection: close" to the response.
5868 (read_headers_cb): clean this up a bit. Reject HTTP/1.1 messages
5869 with no Host header as per RFC 2616.
5871 * libsoup/soup-connection.c (soup_connection_start_ssl): Gone
5872 (soup_connection_set_in_use): Let the caller set the connection to
5873 "not in use" even after the socket has been disconnected.
5875 * libsoup/soup-context.c: Use soup_message_get_connection
5877 * libsoup/soup-headers.c (soup_headers_parse_request): Remove the
5878 check on request length, since it was rejecting
5879 "GET / HTTP/1.0\r\n\r\n", which is a valid complete request.
5881 * libsoup/soup-queue.c: Use soup_message_get_connection and
5882 soup_message_get_socket.
5883 (soup_queue_read_done_cb): Use soup_message_is_keepalive
5884 (proxy_https_connect_cb): Use soup_socket_start_ssl rather than
5885 soup_connection_start_ssl
5887 * libsoup/soup-socket.c (finalize): disconnect the GIOChannel
5888 handlers if the socket hasn't been disconnected yet.
5890 * libsoup/soup-transfer.c (soup_reader_read_body_chunk,
5891 reader_read): Fix these so that reader_read will exit properly if
5892 the read is cancelled.
5894 * tests/auth-test.c (main): s/soup_message_free/g_object_unref/
5896 * tests/simple-httpd.c (server_callback): set the message to
5897 content-length encoding.
5898 * tests/simple-proxy.c (server_callback): Likewise
5900 2003-08-19 Dan Winship <danw@ximian.com>
5902 * libsoup/soup-socket.c (soup_socket_read,
5903 soup_socket_read_until, soup_socket_write): New API for doing
5904 socket IO. Works both synchronously and asynchronously, and
5905 buffers data to prevent the "100 Continue" problem.
5906 (soup_socket_set_flag): Replaces formerly-private
5907 soup_set_sockopts. (primarily to let the caller turn off
5908 SOUP_SOCKET_FLAG_NONBLOCKING).
5910 * libsoup/soup-transfer.c (soup_transfer_read,
5911 soup_transfer_write, soup_transfer_write_simple): Take a
5912 SoupSocket instead of a GIOChannel. Use the new socket IO api.
5913 Changed the prototypes of some of the callbacks to be less
5916 * libsoup/soup-connection.c (soup_connection_get_socket): Replaces
5917 soup_connection_get_iochannel.
5919 * libsoup/soup-message.c: Fix up for soup-transfer changes
5921 * libsoup/soup-queue.c: Likewise
5923 * libsoup/soup-server.c: Likewise
5925 * tests/revserver.c: A slightly more complicated replacement for
5926 timeserver. (Does both reads and writes)
5928 2003-08-19 Dan Winship <danw@ximian.com>
5930 * libsoup/soup-socks.[ch]: Remove this. RC doesn't let you
5931 configure it, and no one has complained, and it looks like the
5932 SOCKS5 auth code doesn't actually work anyway...
5934 * libsoup/soup-queue.c (proxy_connect): Remove SOCKS code.
5936 * libsoup/soup-uri.h: Remove SOUP_PROTOCOL_SOCKS4 and
5937 SOUP_PROTOCOL_SOCKS5
5939 * libsoup/soup-misc.c: Remove a references to SOCKS in a comment
5941 * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): remove
5944 2003-08-19 Dan Winship <danw@ximian.com>
5946 * libsoup/soup-server.c: Make this a GObject. Remove
5947 SoupServerMessage code (to soup-server-message.c). Remove CGI
5948 server code (for now?)
5949 (soup_server_add_handler, soup_server_remove_handler): Rename
5950 (from register/unregister) to make it clearer what they do.
5952 * libsoup/soup-server-message.c: Moved out of soup-server.c
5954 * libsoup/soup-private.h: Remove SoupServer def
5956 * libsoup/Makefile.am (libsoupinclude_HEADERS,
5957 libsoup_2_2_la_SOURCES): add soup-server-message.[ch]
5959 * tests/simple-httpd.c:
5960 * tests/simple-proxy.c: Update for SoupServer changes
5962 2003-08-18 Dan Winship <danw@ximian.com>
5964 * libsoup/soup-address.c (SoupAddressPrivate): Make this more like
5965 a struct sockaddr again (like it used to be). In particular, add
5966 back the "port" field. Add a bunch of macros to try (and fail) to
5967 simplify some of the code.
5968 (soup_address_new): Now returns a SoupAddress directly rather than
5969 a random handle, and the caller can just use g_object_unref to
5970 cancel the lookup. Also, the callback now uses a
5971 SoupKnownErrorCode rather than a special-purpose address-lookup
5973 (soup_address_new_cancel): No longer needed.
5974 (soup_address_new_sync): Removed
5975 (soup_address_new_any): Replaces soup_address_ipv4_any and
5976 soup_address_ipv6_any.
5977 (soup_address_get_name, etc): Gone. Use soup_address_resolve()
5979 (soup_address_get_physical): Renamed from
5980 soup_address_get_canonical_name.
5981 (soup_address_get_sockaddr): Replaces soup_address_make_sockaddr()
5983 * libsoup/soup-socket.c: Update for SoupAddress changes and make
5984 similar changes here.
5985 (soup_socket_new): Just creates a generic SoupSocket now.
5986 (soup_socket_connect): Client setup
5987 (soup_socket_listen): Server setup. Now also sets up an iochannel
5988 listening for connects and emits a "new_connection" signal as they
5990 (soup_socket_start_ssl): Turns on SSL.
5991 (soup_socket_client_new, soup_socket_server_new): Utility
5992 functions that wrap the above.
5993 (soup_socket_new_cancel, soup_socket_new_sync): Gone
5994 (soup_socket_server_accept, soup_socket_server_try_accept): No
5996 (soup_socket_get_iochannel): No longer adds a ref when returning
5997 the iochannel. Also, we set it to "close_on_unref" so that if a
5998 caller adds a ref to it, the connection will actually remain open
5999 even after the SoupSocket is destroyed.
6000 (soup_socket_get_local_address, soup_socket_get_remote_address):
6001 Let the caller get both of these.
6003 * libsoup/soup-connection.c: Don't keep a private copy of the
6005 (soup_connection_new): Don't need to set socket options here.
6007 (soup_connection_start_ssl): Just call soup_socket_start_ssl.
6008 (soup_connection_get_iochannel): Just return the socket's
6009 iochannel (and don't ref it)
6011 * libsoup/soup-error.c: add SOUP_ERROR_CANT_RESOLVE and
6012 SOUP_ERROR_CANT_RESOLVE_PROXY
6014 * libsoup/soup-dns.c (soup_ntop): Make the address arg const.
6015 Remove the "FIXME add a CANT_RESOLVE error" and return
6016 SOUP_ERROR_CANT_RESOLVE instead.
6018 * libsoup/soup-server.c: Update for socket/address changes. Don't
6019 poke into SoupSocket's private fields.
6020 (soup_server_run_async): Just connect to the socket's
6021 "new_connection" signal.
6023 * libsoup/soup-context.c (try_create_connection,
6024 soup_context_connect_cb): Update for socket changes. Replace
6025 SOUP_CONNECT_ERROR codes with plain SOUP_ERROR codes.
6027 * libsoup/soup-misc.c (soup_signal_connect_once): Utility function
6028 to connect to a signal handler and connect another function to
6029 clean up the first signal handler after its first invocation.
6030 (Lets us use signals to replace one-off callbacks.)
6032 * libsoup/soup-private.h: Remove SoupSocketPrivate since it is
6033 actually private now.
6034 (struct _SoupServer): Remove accept_tag.
6036 * libsoup/soup-queue.c (soup_queue_read_done_cb, start_request):
6037 Don't unref the iochannel.
6038 (soup_queue_connect_cb): Takes a SoupKnownErrorCode now.
6040 * libsoup/soup-socks.c: Update for socket/address changes
6042 * tests/simple-httpd.c (main):
6043 s/SOUP_SERVER_ANY_PORT/SOUP_ADDRESS_ANY_PORT/
6044 * tests/simple-proxy.c (main): Likewise
6046 * tests/timeserver.c: Update for SoupSocket's "new_connection"
6047 signal, and for SoupAddress changes.
6049 2003-08-14 Dan Winship <danw@ximian.com>
6051 * libsoup/soup-connection.c: New, split out from soup-context and
6052 made into a GObject.
6053 (soup_connection_disconnect): Disconnects the connection and emits
6054 a signal. (Replaces the old "keep_alive" flag.)
6055 (soup_connection_is_connected): Checks if the connection is still
6057 (connection_died): Just disconnect, rather than freeing the
6058 connection. This way if anyone else is still referencing it they
6059 won't end up with an invalid pointer.
6061 * libsoup/soup-context.c: Make this a GObject, remove all the
6062 SoupConnection code. Add an "ntlm_auths" field to SoupHost so that
6063 SoupContext can keep track of connection auth stuff there without
6064 SoupConnection needing to care. Various other updates.
6066 * libsoup/soup-private.h: Remove SoupContext and SoupConnection
6069 * libsoup/*.c, tests/get.c: Update for context/connection changes
6071 * libsoup/soup-socks.c (soup_connect_socks_proxy): Change the
6072 definition to deal with the fact that there's no
6073 soup_connection_get_context any more.
6075 * libsoup/soup-queue.c (soup_queue_read_headers_cb): Don't deal
6076 with connection persistence here.
6077 (soup_queue_read_done_cb): Do it here instead. Disconnect the
6078 connection when appropriate.
6079 (proxy_connect, proxy_https_connect, proxy_https_connect_cb):
6080 Reference-count the connection properly. (I think.)
6082 * libsoup/soup-marshal.list: New, for SoupConnection's
6083 "disconnected" signal.
6085 * libsoup/Makefile.am: add rules to build soup-marshal.[ch]
6087 * configure.in: Use AM_PATH_GLIB_2 rather than pkg-config, so that
6088 GLIB_GENMARSHAL gets set too.
6090 2003-08-14 Dan Winship <danw@ximian.com>
6092 * libsoup/soup-error.c: Fix a spelling mistake.
6094 * libsoup/*.c: Fix use of @/%/#/() in gtk-doc comments
6096 2003-08-12 Dan Winship <danw@ximian.com>
6098 * libsoup/soup-auth.c: Make this an abstract GObject. Tweak some
6099 of the interfaces around a little bit.
6101 * libsoup/soup-auth-basic.c: subclass for Basic auth
6103 * libsoup/soup-auth-digest.c: subclass for Digest auth
6105 * libsoup/soup-auth-ntlm.c: subclass for NTLM auth. Move all of
6106 the code from soup-ntlm.c here, and make it private.
6108 * libsoup/soup-ntlm.c: gone
6110 * libsoup/soup-misc.h: Remove the definition of SoupAuthType from
6111 here, and change the signature of SoupAuthorizeFn.
6113 * libsoup/soup-context.c: Use g_object_unref to free auths, use
6114 methods instead of directly access private fields.
6116 * libsoup/soup-queue.c: Likewise
6118 * libsoup/soup-server-auth.c (soup_server_auth_free): Remove all
6119 NTLM references. We have no plans to implement server-side NTLM
6122 * tests/auth-test.c (identify_auth): Update for auth api changes
6124 2003-08-12 Dan Winship <danw@ximian.com>
6126 * configure.in (GLIB): add gobject-2.0 to the PKG_CHECK_MODULES
6129 * libsoup/soup-address.c: Make this a GObject.
6130 (soup_address_ref, soup_address_unref): Gone.
6131 (soup_address_copy): Gone. Wasn't being used anyway.
6133 * libsoup/soup-dns.c: Move all of the DNS code and caching stuff
6134 here from soup-address.c, so that soup-address doesn't need to
6135 worry about trying to cache zero-ref addresses.
6137 * libsoup/soup-socket.c: Make this a GObject. Use "guint"
6138 consistently for port numbers.
6139 (soup_socket_ref, soup_socket_unref): Gone.
6141 * libsoup/soup-private.h: Change the SoupSocket definition to be
6142 SoupSocketPrivate. (Still need to keep this here since soup-server
6143 pokes around in its internals.)
6144 (SOUP_MAKE_TYPE): Copied from gal's E_MAKE_TYPE.
6146 * libsoup/soup-server.c (read_done_cb, write_done_cb): Unref the
6147 reader/writer rather than leaking them.
6149 * libsoup/*: Use GObject methods for socket/address refcounting
6151 * tests/auth-test.c (main)
6152 * tests/timeserver.c (main): Call g_type_init.
6154 * tests/get.c (main): Call g_type_init.
6155 (get_url, got_url): Fix some bugs that could make -r mode get into
6156 infinite loops downloading the same files over and over. Plug some
6157 memory leaks to make this more useful for valgrinding libsoup.
6159 * tests/simple-httpd.c (main): Call g_type_init. Set up a signal
6160 handler for SIGINT so we can exit cleanly, since valgrind won't
6161 give a leak report if you don't. Plug a few memory leaks.
6163 * tests/simple-proxy.c (main): Likewise
6165 2003-08-12 Dan Winship <danw@ximian.com>
6167 Pull over some new test programs from the soup-refactoring branch,
6168 along with the SoupUri changes they depend on.
6170 * tests/simple-httpd.c: A really simple HTTP server, to test the
6173 * tests/simple-proxy.c: An even simpler HTTP proxy
6175 * tests/get.c: Add "-r" flag to recursively get files (thereby
6176 testing multiple-connections-at-once code). Also good for setting
6177 up a tree to use with simple-httpd.
6179 * tests/timeserver.c (main): Fix a bug. (s/ipv6/ipv4/ in the
6182 * tests/uri-parsing.c: Regression test for the new soup-uri.c
6184 * libsoup/soup-uri.c: Rewrite/update to conform to RFC 2396, and
6185 pull in some optimizations from camel-url. Also, make SoupProtocol
6186 a GQuark so we can still compare them with ==, but we can also
6187 recognize any protocol.
6188 (soup_uri_new_with_base): New, to merge base and relative URIs
6189 (soup_uri_to_string): Update this. Change the "show_password" flag
6190 (which we always passed FALSE for) to "just_path", for places that
6191 want the path+query without the protocol, host, etc.
6193 * libsoup/soup-queue.c (soup_get_request_header): Just use
6194 soup_uri_to_string to generate the request URI.
6196 * libsoup/soup-auth.c (compute_response, digest_auth_func): Use
6197 "soup_uri_to_path (uri, TRUE)" rather than trying to reassemble
6198 the URI by hand badly.
6199 * libsoup/soup-server-auth.c (parse_digest): Likewise
6201 * libsoup/soup-socks.c (soup_connect_socks_proxy): Change a
6202 switch() to an series of if()s since SOUP_PROTOCOL_* aren't
6205 * libsoup/soup-context.c (soup_context_uri_hash,
6206 soup_context_uri_equal): s/querystring/query/
6208 2003-08-12 Dan Winship <danw@ximian.com>
6210 * configure.in: Bump API version to 2.2 and package version to
6211 2.1.0. Remove NSS and OpenSSL checks and proxy-related config. Use
6212 libgnutls-config to find GNUTLS.
6214 * libsoup-2.2.pc.in: Update, and rename from soup-2.0.pc
6216 * Makefile.am: Update for pc file rename
6218 * libsoup/Makefile.am: s/2.0/2.2/ everywhere. Remove NSS, OpenSSL,
6219 and libsoup-ssl-proxy stuff.
6221 * libsoup/soup-ssl-proxy.c
6222 * libsoup/soup-nss.[ch]
6223 * libsoup/soup-openssl.[ch]: gone
6225 * libsoup/soup-ssl.c: remove NSS and OpenSSL bits
6227 * tests/Makefile.am (get_LDADD, timeserver_LDADD,
6228 auth_test_LDADD): Update libsoup version
6230 2003-08-07 Dan Winship <danw@ximian.com>
6232 * libsoup/soup-auth.c (soup_auth_lookup, soup_auth_set_context,
6233 soup_auth_invalidate): These are all really SoupContext functions,
6234 so move them to soup-context.c (and rename them appropriately).
6235 (soup_auth_get_protection_space): New method to get the
6236 "protection space" of an auth (paths where it is valid).
6237 (soup_auth_invalidate): New method to try to un-authenticate an
6238 auth (so we can keep the domain info cached even if the auth info
6240 (basic_pspace_func): Basic protection space is all directories
6241 below the current one.
6242 (basic_invalidate_func): Clear the encoded username/password
6243 (digest_pspace_func): Digest protection space is either the whole
6244 server, or "what the domain parameter says" (though we don't deal
6245 with cross-host domains).
6246 (digest_invalidate_func): Return FALSE; bad digest auth info isn't
6248 (digest_parse_func, digest_free): Set/free domain parameter
6249 (ntlm_pspace): NTLM protection space is always the whole server.
6250 (ntlm_invalidate): Clear the auth state.
6251 (soup_auth_new_ntlm): Make this non-static
6252 (SoupAuth): Replace the quad-state "status" field with an
6253 "authenticated" boolean.
6255 * libsoup/soup-private.h (SoupHost): Replace the "valid_auths"
6256 hash with separate "auth_realms" (path->realm) and "auths"
6257 (realm->auth) hashes. Also add a "use_ntlm" flag.
6259 * libsoup/soup-context.c (soup_context_unref): Update SoupHost
6261 (connection_free): Don't the connection's auth, just free it.
6262 (soup_context_lookup_auth): Formerly soup_auth_lookup, but now
6263 does two-stage lookup (path->realm then realm->auth) and also
6264 deals with NTLM hacks.
6265 (soup_context_update_auth): Mostly formerly soup_auth_set_context,
6266 but also large parts of authorize_handler. Updates the auth hashes
6267 based on information from a 401 or 407 response. Does a better job
6268 than authorize_handler did of not throwing away good information.
6269 (soup_context_preauthenticate): New; fakes up auth info so that
6270 requests will end up using authentication without the server
6271 needing to return an error first.
6272 (soup_context_authenticate_auth): Moved out of authorize_handler
6273 so it can be used at request-sending time too, if we know that we
6274 need it. (That way we can avoid requeuing the request if it isn't
6275 going to be able to be authenticated.)
6276 (soup_context_invalidate_auth): Sort of like the old
6277 soup_auth_invalidate, but only destroys the auth data, while still
6278 remembering the path->realm mapping.
6280 * libsoup/soup-message.c (authorize_handler): Mostly moved into
6281 soup_context_update_auth.
6282 (maybe_validate_auth): Remove this; it was only useful because of
6283 bugs elsewhere in the auth handling.
6285 * libsoup/soup-queue.c (soup_encode_http_auth): Update for
6286 soup_context_lookup_auth. If the returned auth isn't
6287 authenticated, call soup_context_authenticate_auth() on it.
6289 * tests/auth-test.c: New (from soup-refactoring branch). Tests
6290 that the Basic/Digest auth code does the right thing. (TODO: find
6291 a good way to add NTLM tests too.)
6293 * tests/Makefile.am (check_PROGRAMS): add auth-test
6295 2003-07-29 Dan Winship <danw@ximian.com>
6297 * configure.in: 1.99.25 ("Potato and Leek Soup")
6299 * libsoup/soup-message.c (requeue_read_finished,
6300 release_connection): Free the passed-in body data. Otherwise the
6301 response body ends up getting leaked on most 3xx and 4xx
6303 (soup_message_cleanup): Remove a piece of code that didn't
6304 actually do anything and its associated confused comment.
6306 * libsoup/soup-auth.c (ntlm_free): plug an occasional NTLM auth leak
6308 * libsoup/soup-context.c (connection_free): plug a non-occasional
6311 2003-06-26 Joe Shaw <joe@ximian.com>
6313 * configure.in: Version 1.99.24
6315 2003-06-24 Dan Winship <danw@ximian.com>
6317 * configure.in: Check pkgconfig for openssl, since 0.9.7 (a) uses
6318 it, and (b) depends on lots of new things sometimes (like on RH9).
6320 * libsoup/soup-openssl.c:
6321 * libsoup/soup-ssl-proxy.c: Change #ifdef HAVE_OPENSSL_SSL_H to
6322 just #ifdef HAVE_OPENSSL since the header check doesn't get run in
6325 2003-06-19 Dan Winship <danw@ximian.com>
6327 * libsoup/soup-queue.c (soup_queue_read_done_cb): unref the
6328 old read_tag before changing/clearing it.
6329 (soup_queue_write_done_cb): Likewise with the write_tag.
6331 * libsoup/soup-transfer.c (issue_final_callback): ref the reader
6332 around the stop+callback.
6333 (soup_transfer_write_cb): Likewise.
6335 2003-06-12 Dan Winship <danw@ximian.com>
6337 * libsoup/soup-transfer.c (SoupReader, SoupWriter): add a
6339 (soup_transfer_read, create_writer): Set initial ref_count to 2
6340 (one for soup-transfer, one for the caller).
6341 (soup_transfer_read_ref, soup_transfer_read_unref): ref/unref a
6343 (soup_transfer_read_stop): Clears the GIOChannel callbacks and
6344 drops soup-transfer's ref.
6345 (soup_transfer_read_cancel): Now just a stop+unref
6346 (soup_transfer_write_ref, soup_transfer_write_unref,
6347 soup_transfer_write_stop, soup_transfer_write_cancel): Similarly.
6349 * libsoup/soup-message.c (soup_message_cleanup): when setting up
6350 the "finish reading" callbacks, unref the reader so it will be
6351 destroyed once it's done reading.
6352 (soup_message_requeue): Likewise.
6354 * libsoup/soup-queue.c (soup_queue_read_headers_cb): Update for
6355 prototype change (no longer returns a SoupTransferDone).
6356 (soup_queue_read_chunk_cb): Likewise.
6358 * libsoup/soup-server.c (read_headers_cb): Likewise
6360 2003-06-11 Dan Winship <danw@ximian.com>
6362 * libsoup/soup-transfer.c: Change all functions to take a
6363 SoupReader * or SoupWriter * instead of a guint.
6365 * libsoup/soup-private.h (SoupMessagePrivate): make read_tag and
6366 write_tag pointers instead of guints.
6368 2003-06-02 Chris Toshok <toshok@ximian.com>
6370 * libsoup/soup-ssl.c: remove #include for soup-nss.h
6372 2003-06-02 Chris Toshok <toshok@ximian.com>
6374 * libsoup/Makefile.am (INCLUDES): remove NSS_CFLAGS.
6375 (libsoup_2_0_la_LIBADD): remove NSS_LIBS.
6376 (libsoup_2_0_la_SOURCES): remove soup-nss.[ch]
6378 2003-06-02 Chris Toshok <toshok@ximian.com>
6380 * configure.in: Bump version to 1.99.23.
6382 2003-05-30 Chris Toshok <toshok@ximian.com>
6384 * libsoup/soup-queue.c (soup_queue_error_cb): always force a
6385 reconnect when there's an error with ssl connection. This fixes
6386 #43387, but it runs the risk of sending requests multiple times to
6387 the exchange server, and it results in lots of shorter lived
6388 connections and more forking (in the ssl proxy case), depending on
6389 the length of the operation.
6391 2003-05-21 Dan Winship <danw@ximian.com>
6393 * configure.in: 1.99.22 (codename: French Onion Soup)
6395 2003-05-20 Dan Winship <danw@ximian.com>
6397 * libsoup/soup-message.c (soup_message_requeue): Clear the
6398 write_tag as well so we don't double-cancel it. #43395.
6400 * libsoup/soup-queue.c (soup_queue_error_cb): The connection might
6401 be destroyed by the end of the func, so we have to call
6402 soup_connection_set_used at the beginning.
6404 * libsoup/soup-openssl.c (soup_openssl_read, soup_openssl_write):
6405 Call g_set_error() so that we don't SEGV immediately after
6406 returning G_IO_STATUS_ERROR.
6408 2003-05-08 Joe Shaw <joe@ximian.com>
6410 * configure.in: Bump version to 1.99.21
6412 * libsoup/soup-queue.c (proxy_connect): If the proxy HTTPS
6413 tunnelling fails, the other message which shares our same
6414 connection will free it first, so set ours to NULL.
6416 2003-05-08 Dan Winship <danw@ximian.com>
6418 * libsoup/soup-auth.c (ntlm_auth): If the auth status is PENDING,
6419 return an NTLM request string. Otherwise return the "response"
6420 field (which should include the NTLM authenticate message)
6421 (ntlm_init): Don't bother setting "response" to the NTLM request
6422 string. Just leave it NULL in that case.
6424 * libsoup/soup-message.c (authorize_handler): Never try to reuse
6425 an NTLM auth returned from soup_auth_lookup. Only set the auth on
6426 the connection when it's SOUP_AUTH_STATUS_SUCCESSFUL. Otherwise,
6427 call soup_auth_set_context() on it just like for non-NTLM auth.
6428 The net effect of all of this is that now we record when a context
6429 needs NTLM auth just like with non-NTLM auth, so that that info
6430 gets preserved across connections.
6431 (soup_message_requeue): No longer need the hackery here to
6432 preserve the connection auth state.
6434 2003-05-07 Dan Winship <danw@ximian.com>
6436 * libsoup/soup-context.c (soup_connection_set_in_use): New, to
6437 toggle the connection's in_use flag, and set up the death watch
6438 when it's not in use.
6439 (connection_death): This is only hooked up when the connection is
6440 not in use now, so don't need to check that. Should fix the
6441 infinite connection_death loop.
6442 (soup_connection_is_new): Keep a distinct "new" flag rather than
6443 defining "new" as "has been released at least once".
6444 (soup_connection_set_used): Mark a connection no-longer new.
6445 (soup_context_connect_cb): Mark the connection as new. Don't set
6446 up the death watch since it's in_use.
6447 (try_existing_connections): Use soup_connection_set_in_use.
6448 (soup_connection_release): Likewise
6450 * libsoup/soup-message.c (requeue_read_finished): Call
6451 soup_connection_set_used so that the connection isn't still
6452 considered new when we send the message the second time.
6454 * libsoup/soup-queue.c (soup_queue_error_cb): Call
6455 soup_connection_set_used (assuming we don't close the connection)
6456 (soup_queue_read_done_cb): Likewise.
6458 * libsoup/soup-transfer.c (soup_transfer_read_cb): If we read
6459 nothing, call soup_transfer_read_error_cb rather than just
6460 cancelling, or else it will get cancelled again later.
6462 2003-05-07 Dan Winship <danw@ximian.com>
6464 * soup-2.0.pc.in (Libs): Don't put @OPENSSL_LIBS@ here; the
6465 library doesn't depend on them, only the proxy does. #42473
6467 2003-05-06 Dan Winship <danw@ximian.com>
6469 * src/libsoup/soup-message.c (global_handlers): Change the
6470 redirect handler to be a RESPONSE_ERROR_CLASS_HANDLER for
6471 SOUP_ERROR_CLASS_REDIRECT rather than a RESPONSE_HEADER_HANDLER
6472 for "Location" to get around the non-64-bit-clean union
6473 initialization pointed out by Jeremy Katz <katzj@redhat.com>.
6474 (redirect_handler): Update for that.
6476 2003-04-28 Dan Winship <danw@ximian.com>
6478 * configure.in: 1.99.20
6480 * libsoup/soup-transfer.c (soup_transfer_read_error_cb): Make sure
6481 we always call UNIGNORE_CANCEL. Might fix #41971
6483 2003-04-25 Dan Winship <danw@ximian.com>
6485 * libsoup/soup-queue.c (soup_queue_error_cb): if an old connection
6486 suddenly gets an io error while reading or writing, assume it's a
6487 timeout or something, close the connection, and requeue the
6490 2003-04-23 Dan Winship <danw@ximian.com>
6492 * libsoup/soup-message.c (soup_message_cleanup): Don't set up the
6493 soup-transfer callbacks to keep reading off the connection unless
6494 we're actually going to keep the connection around afterward.
6495 Otherwise we can just close it.
6497 * libsoup/soup-transfer.c: Re-kludge the awful IGNORE_CANCEL
6498 thingy so that it's possible to cancel a read from inside a
6499 callback so that the above change actually works instead of just
6502 2003-04-20 Rodney Dawes <dobey@ximian.com>
6504 * configure.in: Up version to 1.99.18
6505 * libsoup/Makefile.am: Line separator after GNUTLS_CFLAGS
6507 2003-04-11 Dan Winship <danw@ximian.com>
6509 * libsoup/soup-context.c (soup_connection_purge_idle): New
6510 function to close all idle connections. (Needed for #41117 or else
6511 there's no way to force-discard NTLM authentication.)
6513 * libsoup/soup-queue.c (soup_queue_shutdown): Use it
6515 2003-04-10 Joe Shaw <joe@ximian.com>
6517 * libsoup/soup-queue.c (proxy_https_connect):
6518 proxy_https_connect_cb() might not get called if connecting to the
6519 proxy fails, and it causes us to double-free the connection.
6520 Always set the message's connection to NULL before freeing it.
6522 2003-04-09 Dan Winship <danw@ximian.com>
6524 * configure.in: 1.99.17
6526 2003-04-07 Dan Winship <danw@ximian.com>
6528 * libsoup/soup-context.c (connection_death): Revert Joe's changes.
6529 We can't release the connection there because there may be
6530 SoupMessages still pointing to it. (Needs to be revisited.)
6532 2003-04-03 JP Rosevear <jpr@ximian.com>
6534 * libsoup/soup-ssl.c (soup_ssl_hup_waitpid): guard against EINTR
6535 error during waitpid
6537 * libsoup/soup-address.c: ditto
6539 2003-04-02 Joe Shaw <joe@ximian.com>
6541 * libsoup/soup-context.c (connection_death): Only drop the
6542 connection if we get an error condition on the channel. Fixes a
6545 2003-04-02 Joe Shaw <joe@ximian.com>
6547 * libsoup/soup-context.c (connection_death): Just call
6548 soup_connection_release() from here and return whether the
6549 connection is in use.
6551 2003-03-31 Ian Peters <itp@ximian.com>
6553 * libsoup/soup-gnutls.c (soup_gnutls_close): loop on gnutls_bye in
6554 case of EAGAIN or EINTR, since shutting down an SSL connection
6555 requires more than just closing a socket.
6557 2003-03-28 Dan Winship <danw@ximian.com>
6559 * libsoup/soup-message.c (soup_message_set_context): If the new
6560 context points to a different server from the old context, call
6561 soup_message_cleanup. Otherwise it tries to reuse the old
6564 2003-03-25 Joe Shaw <joe@ximian.com>
6566 * configure.in: Bump up to 1.99.16
6568 2003-03-24 Joe Shaw <joe@ximian.com>
6570 * soup-error.[ch]: Add SOUP_ERROR_SSL_FAILED which gives a
6571 slightly better error message on various SSL failures than the
6574 * soup-queue.c (soup_queue_error_cb): Throw the
6575 SOUP_ERROR_SSL_FAILED error when we fail an SSL handshake.
6577 2003-03-21 Joe Shaw <joe@ximian.com>
6579 * soup-server.c: Use non-deprecated g_main_loop_* calls
6581 (soup_server_unref): Don't unref the main loop if it's NULL.
6582 Fixes a glib warning.
6584 2003-03-18 Dan Winship <danw@ximian.com>
6586 * configure.in: comment out NSS checks. The NSS code doesn't work
6587 and there are no current plans to fix it.
6589 * README (Features): Mention GnuTLS, remove NSS and the rest of
6590 the "Planned Features" section.
6592 * MAINTAINERS: remove Alex
6594 * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Bump the
6595 timeout to 10 seconds (and get rid of the 3 tries) so we don't
6596 fail to connect just because the server is slow/far away.
6598 2003-03-17 Joe Shaw <joe@ximian.com>
6600 * configure.in: Bump up to 1.99.15.
6602 2003-03-12 Ian Peters <itp@ximian.com>
6604 * libsoup/soup-gnutls.c: because creating client credentials is
6605 expensive, keep the same one around as long as possible, only
6606 recreating it if the ssl_ca_file changes. Wrap
6607 gnutls_certificate_credentials in a refcounted struct to avoid
6608 freeing it while another established connection may potentially
6609 need it (say, to rehandshake).
6611 2003-03-11 Frank Belew <frb@ximian.com>
6613 * soup-2.0.pc.in: add ssl libs to defaults, since ssl doesn't
6616 2003-03-10 Joe Shaw <joe@ximian.com>
6618 * configure.in: Bump up to 1.99.14.
6620 * configure.in, libsoup/Makefile.am, libsoup/soup.gnutls.[ch],
6621 libsoup/soup-ssl.c: Add support for GnuTLS. Patch from Ian
6624 2003-03-07 Joe Shaw <joe@ximian.com>
6626 * configure.in: Bump up to 1.99.13.
6628 * libsoup/soup-context.c (soup_context_connect_cb): Add G_IO_IN to
6629 the list of conditions to watch. If the remote end hangs up the
6630 connection, we'll get a successful read of 0 bytes, not a HUP.
6631 The connection will have to be released by the point we check for
6632 it in connection_death().
6634 * libsoup/soup-queue.c (soup_queue_error_cb): Get rid of some
6635 (apparently) errant resetting of the read and write tags. I think
6636 this might have been causing some reentrancy and crashes.
6638 * libsoup/soup-socket.c (soup_socket_get_iochannel): Set the IO
6639 channel to NULL encoding and not buffered.
6641 * libsoup/soup-transfer.c (soup_transfer_read_cb): Remove some
6644 2003-02-28 Joe Shaw <joe@ximian.com>
6646 * configure.in: Bump up to 1.99.12.
6648 * libsoup/soup-transfer.c (soup_transfer_read_cb): We can get a
6649 header_len of 0 and a total_read of 0 in the case of a SIGPIPE; in
6650 this case we probably don't want to call the error callback, we
6651 just want to act like our transfer was cancelled.
6653 2003-02-27 Joe Shaw <joe@ximian.com>
6655 Try to apply some order to the iochannel refcounting...
6657 * configure.in: Bump up to 1.99.11.
6659 * libsoup/soup-context.c (soup_connection_get_iochannel): The
6660 connections needs to own a reference to the iochannel! If we're
6661 using HTTPS, release the ref we get from soup_socket_get_iochannel
6662 and replace it with the ref we get from soup_ssl_get_iochannel().
6663 Then, always ref the channel that we return (ugh, but that's the
6665 (connection_free): Release the connection's ref to the iochannel.
6667 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Ref the
6668 iochannel. The reference we pass back will be owned by the
6670 (soup_ssl_hup_waitpid): Release our ref.
6672 2003-02-27 Joe Shaw <joe@ximian.com>
6674 * configure.in: Bump up to 1.99.10.
6676 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Ref the
6677 iochannel, return to the status quo. Sigh.
6679 2003-02-26 Joe Shaw <joe@ximian.com>
6681 * configure.in: Bump up to 1.99.9.
6683 * libsoup/soup-ssl.c (soup_ssl_hup_waitpid): Comment out the unref,
6684 it's causing problems with HTTPS and proxies; the iochannel
6685 refcounting is waaaaaay horked.
6687 2003-02-26 Frank Belew <frb@ximian.com>
6689 * libsoup/Makefile.am: added workaround to link ssl-proxy statically
6691 2003-02-11 Joe Shaw <joe@ximian.com>
6693 * configure.in: Bump up to 1.99.8 for snaps.
6695 * libsoup/soup-address.c (soup_gethostbyname): Fix this for Solaris.
6696 It returns the address to the resulting hostent or NULL on failure,
6697 unlike Linux which returns an error code.
6699 2003-02-11 Joe Shaw <joe@ximian.com>
6701 * configure.in: Bump up to 1.99.7 for snaps.
6703 * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Print out
6704 the error string from OpenSSL if we can't establish a connection.
6706 2003-02-04 Joe Shaw <joe@ximian.com>
6708 * configure.in: Bump up to 1.99.6 for snaps.
6710 * libsoup/soup-server.c (destroy_message): We already assigned
6711 chan, so don't reassign it, and unref it in all cases.
6712 (issue_bad_request): Always unref after a call to
6713 soup_socket_get_iochannel(), because it refs it.
6714 (conn_accept): Fix some funky GIOChannel reffing here.
6716 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Don't call
6717 g_io_channel_ref() on the socket. This is the exact opposite of
6718 what we want to do. Create a temporary structure containing the
6719 parent pid and the old socket and unref the socket when our
6720 callback is called. This should fix GIOChannels being leaked on
6723 * libsoup/soup-ssl-proxy.c: Always close the GIOChannels after the
6726 2003-01-22 Joe Shaw <joe@ximian.com>
6728 * configure.in: Bump up to 1.99.5 for the snaps.
6730 * libsoup/soup-address.c (soup_address_new): If we found the
6731 address in our hash, we need to return NULL or else Soup will
6732 think we're doing an async lookup and do some cancellation on
6733 us. Besides, we were returning the wrong type anyway and it
6734 was crashing things.
6736 2003-01-17 Joe Shaw <joe@ximian.com>
6738 * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): It's not
6739 uncommon for us to get a G_IO_ERROR_AGAIN when trying to write
6740 out, so keep trying until we succeed.
6742 2003-01-10 Joe Shaw <joe@ximian.com>
6744 * libsoup/soup-openssl.c (verify_cb): Load some X509 and SSL error
6745 strings and print out the error when the cert can't verify.
6747 2003-01-09 Dan Winship <danw@ximian.com>
6749 * libsoup/soup-address.c (soup_gethostbyname): Fix a memcpy
6750 overrun noticed by valgrind
6752 2002-12-20 Joe Shaw <joe@ximian.com>
6754 * libsoup/soup-server.c (soup_server_new_with_host): Added.
6755 Starts a server only on the interface specified, instead of all
6758 2002-12-16 Jeremy Katz <katzj@redhat.com>
6760 * configure.in: use $libdir instead of /usr/lib when looking for
6763 2002-12-11 Joe Shaw <joe@ximian.com>
6765 * libsoup/soup-queue.c (proxy_https_connect_cb): I am an idiot.
6766 Don't set a variable to NULL and then immediately try to
6769 2002-12-09 Joe Shaw <joe@ximian.com>
6771 * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Put a
6772 timeout on the select()s when we get SSL_ERROR_WANT_READ/WRITE so
6773 we don't hang forever if we don't get more data.
6775 * libsoup/soup-ssl-proxy.c (main): Don't set our fds to blocking
6776 or else we'll hang forever in SSL_connect() if the other side
6779 * libsoup/soup-queue.c (proxy_https_connect_cb): We never want to
6780 release the connection on message free, even if the connection was
6783 2002-12-03 Joe Shaw <joe@ximian.com>
6785 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Call
6786 g_io_channel_set_close_on_unref() on the second half of the socket
6787 pair so we don't leak file descriptors.
6789 2002-12-03 Frank Belew <frb@ximian.com>
6791 * libsoup/soup-address.c: add signal.h to the list of headers to
6794 2002-11-25 Joe Shaw <joe@ximian.com>
6796 * Makefile.am: Build the tests directory again
6798 2002-11-21 Rodney Dawes <dobey@ximian.com>
6800 * configure.in: Don't require autoconf 2.5x, needs to work with 2.13
6802 2002-11-20 Michael Meeks <michael@ximian.com>
6804 * configure.in: require autoconf 2.52 not 2.53.
6806 2002-11-18 Dan Winship <danw@ximian.com>
6808 * libsoup/soup-address.c (soup_address_hash): Don't use s6_addr32
6809 since it's apparently non-portable. Use s6_addr instead.
6810 (soup_gethostbyaddr): fix a sometimes-uninitialized variable.
6812 * libsoup/soup-error.c: Fix spelling of
6813 SOUP_ERROR_MOVED_PERMANENTLY and its description.
6815 * libsoup/soup-message.c (soup_message_get_request_header, etc):
6816 Remove long-deprecated API.
6818 * libsoup/soup-socket.c (soup_socket_connect): remove unused
6821 * libsoup/soup-openssl.c (soup_openssl_read): Use gsize.
6822 * libsoup/soup-server.c (cgi_read): Likewise
6823 * libsoup/soup-socks.c (soup_socks_write, soup_socks_read):
6825 * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): Likewise.
6826 * libsoup/soup-transfer.c (soup_transfer_read_cb,
6827 soup_transfer_write_cb): Likewise.
6829 * tests/timeserver.c: Add "-6" to listen on the IPv6 local address
6830 instead of IPv4. (Tested on OS X.)
6832 2002-11-15 Dan Winship <danw@ximian.com>
6834 * libsoup/*: Change old Helix Code refs to Ximian (and update
6837 2002-11-15 Frank Belew <frb@ximian.com>
6839 * tests/Makefile.am: uncomment lines to make timeserver build
6842 2002-11-14 Joe Shaw <joe@ximian.com>
6844 * libsoup/soup-address.c (soup_address_new): When we get an
6845 address from the hash, call our address lookup callback or else
6846 the connection will hang.
6848 2002-11-13 Dan Winship <danw@ximian.com>
6850 * tests/timeserver.c: Oops, commit this.
6852 * tests/Makefile.am (noinst_PROGRAMS): reenable timeserver.
6854 2002-11-13 Joe Shaw <joe@ximian.com>
6856 * libsoup/Makefile.am: Replace the BINDIR define with LIBEXECDIR.
6857 (install-exec-hook): Install libsoup-ssl-proxy into libexecdir
6860 * libsoup/soup-openssl.c (soup_openssl_close): Call SSL_shutdown()
6861 to properly shut down the SSL connection before closing the
6864 * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): Close the
6865 iochannels before quitting the main loop.
6867 * tests/Makefile.am: disable building timeserver, the source file
6870 2002-11-12 Dan Winship <danw@ximian.com>
6872 * configure.in: Check for IPv6 support in networking headers.
6874 * libsoup/soup-address.c: Make the internal structure of
6875 SoupAddress entirely private, and make SoupAddress be more like a
6876 hostent and less like a sockaddr. (Ie, make it not have a port
6877 associated with it.) Document undocumented functions. Add
6878 completely-untested support for IPv6.
6879 (soup_address_new_from_sockaddr): New, to parse a sockaddr into a
6880 SoupAddress and a port.
6881 (soup_address_ipv4_any, soup_address_ipv6_any): Return static
6882 addresses corresponding to the IPv6 and IPv6 "any" addresses.
6883 (soup_address_get_canonical_name): Use inet_ntop/inet_ntoa.
6884 (soup_address_make_sockaddr): Now constructs a new sockaddr, which
6885 may be a sockaddr_in or sockaddr_in6.
6886 (soup_address_gethostname, soup_address_gethostaddr): Remove
6887 these. They aren't reliable, especially on multihomed hosts.
6888 (soup_gethostbyname, soup_gethostbyaddr): support IPv6
6889 (soup_address_new): Keep pending lookups in a separate hash table
6890 from completed lookups. Fix a bug when canceling a lookup when
6891 there was more one outstanding request for it.
6892 (soup_address_lookup_in_cache): Removed.
6894 * libsoup/soup-socket.c: Add a port field to SoupSocket (since
6895 it's not in SoupAddress any more).
6896 (soup_socket_connect): Simplify this. Don't use
6897 soup_address_lookup_in_cache, just call soup_address_new, since we
6898 already know the code can deal with the callback being invoked
6900 (soup_socket_new_sync, soup_socket_new): Take a port argument.
6901 (soup_socket_server_new): Take a SoupAddress to use as the local
6902 address to bind to. This lets the caller choose between the IPv4
6903 and IPv6 "any" addresses, and also lets you bind to a single
6904 interface of a multi-homed machine.
6905 (soup_socket_server_accept, soup_socket_server_try_accept): Merge
6908 * libsoup/soup-server.c (soup_server_new): Pass
6909 soup_address_ipv4_any() to soup_socket_server_new().
6911 * libsoup/soup-socks.c (soup_connect_socks_proxy,
6912 soup_socks_write): Fix up for the API changes, but it won't work
6915 * tests/timeserver.c: Another really simple test, for the server
6918 * tests/Makefile.am: build timeserver
6920 2002-11-11 Dan Winship <danw@ximian.com>
6922 * libsoup/soup-address.c: Move the SoupAddress code from
6923 soup-socket.c and soup-socket-unix.c to here.
6925 * libsoup/soup-socket.c: Move the remaining code from
6926 soup-socket-unix.c here.
6928 * libsoup/soup-socket-unix.c: Gone
6930 * tests/get.c: really really trivial test program
6932 * configure.in (AC_OUTPUT):
6933 * Makefile.am (SUBDIRS): add tests/
6935 2002-11-05 Dan Winship <danw@ximian.com>
6937 * Split libsoup out of soup. ChangeLog.old contains the original
6940 * Makefile.am, etc: Fix things up to work with the new directory
6941 layout. Disable docs until we fix them.
6943 * autogen.sh: Use gnome-autogen.sh
6945 * configure.in: Require autoconf 2.53. Remove stuff that was only
6946 needed for httpd or wsdl code. Remove glib1 support. Bump version
6949 * libsoup/Makefile.am: Rename library to libsoup-2.0, put includes
6950 in ${includedir}/soup-2.0
6952 * libsoup/*: Merge soup-0-7 back onto the trunk. Remove
6953 SOAP-specific stuff, Windows support, and other things that
6954 weren't being maintained.
6956 * soup-config.in, soupConf.sh: Kill these. We only support