1 2008-02-03 Benjamin Otte <otte@gnome.org>
3 * libsoup/soup-socket.c: update documentation to new API
5 2008-02-02 Dan Winship <danw@gnome.org>
7 * libsoup/soup-session.c: fix default connections-per-host again;
8 it was defined in two places. Add SOUP_SESSION_USER_AGENT property
9 (setup_message): set the User-Agent request header on the request
11 * libsoup/soup-server.c: add SOUP_SERVER_SERVER_HEADER property
12 (start_request): set the Server response header on the request.
15 * tests/simple-httpd.c: set the User-Agent/Server headers
17 2008-02-02 Dan Winship <danw@gnome.org>
19 * libsoup/soup-headers.c (soup_headers_parse_request): if the
20 request headers contain an unrecognized Expect: header, return
21 SOUP_STATUS_EXPECTATION_FAILED. Also, process Connection headers
22 in HTTP/1.0 messages as required by 2616 14.10.
23 (soup_headers_parse_response): Likewise handle Connection headers
26 * tests/header-parsing.c: test those things
28 2008-02-02 Dan Winship <danw@gnome.org>
30 * libsoup/soup-session.c (redirect_handler): Misc fixes: don't
31 redirect on "300 Multiple Choices", "304 Not Modified", "305 Use
32 Proxy", or any unrecognized status code. Don't redirect unsafe
33 methods on 301, 302, or 307. Redirect POST to GET on 303.
35 * tests/redirect-test.c: test of redirection handling behavior.
37 2008-02-02 Dan Winship <danw@gnome.org>
39 * libsoup/soup-method.h (SOUP_METHOD_GET, etc): Fix these so that
40 direct comparisons against them actually *are* faster than doing
41 strcmp, as the docs claim.
43 * libsoup/soup-uri.h (SOUP_URI_SCHEME_HTTP,
44 SOUP_URI_SCHEME_HTTPS): likewise
46 2008-02-01 Dan Winship <danw@gnome.org>
48 * libsoup/soup-address.c: Use GObject properties.
49 (soup_address_new, soup_address_new_from_sockaddr)
50 (soup_address_new_any): Make these just wrappers around
53 * libsoup/soup-message-body.c (soup_message_body_get_type):
54 * libsoup/soup-message-headers.c (soup_message_headers_get_type):
55 * libsoup/soup-server.c (soup_client_context_get_type):
56 Register these as boxed types, for language bindings.
58 * libsoup/soup-date.c (soup_date_get_type):
59 * libsoup/soup-message-body.c (soup_buffer_get_type):
60 * libsoup/soup-value-utils.c (soup_byte_array_get_type):
61 * libsoup/soup-uri.c (soup_uri_get_type): Upgrade to the latest
62 yummiest type-registering idiom.
64 2008-02-01 Dan Winship <danw@gnome.org>
66 * libsoup/soup-connection.c (soup_connection_disconnect):
67 Reorganize this; emitting DISCONNECTED may cause the session to
68 unref the connection, causing it to be destroyed, so do everything
69 else before that. #437835 and dups. Also, call
70 soup_message_cleanup_response() when requeuing an IO_ERROR-ed
71 message, so soup_session_send_message() will requeue it rather
72 than treating it as failed.
74 * docs/reference/Makefile.am (TARGET_DIR): override this to
75 include the API version, to fix the last remaining parallel
76 install issue between libsoup 2.2 and 2.4. #512810, Daniel
79 * tests/query-test.c (do_test): don't use "stdout" as a variable
80 name; it's allowed to be a macro (and it is one on Solaris).
81 #513602, patch from Jeff Cai.
83 2008-01-31 Dan Winship <danw@gnome.org>
85 * libsoup/soup-date.c (soup_date_to_time_t): new
87 * libsoup/soup-form.c (soup_form_decode): Remove "_urlencoded"
88 from name. (And add back-compat #define.)
89 (soup_form_encode): New, takes varargs parameters for each form
91 (soup_form_encode_hash, soup_form_encode_datalist): renamed, with
93 (soup_form_request_new, soup_form_request_new_from_hash)
94 (soup_form_request_new_from_datalist): New methods to construct a
95 GET or POST message with form data.
97 * libsoup/soup-uri.c (soup_uri_set_query_from_fields): New, takes
98 varargs like soup_form_encode().
100 * libsoup/soup-value-utils.c (soup_value_hash_new_with_vals)
101 (soup_value_hash_insert_vals, soup_value_hash_lookup_vals): New
102 routines to work with multiple value hash values at once.
103 (soup_value_array_new): tiny wrapper, for naming consistency
104 (soup_value_array_new_with_vals, soup_value_array_append_vals):
105 New routines to work with multiple value array values at once.
107 2008-01-28 Dan Winship <danw@gnome.org>
109 * configure.in: post-release bump to 2.3.1
111 2008-01-28 Dan Winship <danw@gnome.org>
113 * configure.in: Bump version to 2.3.0.1
117 * docs/reference/Makefile.am (content_files): include
120 2008-01-28 Dan Winship <danw@gnome.org>
122 * libsoup/soup-message.c (soup_message_set_auth)
123 (soup_message_set_proxy_auth): Use soup_message_headers_replace(),
124 not soup_message_headers_append(), since only a single
125 Authorization/Proxy-Authorization header is allowed. #512517.
127 * libsoup/soup-auth-manager-ntlm.c (ntlm_request_started): Don't
128 set an NTLM Authorization header if the message already has a
131 * tests/ntlm-test.c: Add some Basic auth and mixed NTLM/Basic auth
134 2008-01-28 Wouter Bolsterlee <wbolster@svn.gnome.org>
136 * docs/reference/libsoup-docs.sgml:
138 Changed section titles so that they actually show
139 something useful in DevHelp.
141 2008-01-27 Dan Winship <danw@gnome.org>
143 * libsoup/soup-dns.c (resolver_thread): fix mutex use to avoid a
146 * libsoup/soup-xmlrpc.c (soup_xmlrpc_build_faultv):
147 (soup_xmlrpc_set_response, soup_xmlrpc_set_fault):
148 (soup_xmlrpc_parse_method_call): Fix misc server-side stuff
149 (soup_xmlrpc_parse_method_response): Fix fault parsing
151 * libsoup/soup-xmlrpc.h (SoupXMLRPCFault): add semi-standard fault
153 http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php
155 * tests/xmlrpc-server.php (sum): return a <fault> if the arguments
156 are wrong (so that xmlrpc-test can test that case).
157 (dateChange): change to take two parameters, a date and a struct,
158 instead of putting the date in the struct, since we weren't
159 previously testing multiple parameter handling.
161 * tests/xmlrpc-test.c (main): Add a -u flag to specify an
163 (do_xmlrpc): Remove level 3 debug output, which is now redundant
164 with the SoupLogger stuff.
165 (test_dateChange): update for dateChange prototype change
166 (test_fault_malformed, test_fault_method, test_fault_args): test
169 * tests/xmlrpc-server-test.c: Test the server-side XML-RPC API (by
170 implementing the same methods as xmlrpc-server.php and then
173 2008-01-27 Dan Winship <danw@gnome.org>
175 * libsoup/soup-headers.c (soup_header_parse_quality_list): fix to
176 not sometimes read beyond the end of the string.
178 * libsoup/soup-message-body.c (soup_message_body_append): When
179 appending a 0-length SOUP_MEMORY_TAKE buffer, we need to free the
180 passed-in buffer rather than just ignoring it.
182 * libsoup/soup-message-headers.c (soup_message_headers_free): Fix
183 leak introduced by patch for 511980.
185 * libsoup/soup-server.c (got_headers): fix leak when decoding path
187 * libsoup/soup-session.c (finalize): free ntlm_manager
189 * tests/libsoup.supp: update for libsoup 2.4, glib 2.14, etc
191 * tests/header-parsing.c (do_qvalue_tests):
192 * tests/uri-parsing.c (main): more cleanup
194 2008-01-27 Dan Winship <danw@gnome.org>
196 * libsoup/soup-logger.c (soup_logger_attach): Fix session ids by
197 using weak refs for the logger cleanup rather than trying to use
198 the same qdata for two different things.
199 (print_request, print_response): use full type names in the
200 Soup-Debug line, since SoupSessionSync and SoupSessionAsync get
203 2008-01-27 Dan Winship <danw@gnome.org>
205 * libsoup/soup-session-async.c (final_finished): Don't run the
206 queue again if the callback destroyed the session. #511868, Stef
209 2008-01-25 Srinivasa Ragavan <sragavan@novell.com>
211 ** Fix for bug #511980
213 * libsoup/soup-message-headers.c: (soup_message_headers_clear):
214 Instead of destroying the hashtable, just remove the contents of the
217 2008-01-23 Tor Lillqvist <tml@novell.com>
219 * configure.in: Allow autogening even without AM_PATH_LIBGCRYPT
222 * libsoup/soup-date.c (soup_date_new_from_time_t): Correct use of
225 * libsoup/soup-headers.c (soup_headers_parse_status_line): Return
226 FALSE if neither HTTP nor ICY. Avoids crash in
227 tests/header-parsing.
229 * libsoup/soup-socket.c: On Windows SHUT_RDWR is called SD_BOTH.
230 (set_nonblocking): Fix typo.
232 * tests/continue-test.c: Seems to build fine without <pthread.h>,
235 2008-01-18 Dan Winship <danw@gnome.org>
237 * tests/server-auth-test.c: test SOUP_AUTH_DOMAIN_REMOVE_PATH
239 2008-01-18 Dan Winship <danw@gnome.org>
241 * configure.in: require glib 2.15.3, not 2.15.0, since
242 AM_PATH_GLIB_2_0 didn't know about gio until post-2.15.2. Pointed
243 out by Matthew Barnes, #510216.
245 2008-01-18 Dan Winship <danw@gnome.org>
247 * libsoup/soup-auth-domain.c
248 (soup_auth_domain_set_generic_auth_callback):
249 (soup_auth_domain_check_password): add a new generic auth callback
250 that can be used with any subclass to do cleartext password
251 checking against messages. Suggested by Mathias Hasselmann.
253 * libsoup/soup-auth-domain-basic.c: Implement generic auth
255 * libsoup/soup-auth-domain-digest.c: Implement generic auth.
256 (soup_auth_domain_digest_evil_check_password): Gone, use the
259 2008-01-17 Dan Winship <danw@gnome.org>
261 * libsoup/soup-auth-digest.c (soup_auth_digest_compute_hex_urp)
262 (soup_auth_digest_compute_hex_a1)
263 (soup_auth_digest_compute_response): cast the second arg to
264 g_checksum_update to (guchar *) to avoid warnings
266 2008-01-16 Dan Winship <danw@gnome.org>
268 * libsoup/soup-headers.c (soup_headers_parse_status_line): Deal
269 with Shoutcast servers, which return "ICY 200 OK", but are
270 otherwise straight HTTP/1.0. #502325, Wouter Cloetens.
272 * tests/header-parsing.c (resptests): add a test for it
274 2008-01-16 Dan Winship <danw@gnome.org>
276 * libsoup/soup-auth-manager.c (authorize_handler, etc): Allow the
277 session authenticate signal to be handled asynchronously, by
278 pausing the message and then authenticating the auth later.
279 (auth_type_compare_func): make this work. oops.
280 (extract_challenge): plug leak
282 * libsoup/soup-auth-manager-ntlm.c: Make this work async too.
284 * libsoup/soup-headers.c (soup_header_parse_list):
285 (soup_header_parse_param_list): plug leaks
287 * tests/auth-test.c (do_async_auth_test): test async auth
289 * docs/reference/client-howto.xml (Handling Authentication):
292 2008-01-16 Dan Winship <danw@gnome.org>
294 * configure.in: Bomb out if glib 2.15.0 isn't found.
295 (AM_PATH_GLIB_2_0 doesn't do this itself.)
297 2008-01-15 Dan Winship <danw@gnome.org>
299 * libsoup/soup-auth-manager-ntlm.c: Replaces SoupConnectionNTLM;
300 now works as a SoupSession::request_started watcher.
302 * libsoup/soup-connection.c: remove the no-longer-needed
303 "authenticate" signal
305 * libsoup/soup-session.c: Use a SoupAuthManagerNTLM if USE_NTLM is
306 set. Remove connection-authenticate-signal references.
308 2008-01-15 Dan Winship <danw@gnome.org>
310 * Merge libsoup-2.4 branch to trunk
312 2008-01-15 Dan Winship <danw@gnome.org>
314 * libsoup/soup-dns.c (resolve_status): Fix the logic here
316 2008-01-15 Dan Winship <danw@gnome.org>
318 * docs/reference/porting-2.2-2.4.xml: add a few more updates
320 2008-01-15 Dan Winship <danw@gnome.org>
322 * libsoup/soup-auth-digest.c: Use GChecksum for MD5
324 * libsoup/soup-md5-utils.[ch]: gone
326 2008-01-15 Dan Winship <danw@gnome.org>
328 * libsoup/soup-server.c (soup_server_run_async):
329 (soup_server_quit): Don't ref/unref the server here. It doesn't
330 match the way other things work. #494128, Mathias Hasselmann.
332 2008-01-14 Dan Winship <danw@gnome.org>
334 * libsoup/soup-address.h:
335 * libsoup/soup-auth-domain-basic.h:
336 * libsoup/soup-auth-domain-digest.h:
337 * libsoup/soup-auth-domain.h:
338 * libsoup/soup-auth.h:
339 * libsoup/soup-logger.h:
340 * libsoup/soup-message.h:
341 * libsoup/soup-server.h:
342 * libsoup/soup-session-async.h:
343 * libsoup/soup-session-sync.h:
344 * libsoup/soup-session.h:
345 * libsoup/soup-socket.h: Add padding for future expansion to class
348 2008-01-14 Dan Winship <danw@gnome.org>
350 * libsoup/soup-uri.c: Add more documentation.
351 (soup_uri_is_https): gone, replaced by SOUP_URI_SCHEME_HTTP /
352 SOUP_URI_SCHEME_HTTPS
353 (soup_uri_new): allow passing NULL to get back an "empty" SoupURI.
354 (soup_uri_to_string): rename just_path to just_path_and_query, to
355 avoid fooling people.
356 (soup_uri_decode, soup_uri_normalize): Change these to return the
357 decoded/normalized string rather than modifying it in place.
358 (soup_uri_set_scheme, etc): provide setters for SoupURI parts.
359 (soup_uri_set_query_from_form): set uri->query via
360 soup_form_encode_urlencoded().
362 2008-01-14 Dan Winship <danw@gnome.org>
364 * configure.in: require glib 2.15.0, and gio
366 * libsoup/soup-dns.c (soup_dns_lookup_resolve)
367 (soup_dns_lookup_resolve_async): Add GCancellables, and support
368 cancellation of DNS lookups.
369 (resolve_address, resolve_name): If we get a DNS failure (eg,
370 because we're disconnected from the network), don't cache that
371 result, just try again next time someone asks. [#508593]
373 * libsoup/soup-address.c (soup_address_resolve_async)
374 (soup_address_resolve_sync): Add GCancellables, pass them to
377 * libsoup/soup-socket.c (soup_socket_connect_async)
378 (soup_socket_connect_sync): Add GCancellables and implement
380 (soup_socket_start_ssl, soup_socket_start_proxy_ssl)
381 (soup_socket_read, soup_socket_read_until, soup_socket_write): add
382 GCancellables, though these routines don't actually implement
384 (soup_socket_disconnect): Don't close() the socket if someone is
385 doing I/O on it, as that creates a race condition. (The fd number
386 might be quickly recycled.) Instead, keep the socket open but
387 dead, via shutdown().
389 2008-01-14 Benjamin Otte <otte@gnome.org>
391 * libsoup/soup-socket.c: (soup_socket_class_init): clarify docs for
392 new-connection signal.
394 2008-01-14 Dan Winship <danw@gnome.org>
396 * tests/test-utils.c: renamed from apache-wrappers and expanded.
397 (test_init): do option parsing and general setup
398 (test_cleanup): print error count and do cleanup
399 (debug_printf): define here rather than in each test, and rename
400 from dprintf [#501631]
401 (soup_test_server_new): create a SoupServer, optionally in its own
402 thread, and clean it up when exiting.
403 (soup_test_session_new): create a SoupSession, optionally with
404 an attached SoupLogger (if requested via command line)
406 * tests/*.c: use test-utils
408 2008-01-13 Dan Winship <danw@gnome.org>
410 * libsoup/soup-logger.c: New HTTP debug logging object. (Based on
411 E2K_DEBUG and its clones.)
413 * libsoup/soup-message.c (soup_message_class_init)
414 (soup_message_add_header_handler)
415 (soup_message_add_status_code_handler): Change things around a
416 little; remove the "requeuing or cancelling the message stops
417 signal emission" rule, and instead make that be a feature of just
418 the header and status code handlers. (Makes the basic signal
419 handlers behave more predictably.)
421 2008-01-11 Dan Winship <danw@gnome.org>
423 * libsoup/soup-auth-domain.c (soup_auth_domain_set_filter):
424 * libsoup/soup-auth-domain-basic.c
425 (soup_auth_domain_basic_set_auth_callback):
426 * libsoup/soup-auth-domain-digest.c
427 (soup_auth_domain_digest_set_auth_callback):
428 * libsoup/soup-message.c (soup_message_cleanup_response)
429 (soup_message_set_flags, soup_message_set_http_version)
430 (soup_message_set_uri, soup_message_set_status)
431 (soup_message_set_status_full):
432 * libsoup/soup-message-client-io.c (parse_response_headers):
433 * libsoup/soup-message-server-io.c (parse_request_headers):
434 Call g_object_notify() when changing properties.
436 * libsoup/soup-session.c (soup_session_class_init): bump the
437 default value of SOUP_SESSION_MAX_CONNS_PER_HOST down to 2, per
440 * libsoup/soup-message-body.c (soup_buffer_copy): When copying a
441 TEMPORARY buffer, keep a reference to the copy, so that a second
442 copy will get that same buffer, rather than actually copying it
445 * libsoup/soup-types.h: remove SoupMessageFilter, which doesn't
448 2008-01-07 Dan Winship <danw@gnome.org>
450 * libsoup/soup-session.c (soup_session_class_init): Change
451 request_started signal to have a SoupSocket as its last parameter.
453 * libsoup/soup-server.c: Fix request_* signals to all be (server,
454 msg, client) rather than (server, client, msg).
456 2008-01-07 Dan Winship <danw@gnome.org>
458 * docs/reference/porting-2.2-2.4.xml: Notes on porting from 2.2 to
461 2008-01-07 Dan Winship <danw@gnome.org>
463 * libsoup/*.c: Move gtk-doc stuff from docs/reference/tmpl/ to the
464 C files themselves. Some updates.
466 * docs/reference/Makefile.am: fix (kludge?) this up to not require
469 * docs/reference/client-howto.xml:
470 * docs/reference/server-howto.xml: update
472 2008-01-06 Dan Winship <danw@gnome.org>
474 * libsoup/soup-soap-message.c:
475 * libsoup/soup-soap-response.c: For the second time, remove SOAP
476 support from libsoup... These APIs are not really all that helpful
477 in the grand scheme of SOAPiness, and are only used by the
478 Evolution GroupWise backend, which can just import this code and
479 integrate it better there.
481 * libsoup/soup-misc.c (soup_xml_real_node):
482 * libsoup/soup-xmlrpc.c: Move soup_xml_real_node out of soup-misc
483 to soup-xmlrpc, and make it private. libxml is no longer exposed
486 2008-01-06 Dan Winship <danw@gnome.org>
488 * libsoup/soup-date.c (soup_date_new_from_now): new method to
489 generate a date relative to now.
490 (soup_date_new, etc): document SoupDate methods
492 * libsoup/soup-server.c (got_headers): set Date header, as
495 2008-01-06 Dan Winship <danw@gnome.org>
497 * libsoup/soup-server.c (got_headers): if raw_paths isn't set,
498 decode the request's uri->path before doing anything else
499 (soup_server_class_init): add "raw-paths" property, to tell
500 SoupServer to NOT decode the Request-URI path.
502 * libsoup/soup-auth-domain.c (soup_auth_domain_covers): Revert
503 earlier path-decoding change; that happens at the SoupServer level
506 2008-01-06 Dan Winship <danw@gnome.org>
508 * libsoup/soup-message-body.c (soup_buffer_get_type): Register
509 SoupBuffer as a boxed type.
511 * libsoup/soup-message.c (soup_message_class_init): Use
512 SOUP_TYPE_BUFFER in got_chunk signal definition
514 * libsoup/soup-server.c (soup_client_context_get_type): Register
515 SoupClientContext as a pointer type
516 (soup_server_class_init): use SOUP_TYPE_CLIENT_CONTEXT in signal
519 * libsoup/soup-marshal.list: clean this up
521 2008-01-06 Dan Winship <danw@gnome.org>
523 * libsoup/soup-server.c (SoupClientContext): Make this opaque.
524 (soup_client_context_get_socket)
525 (soup_client_context_get_auth_domain)
526 (soup_client_context_get_auth_user): New accessors
527 (soup_server_class_init): Make the signals take a
528 SoupClientContext rather than a SoupSocket.
529 (start_request, check_auth, call_handler, request_finished): Clean
530 these up by using a SoupClientContext to communicate between them.
531 (soup_server_add_handler): tweak the argument order to match the
532 gtk standard (callback, user_data, destroynotify).
534 2008-01-06 Dan Winship <danw@gnome.org>
536 * libsoup/soup-address.c: remove the "dns_result" signal, which
537 was just an implementation detail of soup_address_resolve_async().
539 2008-01-06 Dan Winship <danw@gnome.org>
541 * libsoup/*.c: misc documentation updates/gtk-doc fixes
543 * libsoup/soup-server.c: finally start documenting this properly.
545 * libsoup/soup-status.h (SoupStatusClass): kill this, since
546 soup_message_add_status_class_handler() is gone now.
548 * libsoup/soup-status.c (soup_status_get_phrase): Update docs to
549 explain that you probably don't want to use this.
551 * libsoup/soup-misc.h (SOUP_SSL_ERROR, SoupSSLError): Move these
552 here, since soup-ssl.h isn't installed.
554 * docs/references: start updating this...
556 2008-01-04 Dan Winship <danw@gnome.org>
558 * libsoup/soup-message-body.c (soup_buffer_new)
559 (soup_message_body_append): Reorder the arguments to match
560 soup_message_set_request/response, so it's not confusing.
562 * libsoup/soup-message.c (wrote_chunk): remove the "chunk" arg
563 from the signal, as it turns out to be *in*convenient, since most
564 callers use this signal to mean "need another chunk", so they want
565 it to have the same prototype as "wrote_headers", which means
568 2008-01-04 Dan Winship <danw@gnome.org>
570 * libsoup/soup-auth-domain.c: add documentation
571 (soup_auth_domain_set_filter): take a GDestroyNotify, for better
574 * libsoup/soup-auth-domain-basic.c:
575 * libsoup/soup-auth-domain-digest.c: Add documentation. Replace
576 authentication signals with more-easily-bindable authentication
577 callbacks (with GDestroyNotifys).
578 (soup_auth_domain_digest_evil_check_password): Add this for the
579 benefit of code that depends on being able to do the equivalent
580 of the old soup_server_auth_check_passwd().
582 2008-01-02 Dan Winship <danw@gnome.org>
584 * libsoup/soup-message-body.h (SoupMessageBody): add data and
585 length parameters like SoupBuffer, to make this easier for callers
588 * libsoup/soup-message-body.c (soup_message_body_append)
589 (soup_message_body_append_buffer)
590 (soup_message_body_truncate): Update body->length
591 (soup_message_body_flatten): Fill in body->data (and NUL-terminate
592 it as an added bonus).
594 * libsoup/soup-message.c (got_body): flatten the newly-gotten
596 (soup_message_get_request, soup_message_get_response): gone
598 * libsoup/soup-message-client-io.c (get_request_headers):
599 * libsoup/soup-message-server-io.c (get_response_headers):
600 * libsoup/soup-soap-message.c (soup_soap_message_parse_response):
601 * tests/*.c: simplify
603 2008-01-02 Dan Winship <danw@gnome.org>
605 * libsoup/Makefile.am (soup_headers): oops, move soup-auth.h here
607 2008-01-02 Dan Winship <danw@gnome.org>
609 * libsoup/soup-form.c: new HTML-form-related methods (just URI
610 decoding/encoding at the moment).
612 * libsoup/soup-server.h (SoupServerCallback): change the prototype
613 to include the decoded path and query rather than the undecoded
616 * libsoup/soup-server.c (call_handler): %-decode the URI path
617 before looking up a handler. Decode query if available. Pass path
618 and query to the callback.
620 * libsoup/soup-auth-domain.c (soup_auth_domain_covers): fix this
621 to %-decode the URI path before testing it
623 * libsoup/soup-message-body.c (soup_message_body_append): allow
626 * tests/query-test.c: URI query parsing test
628 2008-01-02 Dan Winship <danw@gnome.org>
630 * libsoup/soup-uri.c:
631 * libsoup/soup-uri.h: Change all the "const SoupURI *" to just
632 "SoupURI *", since the const is just there to be annoying.
636 2008-01-02 Dan Winship <danw@gnome.org>
638 * libsoup/soup-message-body.c (soup_message_body_get_length)
639 (soup_message_body_get_chunk): Use goffset rather than gsize for
640 references to the entire size of the message body. (SoupBuffer
641 still uses gsize, so individual chunks can only be G_MAXSIZE
644 * libsoup/soup-message-headers.c
645 (soup_message_headers_get_content_length):
646 (soup_message_headers_set_content_length): Likewise, use goffset.
648 2008-01-02 Dan Winship <danw@gnome.org>
650 * libsoup/soup-message-headers.c (soup_message_headers_get):
651 Renamed from soup_message_headers_find, and with new behavior; now
652 multiple headers with the same name are automatically merged
653 together into a single comma-separated value, to ensure that apps
654 treat multivalued headers the same regardless of how upstream
655 servers generate them.
656 (soup_message_headers_find_nth): no longer needed/wanted
658 * libsoup/soup-auth-manager.c: Update to deal with
659 SoupMessageHeaders change. (Ugh.)
661 * tests/header-parsing.c: Update multiple-values test, and undo a
662 change that mistakenly got committed while debugging something
665 2008-01-01 Dan Winship <danw@gnome.org>
667 * libsoup/soup-auth-manager.c:
668 * libsoup/soup-dns.c:
669 * libsoup/soup-gnutls.c:
670 * libsoup/soup-message.c:
671 * libsoup/soup-message-io.c:
672 * libsoup/soup-message-queue.c:
673 * libsoup/soup-misc.c:
674 * libsoup/soup-path-map.c:
675 * libsoup/soup-server.c:
676 * libsoup/soup-session.c:
677 * libsoup/soup-session-sync.c:
678 * libsoup/soup-socket.c: Use g_slice.
680 2008-01-01 Dan Winship <danw@gnome.org>
682 * libsoup/soup-session.c (soup_session_cancel_message): add a
683 "status_code" argument rather than having the caller set the
684 status code separately, to prevent a race condition.
686 2008-01-01 Dan Winship <danw@gnome.org>
688 * libsoup/soup-session.c (soup_session_queue_message): change the
689 callback type to include the SoupSession as a parameter as well.
693 2007-12-31 Dan Winship <danw@gnome.org>
695 * libsoup/soup-session.c (soup_session_class_init): change
696 the "authenticate" signal to include a SoupAuth rather than its
697 components, and to have a "retrying" parameter rather than
698 separating "authenticate" and "reauthenticate".
700 * libsoup/soup-connection.c (soup_connection_class_init): Likewise
702 * libsoup/soup-auth-manager.c (authenticate_auth): update
704 * libsoup/soup-auth.c: make various attributes into gobject
706 (soup_auth_is_for_proxy): check whether an auth is plain or proxy
707 (soup_auth_get_host): get the hostname associated with an auth
709 * libsoup/soup-auth-ntlm.c: dummy class used by SoupConnectionNTLM
710 in the authenticate signal
712 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): update for
713 authenticate signals changes; use a fake SoupAuthNTLM to assist.
715 2007-12-20 Dan Winship <danw@gnome.org>
717 * libsoup/soup-message.c (soup_message_add_header_handler)
718 (soup_message_add_status_code_handler): Make these be wrappers
719 around g_signal_connect() rather than having a completely separate
721 (soup_message_class_init): improve signal docs. Use
722 "got_foo_signal_wrapper" to wrap the got-foo signals.
723 (got_foo_signal_wrapper): Wraps the marshaller for the got-foo
724 signals and cancels the signal emission if the message gets
725 cancelled or requeued.
726 (got_informational, got_headers, got_chunk, got_body): remove
727 no-longer-needed default implementations.
729 * libsoup/soup-message-handlers.c: gone
731 * tests/ntlm-test.c (do_message): Simplify now that callback
732 processing doesn't happen in two separate phases.
734 2007-12-20 Dan Winship <danw@gnome.org>
736 * libsoup/soup-auth-domain.c:
737 * libsoup/soup-auth-domain-basic.c:
738 * libsoup/soup-auth-domain-digest.c: New server-side auth system.
740 * libsoup/soup-server.c: remove SoupServerAuth / SoupAuthContext
741 stuff, add SoupAuthDomain support.
742 (SoupServerCallbackFn): improve the args here
743 (SoupClientContext): renamed from SoupServerContext and made less
746 * libsoup/soup-server-auth.c: gone!
748 * libsoup/soup-auth-digest.c (soup_auth_digest_parse_algorithm)
749 (soup_auth_digest_get_algorithm, soup_auth_digest_parse_qop)
750 (soup_auth_digest_get_qop, soup_auth_digest_compute_hex_urp)
751 (soup_auth_digest_compute_hex_a1)
752 (soup_auth_digest_compute_response): New routines shared between
753 client-side and server-side digest auth.
755 * tests/server-auth-test.c: test server-side auth, using curl for
758 * configure.in: check for curl, for server-auth-test
760 2007-12-20 Dan Winship <danw@gnome.org>
762 * libsoup/soup-headers.c (soup_header_parse_list)
763 (soup_header_parse_quality_list): New methods to parse list-type
764 headers (with optional qvalues) correctly.
765 (soup_header_parse_param_list): Rename to match the other methods,
766 and update the semantics a bit.
767 (soup_header_contains): Correctly check for a token in a list
769 * libsoup/soup-message.c (soup_message_is_keepalive):
770 * libsoup/soup-message-client-io.c (get_request_headers):
771 * libsoup/soup-message-server-io.c (parse_request_headers): Use
772 soup_header_contains() with Connection headers.
774 * tests/header-parsing.c (do_qvalue_tests): add
775 soup_header_parse_quality_list() test
777 2007-12-20 Dan Winship <danw@gnome.org>
779 * libsoup/soup-auth-manager.c: Move auth-related code from
780 SoupSession and SoupAuth here, and make various cleanups and
781 beginnings of cleanups.
783 * libsoup/soup-session.c: lots of stuff moved to
786 * libsoup/soup-auth.c (soup_auth_new_from_headers): partly moved
787 to soup-auth-manager.c, partly renamed to soup_auth_new().
788 (soup_auth_update): new method to update an existing auth based on
789 a new WWW-Authenticate/Proxy-Authenticate header. Also replaces
790 the old "construct" method.
792 * libsoup/soup-auth-digest.c (update): Implement. If the new auth
793 has stale=true, don't invalidate the auth, just update the nonce.
794 (get_authorization): add a header handler to the message to catch
795 Authentication-Info/Proxy-Authentication-Info headers so that if
796 there's a nextnonce, we can start using it. #471380.
798 * libsoup/soup-auth-basic.c (update): Implement. (Updating an
799 existing Basic auth always invalidates it.)
801 * tests/http.conf.in:
802 * tests/auth-test.c: add a test for digest nonce handling
804 2007-12-20 Dan Winship <danw@gnome.org>
806 * libsoup/soup-path-map.c: New type representing a sparse
807 path->something mapping
809 * libsoup/soup-server.c: Use SoupPathMap to record handlers. Make
810 SoupServerHandler a private type.
811 (soup_server_new): Rewrite this to just be a thin wrapper, and put
812 all of the code into a constructor override. #491653
813 (soup_server_add_handler): Turn the "unregister" arg into a
814 GDestroyNotify, for better bindability.
816 2007-12-19 Dan Winship <danw@gnome.org>
818 * libsoup/soup-server.c: define new request_started, request_read,
819 request_finished, and request_aborted signals, for finer-grained
820 tracking than normal handlers allow.
821 (check_auth): split this out of call_handler, and run it
822 immediately after "got_headers", not "got_body", so that we can
823 preemptively reject "Expect: 100-continue" messages that will
826 * libsoup/soup-message-io.c (io_write, io_read): Fix up
827 100-continue processing
829 * tests/continue-test.c: new test of client/server 100-continue
832 2007-12-19 Dan Winship <danw@gnome.org>
834 * libsoup/soup-socket.c: Cleanup. Remove the "connect_result"
835 signal. Make local_address and remote_address
836 into (construct-only) properties.
837 (soup_socket_connect_async, soup_socket_connect_sync): Replace
838 soup_socket_connect. _async takes a callback+user_data (like the
839 old soup_socket_client_new_async), but doesn't implement the
840 callback in terms of a connect_result signal.
841 (soup_socket_client_new_async, soup_socket_client_new_sync): Gone.
842 (Unused since the async_context addition anyway). Replaced by the
843 new construct properties and connect methods.
844 (soup_socket_read, soup_socket_read_until, soup_socket_write):
845 Make these actually take a GError rather than doing an ugly hack
846 to preserve the old API.
847 (SOUP_SOCKET_FLAG_NODELAY, SOUP_SOCKET_FLAG_REUSEADDR)
848 (SOUP_SOCKET_FLAG_CLOEXEC): kill these off (all three are always
849 TRUE now); SoupSocket is libsoup's socket API; it's not
850 necessarily intended to be generically useful for everyone.
852 * *.c: Update for SoupSocket changes
854 2007-12-19 Dan Winship <danw@gnome.org>
856 * libsoup/soup-server-message.c: Kill!
858 * libsoup/soup-message-server-io.c (parse_request_headers):
859 Generate the full request URL from the socket's data, since we no
860 longer have soup_server_message_get_server().
862 * libsoup/soup-server.c (request_finished, call_handler)
863 (start_request, new_connection): update
865 2007-12-19 Dan Winship <danw@gnome.org>
867 * libsoup/soup-message-headers.c: Add some more fields to
868 SoupMessageHeaders, and start caching the parsed values of certain
870 (soup_message_headers_get/set_encoding): replaces old SoupMessage
871 methods, and only deals with the declared transfer encoding, not
873 (soup_message_headers_get/set_content_length): Handle
875 (soup_message_headers_get_expectations): Handle Expect. (Replaces
876 the SOUP_MESSAGE_EXPECT_CONTINUE flag).
878 * libsoup/soup-message.c (soup_message_get_request_encoding):
879 (soup_message_get_response_encoding):
880 (soup_message_set_response_encoding): replaced by
881 SoupMessageHeaders methods.
883 * libsoup/soup-message-client-io.c:
884 * libsoup/soup-message-server-io.c:
885 * libsoup/soup-message-io.c: Update for SoupMessageHeaders changes
886 with encoding/content-length stuff.
888 2007-12-19 Dan Winship <danw@gnome.org>
890 * libsoup/soup-message-body.c (SoupMessageBody): new opaque type
891 for request/response bodies allowing less hacky handling of
893 (SoupBuffer): refcounted buffer type
895 * libsoup/soup-message.h (SoupMessage): turn request and response
896 members into SoupMessageBody.
897 (SoupOwnership, SoupDataBuffer): gone, replaced by
898 SoupMessageBody/SoupBuffer.
900 * libsoup/soup-message.c (soup_message_wrote_chunk)
901 (soup_message_got_chunk): add the chunk as a signal param rather
902 than having it be visible in msg->request/response.
903 (soup_message_add_chunk, soup_message_add_final_chunk)
904 (soup_message_pop_chunk): replaced by SoupMessageBody methods now.
906 2007-12-19 Dan Winship <danw@gnome.org>
908 * libsoup/soup-xmlrpc.c:
909 * libsoup/soup-value-utils.c: Oops. Change the API a bunch so this
910 works on x86; apparently I was doing illegal things with va_lists
911 before that only work on x86_64.
913 2007-12-14 Dan Winship <danw@gnome.org>
915 * libsoup/soup-message.c: use GObject properties for SoupMessage
918 * libsoup/soup-message-server-io.c:
919 * libsoup/soup-soap-message.c: update for that
921 2007-12-14 Dan Winship <danw@gnome.org>
923 * libsoup/soup-uri.c: Rename from SoupUri to SoupURI. Use the
924 slice allocator and register as a boxed type.
925 (SoupURI): Rename "protocol" field to "scheme" and "passwd" to
926 "password". Make scheme an interned string. Replace
927 SOUP_PROTOCOL_HTTPS with soup_uri_is_https().
931 2007-12-14 Dan Winship <danw@gnome.org>
933 * libsoup/Makefile.am: Use glib-mkenums to build soup-enum-types.c
934 and soup-enum-types.h
936 * libsoup/soup-address.h (SoupAddressFamily): redo this definition
937 again, to make glib-mkenums happy.
939 2007-12-13 Dan Winship <danw@gnome.org>
941 * libsoup/soup-xmlrpc.c: New easier-to-use and
942 easier-to-do-language-bindings-of XML-RPC code.
944 * libsoup/soup-xmlrpc-message.c:
945 * libsoup/soup-xmlrpc-response.c: gone
947 * libsoup/soup-value-utils.c: Utilites for working with
948 GValueArray, and GHashTables of GValues, used by soup-xmlrpc.
951 * tests/xmlrpc-test.c: Update to use new XML-RPC stuff
953 2007-12-13 Dan Winship <danw@gnome.org>
955 * libsoup/soup-date.c: Make a SoupDate type, and redo in terms of
956 that rather than struct tm and time_t. Also be much more liberal
959 * libsoup/soup-xmlrpc-message.c (soup_xmlrpc_message_write_datetime):
960 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_datetime):
963 * tests/date.c: Use SoupDate, test parsing lots more formats
965 * tests/xmlrpc-test.c: update for SoupDate
967 2007-12-12 Dan Winship <danw@gnome.org>
969 * libsoup/soup-message.c:
970 * libsoup/soup-message-private.h: Remove SoupMessageStatus,
971 msg->status, and soup_message_io_* from the public API, as they
972 all really belong to the session, not the message. (For now
973 they've just been moved to soup-message-private.h, but some day
974 they'll be fully refactored away from SoupMessage.)
976 * libsoup/soup-server.c (soup_server_pause_message)
977 (soup_server_unpause_message):
978 * libsoup/soup-session.c (soup_session_pause_message)
979 (soup_session_unpause_message): session/server-level methods to
980 replace soup_message_io_pause() and soup_message_io_unpause().
982 * libsoup/soup-server-message.c: Remove some unused methods
986 2007-12-05 Dan Winship <danw@gnome.org>
988 * libsoup/soup-connection.c:
989 * libsoup/soup-session.c: replace message filters with a
990 "request_started" signal
992 * libsoup/soup-message-filter.c: gone
994 * libsoup/soup-types.h (SOUP_MAKE_INTERFACE): no longer needed
996 2007-12-05 Dan Winship <danw@gnome.org>
998 * libsoup/soup-uri.c: Update for RFC 3986 changes, bgo 266516, and
1000 (soup_uri_get_protocol): match protocols case-insensitively
1001 (soup_uri_new_with_base): Don't fully %-decode the fragment,
1002 query, and path, but do %-decode anything which isn't supposed to
1003 be encoded. Recognize IPv6 address literals. Use stricter
1004 "../"-stripping rules on the path. Reject URIs with junk between
1005 the port number and the path.
1006 (soup_uri_to_string): Update for the fact that the host might be
1007 an IPv6 literal, and for the fact that path, query, and fragment
1008 are now pre-escaped.
1009 (soup_uri_equal): compare hostnames case-insensitively
1010 (uri_encoded_char): update to match RFC 3986
1011 (append_uri_encoded): use uppercase hex letters as recommended by
1013 (soup_uri_normalize): decode only %-escapes that don't belong
1016 * docs/reference/tmpl/soup-uri.sgml: add some more SoupUri docs
1018 * tests/uri-parsing.c: Add new tests from RFC 3986, RFC 2732, RFC
1019 2616, bgo 266516, and elsewhere. Update some tests to match new
1020 parsing/unparsing rules.
1022 2007-12-05 Dan Winship <danw@gnome.org>
1024 * libsoup/soup-message.c (soup_message_new)
1025 (soup_message_new_from_uri): g_intern_string() the method name
1026 rather than assuming it's static. Also remove the NULL==GET
1029 * libsoup/soup-method.c:
1030 * libsoup/soup-method.h: remove the SOUP_METHOD_ID_* macros, and
1031 have the SOUP_METHOD_* macros return interned strings
1033 * libsoup/soup-server.h (SoupServerContext): remove method_id
1036 * libsoup/soup-server-message.c (finalize): no longer needed,
1037 since smsg->method is now an interned string just like with a
1040 * libsoup/soup-soap-message.c (soup_soap_message_new_from_uri):
1041 remove NULL==GET assumption
1045 2007-12-05 Dan Winship <danw@gnome.org>
1047 * libsoup/soup-message.h (SoupHTTPVersion): rename (from
1050 * libsoup/soup-message-headers.c: New opaque type representing
1051 message headers, and new methods that work on it. Uses an array
1052 rather than a hash table, to preserve header ordering as required
1053 by RFC 2616. (Also fixes the API wart that
1054 "soup_message_get_header", etc, did not actually take a
1057 * libsoup/soup-message.c: Kill off old header-manipulating
1060 * libsoup/soup-headers.c (soup_headers_parse_request): return a
1061 guint rather than gboolean, so we can properly return
1062 SOUP_STATUS_HTTP_VERSION_NOT_SUPPORTED where appropriate. Also fix
1063 up HTTP-Version parsing to conform with the RFC.
1064 (soup_headers_parse_status_line): Likewise update HTTP-Version
1067 * libsoup/soup-message-server-io.c (parse_request_headers): set
1068 return status appropriately on parse errors
1070 * tests/header-parsing.c: update / add more tests
1074 2007-12-05 Dan Winship <danw@gnome.org>
1076 * libsoup/soup-misc.c: remove deprecated base64 methods
1078 * tests/auth-test.c (identify_auth): oops, update to use
1081 2007-12-05 Dan Winship <danw@gnome.org>
1083 * libsoup/Makefile.am (libsoupinclude_HEADERS): remove
1084 soup-connection.h and soup-message-queue.h
1086 * libsoup/soup-types.h: remove SoupConnection and SoupMessageQueue
1087 which are no longer public
1089 * libsoup/soup.h: sync this to reality for the first time in years
1091 * libsoup/soup-session.c (soup_session_get_queue): Add this, for
1092 subclasses, as the queue is no longer a public part of the session
1095 * libsoup/soup-message.h:
1096 * libsoup/soup-message-private.h: Move soup_message_send_request()
1097 and soup_message_receive_request() to soup-message-private.h,
1098 remove soup_message_send_request_internal().
1100 * libsoup/soup-session-private.h: Move "protected" SoupSession
1101 methods (soup_session_get_connection,
1102 soup_session_try_prune_connection) here from soup-session.h
1103 Add soup_session_get_queue.
1105 2007-12-05 Dan Winship <danw@gnome.org>
1107 * configure.in: bump version to 2.3.0 and SOUP_API_VERSION to 2.4,
1108 and drop AGE/CURRENT/REVISION all to 0.
1110 * libsoup/Makefile.am: Rename library to libsoup-2.4.la
1112 (start of libsoup-2.4 branch)
1114 2007-11-26 Dan Winship <danw@gnome.org>
1116 * configure.in: 2.2.104
1120 2007-11-21 Dan Winship <danw@gnome.org>
1122 * libsoup/soup-message-io.c (soup_message_io_cleanup): make this
1125 * libsoup/soup-message.c (finalize): Use soup_message_io_cleanup()
1126 rather than soup_message_io_stop(), to avoid leaks when finalizing
1127 an unfinished message. (Another part of #498509, Wouter Cloetens.)
1129 2007-11-20 Dan Winship <danw@gnome.org>
1131 Fix up SOUP_SESSION_ASYNC_CONTEXT. #498509, Wouter Cloetens
1133 * libsoup/soup-message-io.c (soup_message_io_unpause): don't leak
1136 * libsoup/soup-server.c (soup_server_quit): disconnect the
1137 "new_connection" handler.
1138 (soup_server_get_async_context): Convenience method to return the
1139 server's async_context.
1141 * libsoup/soup-server-message.c: don't circularly ref the server,
1142 there's no need anyway.
1144 * libsoup/soup-session.c (soup_session_get_async_context):
1145 Convenience method to return the session's async_context.
1147 * libsoup/soup-session-async.c (queue_message): call run_queue in
1148 the session's async_context, not the main context.
1149 (send_message): don't leak the async_context
1151 * libsoup/soup-session-sync.c (queue_message_thread): don't leak
1154 * tests/context-test.c: test that SOUP_SESSION_ASYNC_CONTEXT works
1157 2007-11-20 Dan Winship <danw@gnome.org>
1159 * libsoup/soup-connection.c (soup_connection_connect_async): don't
1160 leak the SoupAddress.
1162 * libsoup/soup-dns.c (soup_dns_lookup_resolve_async): fix a leak
1163 when re-looking up an address
1165 * libsoup/soup-session.c (soup_session_abort): close all
1166 connections in addition to cancelling messages (needed because
1167 connections currently end up holding a ref on their session,
1168 preventing them from being destroyed).
1170 * tests/auth-test.c:
1171 * tests/ntlm-test.c:
1172 * tests/proxy-test.c:
1175 * tests/xmlrpc-test.c: clean up more memory on exit, to help find
1176 leaks in the library
1178 * tests/libsoup.supp: add a zillion new suppressions so we
1179 can use --leak-resolution=med
1181 2007-11-16 Dan Winship <danw@gnome.org>
1183 * libsoup/soup-message-io.c (read_body_chunk): Fix the guards
1184 around the got_chunk emission so that it doesn't get messed up if
1185 you pause the I/O from the got_chunk handler. (#452280, Marco
1187 (soup_message_io_pause, soup_message_io_unpause): Update docs
1188 again; these are now allowed with client-side I/O as well. Fix
1189 unpause() to unpause asynchronously on async sockets.
1191 * libsoup/soup-session-async.c (send_message): Iterate session's
1192 async_context, not the default main context.
1194 * tests/pull-api.c: Test/sample of creating a pull-style API using
1197 * tests/index.txt: new file to act as DirectoryIndex for the
1198 tests. (In particular, pull-api wants this to be largeish.)
1200 2007-10-28 Dan Winship <danw@gnome.org>
1202 * configure.in: 2.2.103
1206 2007-10-28 Dan Winship <danw@gnome.org>
1208 * libsoup/soup-server.c (start_request, request_finished): ref the
1209 socket around the processing of the message, since otherwise it
1210 might already be freed when request_finished runs. #459896.
1212 * libsoup/soup-message-io.c (soup_message_io_pause)
1213 (soup_message_io_unpause): Clarify the docs here; this is for
1214 server-side use only. Inspired by #452280.
1216 * docs/reference/server-howto.xml: You need to watch the
1217 "finished" signal on the message if using soup_message_io_pause()
1218 or chunked encoding, because the client might disconnect while
1219 you're paused. Clarification inspired by #471385.
1221 * tests/simple-proxy.c (client_msg_failed): Fix this to DTRT since
1222 server-howto.xml points to it as an example of what to do.
1224 2007-10-28 Dan Winship <danw@gnome.org>
1226 * libsoup/soup-session.c (finalize): free proxy-related stuff
1228 * libsoup/soup-session-async.c (idle_run_queue): clean up the weak
1229 pointer. (From the dev repo, but identical to a patch from Rob
1230 Bradford in #484988.)
1232 * tests/*.c: fix leaks
1234 2007-10-28 Dan Winship <danw@gnome.org>
1236 * tests/auth-test.c:
1238 * tests/header-parsing.c:
1239 * tests/ntlm-test.c:
1240 * tests/proxy-test.c:
1241 * tests/uri-parsing.c:
1242 * tests/xmlrpc-test.c: Make these less verbose by default (to make
1243 it easier to see what failed when a "make check" fails).
1245 2007-10-15 Dan Winship <danw@gnome.org>
1247 * configure.in: 2.2.102
1251 2007-10-08 Dan Winship <danw@gnome.org>
1253 * libsoup/soup-nossl.c: Update for current soup-ssl.h prototypes
1255 * tests/proxy-test.c (run_test): wrap https tests in #if HAVE_SSL
1257 2007-10-05 Dan Winship <danw@gnome.org>
1259 * configure.in: 2.2.101
1263 * tests/httpd.conf.in:
1264 * tests/Makefile.am:
1265 * tests/ssl-test.c: srcdir != builddir fixes
1267 2007-10-05 Dan Winship <danw@gnome.org>
1269 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Don't crash
1270 if the authenticate callback returns a username and no password
1271 (even though it's not supposed to do that). #480987
1273 2007-09-24 Dan Winship <danw@gnome.org>
1275 * libsoup/soup-auth.h (SoupAuth): add "realm" field to the struct.
1276 (SoupAuthClass) remove "get_realm" virtual method.
1278 * libsoup/soup-auth.c (soup_auth_new_from_header_list): Parse the
1279 WWW-Authenticate/Proxy-Authenticate header here, set realm, and
1280 pass the params hash to the construct method.
1281 (soup_auth_get_info): Return an identifier for the auth:
1284 * libsoup/soup-auth-basic.c:
1285 * libsoup/soup-auth-digest.c: update
1287 * libsoup/soup-session.c (invalidate_auth, update_auth_internal):
1288 use soup_auth_get_info().
1290 2007-09-24 Dan Winship <danw@gnome.org>
1292 * libsoup/soup-date.c (soup_date_parse): minor rfc850-date parsing
1293 improvement suggested by RFC2616 19.3.
1295 * libsoup/soup-headers.c (soup_headers_parse_request): allow
1296 erroneous trailing whitespace after HTTP version. #475169
1298 * libsoup/soup-message-server-io.c (parse_request_headers): fix
1299 the parsing of the Host header to assume it already includes the
1300 port (which it should; the only reason this ever worked is because
1301 SoupUri ignores the second port number when parse_request_headers
1302 generates a URL like "http://localhost:9999:9999/").
1304 * tests/header-parsing.c (reqtests): add a test for #475169
1306 2007-09-23 Dan Winship <danw@gnome.org>
1308 * libsoup/soup-message.c (soup_message_class_init): remove a
1309 mysterious partial sentence in the ::wrote-chunk docstring.
1312 * docs/reference/libsoup-sections.txt: Remove documentation of MD5
1313 methods, which are not public. #440092
1315 2007-09-23 Dan Winship <danw@gnome.org>
1317 * libsoup/soup-message.c (soup_message_set_auth)
1318 (soup_message_set_proxy_auth): Only remove the Authorization /
1319 Proxy-Authorization header from the message if it was previously
1320 set by soup_message_set_auth(). (Eg, not if it was added by
1321 SoupConnectionNTLM.) #471389
1323 * libsoup/soup-connection-ntlm.h: fix a search-and-replace-o
1325 * tests/ntlm-test.c: Simple NTLM regression test; doesn't really
1326 test the crypto/encoding bits, just that the right headers are
1327 being sent at the right times.
1329 2007-09-14 Dan Winship <danw@gnome.org>
1331 Make "make check" pass on Fedora 7:
1333 * configure.in: update apache/php tests with additional filenames
1335 * tests/httpd.conf.in: updates for configure.in changes and
1336 slightly-more-recent apache
1338 * tests/ssl-test.c (start_writing): fix uninitialized struct field
1339 (main): start server after setting up client since otherwise
1340 there's a race condition since soup_gnutls_init() isn't actually
1341 thread-safe. (FIXME)
1343 * tests/xmlrpc-server.php: rewrite to not use $HTTP_RAW_POST_DATA
1344 (which only exists if register_globals is set)
1346 2007-06-01 Dan Winship <danw@novell.com>
1348 * libsoup/soup-message-filter.h (SOUP_IS_MESSAGE_FILTER_CLASS):
1349 fix. noted by "cascardo" on libsoup-list.
1351 2007-05-16 Jonathon Jongsma <jjongsma@gnome.org>
1353 * libsoup/*.h: add G_BEGIN_DECLS / G_END_DECLS to all installed
1354 headers so that libsoup can be used from C++ programs. #438776
1356 2007-04-16 Dan Winship <danw@novell.com>
1358 * libsoup/soup-ssl.h: Make a real SoupSSLCredentials type rather
1359 than just using gpointer
1361 * libsoup/soup-server.c (SoupServerPrivate): use it
1363 * libsoup/soup-session.c (SoupSessionPrivate): use it
1365 * libsoup/soup-gnutls.c: Use it, and consistently use "creds"
1366 rather than "cred" as the abbreviation for "credentials".
1368 * docs/reference/libsoup-sections.txt:
1369 * docs/reference/tmpl/soup-misc.sgml:
1370 * docs/reference/tmpl/soup-ssl.sgml: update
1372 2007-03-29 Dan Winship <danw@novell.com>
1374 * libsoup/soup-session-sync.c (queue_message): Implement this by
1375 sending the message (synchronously) in another thread and then
1376 queueing the callback back in the main thread.
1378 * libsoup/soup-session.c (soup_session_queue_message): update docs
1379 to be more explicit about what thread the callback occurs in
1381 2007-03-17 Dan Winship <danw@novell.com>
1383 * libsoup/soup-message.c (soup_message_set_auth)
1384 (soup_message_get_auth, soup_message_set_proxy_auth)
1385 (soup_message_get_proxy_auth): get/set auth/proxy_auth info for a
1388 * libsoup/soup-session.c (add_auth): Use soup_message_set_auth and
1389 soup_message_set_proxy_auth.
1390 (update_auth_internal): Call soup_message_get_auth or
1391 soup_message_get_proxy_auth to determine the message's prior auth,
1392 rather than calling lookup_auth() again, since it isn't guaranteed
1393 to return the same thing now as it did when the message was
1394 originally sent. Fixes erroneous 401s when queuing multiple
1395 messages at once to an as-yet-unauthenticated-to server. #271540
1397 * libsoup/soup-session-async.c (queue_message): don't run the
1398 queue right away, do it at idle time. Otherwise in some cases
1399 (especially errors), the message callbacks could be invoked before
1400 queue_message returns.
1402 * tests/auth-test.c: add a regression test for #271540.
1404 2007-03-17 Dan Winship <danw@novell.com>
1406 * configure.in: require glib 2.12. check for timegm().
1408 * libsoup/soup-date.c (soup_mktime_utc): Use timegm if available.
1409 (soup_date_iso8601_parse): use g_time_val_from_iso8601. #337010,
1410 patch from Emmanuele Bassi.
1412 * libsoup/soup-types.h: remove local copy of
1413 G_GNUC_NULL_TERMINATED since we now depend on a new-enough copy of
1416 * libsoup/soup-misc.c (soup_base64_encode_close)
1417 (soup_base64_encode_step, soup_base64_encode)
1418 (soup_base64_decode_step): Make these just be wrappers around the
1419 glib base64 methods. (For now; eventually they'll just go away.)
1421 * libsoup/soup-auth-basic.c (authenticate):
1422 * libsoup/soup-auth-digest.c (authenticate):
1423 * libsoup/soup-connection-ntlm.c (soup_ntlm_parse_challenge)
1424 (soup_ntlm_response):
1425 * libsoup/soup-server-auth.c (soup_server_auth_new):
1426 * libsoup/soup-soap-message.c (soup_soap_message_write_base64):
1427 * libsoup/soup-xmlrpc-message.c
1428 (soup_xmlrpc_message_write_base64):
1429 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_base64):
1430 Use glib base64 methods
1432 2007-03-16 Dan Winship <danw@novell.com>
1434 * libsoup/soup-message.c (soup_message_get_response_encoding):
1435 update the handling of CONNECT: it has no response body by
1436 default, but does have a body if its headers say so.
1438 * tests/proxy-test.c: test libsoup's behavior when talking to
1441 * tests/httpd.conf.in: Load mod_proxy and mod_ssl, and add
1442 sections configuring them, for proxy-test
1444 * configure.in: update the apache-module-dir-finding code to deal
1445 with the fact that some modules (eg, mod_ssl) might only be in the
1446 mpm-specific module dir, while others (eg, mod_php5) might only be
1447 in the generic module dir.
1449 2007-03-12 Dan Winship <danw@novell.com>
1451 * tests/Makefile.am (INCLUDES): add $(LIBGNUTLS_CFLAGS) for
1452 ssl-test. #417617, patch from Elijah Newren.
1454 2007-03-12 Dan Winship <danw@novell.com>
1456 * libsoup/soup-session-sync.c (wait_for_connection): if
1457 soup_connection_connect_sync() returns SOUP_STATUS_TRY_AGAIN, then
1458 try again. (Duh.) Fixes SSL-via-proxy-when-using-synchronous-I/O-
1459 where-the-proxy-closes-the-connection-when-returning-407. (Reported
1462 * tests/get.c: Rewrite to use soup_session_send_message rather
1463 than soup_session_queue_message, and add a "-s" flag to use
1464 SoupSessionSync rather than SoupSessionAsync (so we can test bugs
1465 in the sync code paths).
1467 2007-03-08 Dan Winship <danw@novell.com>
1469 * libsoup/soup-gnutls.c (do_handshake): don't return
1470 G_IO_STATUS_AGAIN if we're doing blocking I/O; just keep retrying
1471 until the handshake is complete.
1472 (soup_gnutls_read, soup_gnutls_write): if we get
1473 GNUTLS_E_REHANDSHAKE, call do_handshake() immediately rather than
1474 returning G_IO_STATUS_AGAIN; if the socket is blocking then
1475 G_IO_STATUS_AGAIN is wrong, and if the socket is non-blocking, we
1476 might already need to return SOUP_SSL_ERROR_HANDSHAKE_NEEDS_WRITE
1477 or SOUP_SSL_ERROR_HANDSHAKE_NEEDS_READ.
1479 #415402, based on a patch from Jacob Berkman.
1481 * tests/ssl-test.c: basic ssl test. In particular, tests that
1482 rehandshake requests are handled correctly during both synchronous
1483 and asynchronous I/O. Might eventually test other stuff too...
1486 * tests/Makefile.am: updates for ssl-test
1488 2007-02-19 Dan Winship <danw@novell.com>
1490 * configure.in: Get gcrypt libs/cflags.
1492 * libsoup/Makefile.am (INCLUDES, libsoup_2_2_la_LIBADD): add
1493 gcrypt flags. Patch from "Cygwin Ports Maintainer", #384498
1495 2007-02-12 Dan Winship <danw@novell.com>
1497 * configure.in: 2.2.100
1499 2007-02-12 Dan Winship <danw@novell.com>
1501 * libsoup/soup-headers.c (soup_headers_parse_status_line): Fix
1502 this to handle "\0"-terminated status lines (eg, from WebDAV
1503 responses), like the docs say it does. #406997
1504 (soup_headers_parse): Balance that out by rejecting internal "\0"s
1506 (soup_headers_parse_request, soup_headers_parse_response): Update
1507 docs to warn that @dest may be modified even on error. (This was
1508 always true, it just wasn't documented.)
1510 2007-01-16 Dan Winship <danw@novell.com>
1512 * tests/header-parsing.c (do_request_tests, do_response_tests):
1513 initialize "errors" to 0. duh. Pointed out by Michael Wolf.
1515 2007-01-08 Dan Winship <danw@novell.com>
1517 * configure.in: 2.2.99
1521 2007-01-06 Dan Winship <danw@novell.com>
1523 * libsoup/soup-headers.c (soup_headers_parse): Rewrite this to be
1524 easier to understand and more correct, and make the "str" param
1525 const rather than overwriting it during parsing.
1526 (soup_headers_parse_request, soup_headers_parse_response):
1527 Likewise, make "str" param const. Fix the doc comment to describe
1528 the correct constraint on str. Make the parsing slightly more
1529 lenient as per sections 4.1 and 19.3 of RFC 2616.
1531 * tests/header-parsing.c: new regression test, for Request-Line,
1532 Status-Line, and message-header parsing.
1534 Inspired by #391970 (crash in SoupServer when certain invalid
1535 requests are received).
1537 2006-12-05 Dan Winship <danw@novell.com>
1539 * libsoup/soup-message.c (soup_message_set_uri): Remove the calls
1540 to soup_message_io_stop() here; the corresponding calls were
1541 needed back in the SoupContext days, but they are wrong now and
1542 cause async-redirects-to-other-hosts to fail. #382251. Also
1543 clarify docs with respect to soup_session_requeue_message().
1545 * libsoup/soup-message-io.c (soup_message_io_stop): Clarify docs
1547 * libsoup/soup-session.c (finalize): Free ssl_creds. Pointed out
1550 2006-11-20 Dan Winship <danw@novell.com>
1552 * configure.in: 2.2.98
1556 2006-11-20 Dan Winship <danw@novell.com>
1558 Patch from Andrew W. Nosenko:
1560 * libsoup/soup-message-client-io.c (parse_response_headers): Avoid
1561 memory leak when parse_response_headers() is called on a message
1562 that has a 'reason_phrase' already for some reason.
1564 * libsoup/soup-gnutls.c (soup_gnutls_free): Avoid memory leak:
1565 hostname was not freed.
1566 (soup_ssl_wrap_iochannel): Avoid memory leak: SoupGNUTLSChannel
1567 'chan' was not freed in case of initialization error. Avoid double
1568 close of the "real" (plain, non-ssl) channel FD.
1570 * libsoup/soup-socket.c (soup_socket_start_proxy_ssl): Avoid
1571 memory leak: the "real" (plain, non-ssl) GIOChannel was never
1572 "finally" unreffed (one more *_ref() than *_unref()) in case of
1575 2006-11-20 Dan Winship <danw@novell.com>
1577 * libsoup/soup-connection-ntlm.c (send_request):
1578 * libsoup/soup-session-sync.c (queue_message):
1579 * libsoup/soup-status.c (reason_phrases): Add some missing
1580 "static"s. Patch from Matthias Clasen, #376387
1582 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_type)
1583 (soup_xmlrpc_value_get_string): <value>foo</value> should mean the
1584 same thing as <value><string>foo</string></value>. Pointed out by
1585 Todd Kulesza. #364490
1587 2006-11-06 Dan Winship <danw@novell.com>
1589 * configure.in: Bump version to 2.2.97. Bump AGE and CURRENT for
1590 addition of soup_xml_real_node.
1594 2006-11-06 Dan Winship <danw@novell.com>
1596 * libsoup/soup-misc.c (soup_xml_real_node): new method to find a
1597 "real" (ie, not comment or whitespace) xml node
1599 * libsoup/soup-soap-response.c (parse_parameters)
1600 (soup_soap_response_from_string)
1601 (soup_soap_parameter_get_first_child)
1602 (soup_soap_parameter_get_next_child): Use soup_xml_real_node.
1603 Based on a patch from Andrew W. Nosenko.
1605 * libsoup/soup-xmlrpc-message.c (soup_xmlrpc_message_from_string):
1606 don't call xmlKeepBlanksDefault, which changes libxml's behavior
1607 globally! Instead, use soup_xml_real_node() when traversing the
1610 * libsoup/soup-xmlrpc-response.c
1611 (soup_xmlrpc_response_from_string): don't call
1612 xmlKeepBlanksDefault.
1613 (exactly_one_child): rewrite in terms of soup_xml_real_node()
1614 (which means it handles comments now as well)
1615 (soup_xmlrpc_value_get_struct)
1616 (soup_xmlrpc_value_array_get_iterator)
1617 (soup_xmlrpc_value_array_iterator_prev)
1618 (soup_xmlrpc_value_array_iterator_next): Use soup_xml_real_node.
1620 2006-11-05 Dan Winship <danw@novell.com>
1622 * libsoup/soup-headers.c (soup_headers_parse_request): document
1623 this (in particular, point out that str+len must point to exactly
1624 the right place). Allow req_method and req_path to be NULL.
1625 (soup_headers_parse_status_line, soup_headers_parse_response):
1626 document. Also, change "status_phrase" argument to "reason_phrase"
1627 to match the spec. Inspired by #339889.
1629 2006-11-03 Dan Winship <danw@novell.com>
1631 * libsoup/*.c: fix lots of warnings. Partially from patches from
1632 Andrew W. Nosenko, and also some fixes from libsoup-pre214-branch.
1634 2006-11-03 Dan Winship <danw@novell.com>
1636 * Makefile.am (uninstall-local): uninstall the pkgconfig file.
1637 Based on #356809 from Matthew Barnes.
1639 * libsoup/soup-server.c (get_property): Fix leaks pointed out by
1640 Paolo Borelli. #351500
1642 * libsoup/soup-uri.c (soup_uri_get_protocol): Fix an off by one
1643 pointed out by Andrew W. Nosenko.
1645 * configure.in: Use pkgconfig to find gnutls. Remove old static
1646 linking stuff that was only needed for rcd.
1648 * acinclude.m4: remove gnutls stuff
1650 * libsoup.pc.in: Use Requires rather than putting xml/ssl
1651 dependencies directly into Libs/Cflags. From Mikhail Zabaluev.
1654 * libsoup/Makefile.am (libsoup_2_2_la_LDFLAGS): fix build on
1655 cygwin. From "Cygwin Ports maintainer", #321827.
1657 2006-07-24 Dan Winship <danw@novell.com>
1659 * configure.in: 2.2.96. bump AGE and CURRENT for new API
1663 * libsoup/soup-xmlrpc-message.c (soup_xmlrpc_message_from_string):
1664 New, from Fernando Herrera, bug 348532.
1666 2006-07-21 Dan Winship <danw@novell.com>
1668 * libsoup/soup-auth.c (soup_auth_new_from_header_list): if the
1669 constructed auth doesn't have a realm, it's invalid, as per RFC
1670 2617. Based on a patch from Nate Nielsen on libsoup-list.
1671 (soup_auth_get_realm): remove "if available" from docs; all auths
1672 always have a realm.
1674 * libsoup/soup-message-server-io.c (get_response_headers): If the
1675 server handler set a Content-Length header on the message, don't
1676 add a second one. (Preserves compatibility with an old hacky way
1677 that people might have been handling HEAD from SoupServer.)
1679 * README: update to mention mailing list and bugzilla
1681 * HACKING: kill this since there's nothing here that isn't either
1682 obvious, or redundant with the README
1684 2006-07-21 Dan Winship <danw@novell.com>
1686 * libsoup/soup-server-message.c (soup_server_message_init):
1687 initialize encoding to SOUP_TRANSFER_CONTENT_LENGTH rather than
1688 SOUP_TRANSFER_UNKNOWN, since SOUP_TRANSFER_UNKNOWN has never
1689 actually worked here, and so there was an undocumented requirement
1690 that you manually set the encoding on every response
1691 (which SoupServer itself was not doing on internal errors).
1692 Problem pointed out by Dennis Jacobfeuerborn on libsoup-list.
1693 (soup_server_message_set_encoding): reject the new
1694 SoupTransferEncoding values, for compatibility
1696 * libsoup/soup-message.h (SoupTransferEncoding): Clarify that
1697 SOUP_TRANSFER_UNKNOWN is essentially an error value, since in the
1698 public API, it always has been, due to bugs. Add some new values,
1699 currently just for internal use: SOUP_TRANSFER_NONE (for cases
1700 like HEAD which never have a body), SOUP_TRANSFER_EOF (to replace
1701 SOUP_TRANSFER_UNKNOWN), and SOUP_TRANSFER_BYTERANGES (which isn't
1702 actually implemented yet).
1704 * libsoup/soup-message.c (soup_message_get_request_encoding,
1705 soup_message_get_response_encoding): figure out the body encoding
1706 being used by the request/response, including all the tricky
1707 cases like HEAD/1xx/etc.
1708 (soup_message_is_keepalive): if the response encoding is
1709 SOUP_TRANSFER_EOF, then the message isn't keepalive.
1711 * libsoup/soup-message-client-io.c (parse_response_headers): use
1712 soup_message_get_response_encoding.
1714 * libsoup/soup-message-server-io.c (parse_request_headers): use
1715 soup_message_get_request_encoding.
1716 (get_response_headers): use both soup_server_message_get_encoding
1717 and soup_message_get_response_encoding, to properly distinguish
1718 between the wire encoding and the alleged-by-headers encoding
1719 (which differ for HEAD, etc).
1721 * libsoup/soup-message-io.c (io_error, read_body_chunk):
1722 s/SOUP_TRANSFER_UNKNOWN/SOUP_TRANSFER_EOF/.
1723 (io_body_state): if encoding is SOUP_TRANSFER_NONE, jump right to
1724 SOUP_MESSAGE_IO_STATE_FINISHING.
1726 * libsoup/soup-server.c (request_finished): Check
1727 soup_socket_is_connected() *before* soup_message_is_keepalive(),
1728 since the message will be invalid if the client unexpectedly
1729 dropped the connection.
1731 * tests/simple-httpd.c (server_callback): handle HEAD requests.
1732 Remove no-longer-necessary soup_server_message_set_encoding()
1735 * tests/get.c: add -d (debug) flag to print headers, and -h flag
1736 to do a HEAD rather than GET
1738 2006-07-10 Dan Winship <danw@novell.com>
1740 * configure.in: 2.2.95.1, and bump SOUP_AGE/SOUP_CURRENT this
1741 time. Pointed out by Daniel Holbach.
1743 2006-07-10 Dan Winship <danw@novell.com>
1745 * configure.in: 2.2.95
1749 2006-06-19 Dan Winship <danw@novell.com>
1751 * tests/Makefile.am (noinst_PROGRAMS): don't build xmlrpc-test
1752 unless we have apache/php/xmlrpc-epi. Fixes the build. #345342
1754 * configure.in: fix some quoting
1756 2006-06-14 Dan Winship <danw@novell.com>
1758 * configure.in: add tests for apache mod_php5 and xmlrpc-epi-php
1760 * tests/xmlrpc-test.c: XML-RPC regression test
1762 * tests/xmlrpc-server.php: PHP server for xmlrpc-test
1764 * tests/httpd.conf.in: add php stuff
1766 * tests/apache-wrapper.c (apache_cleanup): Use "graceful-stop"
1767 rather than "stop", so that it stops listening on the socket
1768 before exiting, so that we can immediately start another apache
1769 (eg, in "make check").
1771 * libsoup/soup-date.c (soup_mktime_utc): Fix a bug in leap-year
1774 * libsoup/soup-xmlrpc-message.c
1775 (soup_xmlrpc_message_write_datetime): rename from
1776 "..._write_time", to make it consistent with the XML-RPC type name
1777 and the corresponding SoupXmlrpcResponse method. Also, fix it to
1778 use the same ISO 8601 format as the spec, and use the right value
1779 for the seconds field.
1780 (soup_xmlrpc_message_write_base64): Change the buf arg to a
1781 gconstpointer rather than a const char *.
1783 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_base64):
1784 Return a GByteArray containing the decoded data, rather than
1785 the base64-encoded string.
1786 (soup_xmlrpc_value_dump_internal): Update for that (and don't
1788 (soup_xmlrpc_value_array_get_iterator,
1789 soup_xmlrpc_value_array_iterator_get_value): Make these actually
1792 2006-06-12 Dan Winship <danw@novell.com>
1794 * configure.in: 2.2.94
1798 2006-06-12 Dan Winship <danw@novell.com>
1800 * docs/reference/client-howto.xml:
1801 * docs/reference/server-howto.xml: New client and server API
1804 * docs/reference/*: reorganize, regenerate, fill in some missing
1807 * libsoup/soup-connection.c (soup_connection_new): document the
1810 * libsoup/soup-date.h: sync prototypes to declarations for gtk-doc.
1812 * libsoup/soup-headers.c (soup_headers_parse_response): fix typo
1815 2006-06-12 Dan Winship <danw@novell.com>
1817 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_int,
1818 soup_xmlrpc_value_get_double): Further fixes from Brent Smith.
1820 (soup_xmlrpc_value_get_boolean): Similar fix, plus actually set
1821 the output parameter and make the return value match the other
1824 2006-06-09 Dan Winship <danw@novell.com>
1826 * configure.in: Add tests for apache, output tests/httpd.conf
1830 * tests/httpd.conf.in: Apache 2.2 config files for auth-test
1832 * tests/apache-wrapper.c (apache_init, apache_cleanup): functions
1833 to start/stop apache
1835 * tests/auth-test.c: Use apache-wrapper functions to start a local
1836 apache process to test authentication against, since the auth-test
1837 tree at developer.ximian.com went missing a long time ago. #311825
1839 * tests/Makefile.am (auth_test_SOURCES): use apache-wrapper.c
1840 (TESTS): include auth-test if HAVE_APACHE.
1842 * libsoup/soup-session.c (lookup_auth): Fix this in the case of a
1843 URI pointing to a directory rather than a file.
1845 2006-06-08 Dan Winship <danw@novell.com>
1847 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_int,
1848 soup_xmlrpc_value_get_double, soup_xmlrpc_value_get_boolean):
1849 Check return value of strtol/g_ascii_strtod correctly. #344222,
1850 patch from Brent Smith.
1852 2006-06-07 Dan Winship <danw@novell.com>
1854 * libsoup/soup-xmlrpc-response.c
1855 (soup_xmlrpc_response_from_string): record whether or not the
1856 response was a fault.
1857 (soup_xmlrpc_response_is_fault): test that. #343973, patch from
1860 2006-05-29 Dan Winship <danw@novell.com>
1862 * configure.in: 2.2.93
1866 2006-05-29 Dan Winship <danw@novell.com>
1868 * libsoup/soup-message-io.c (SoupMessageIOState): add a new state
1869 "FINISHING" which means "done I/O, but not yet done processing and
1870 cleanup" before "DONE" (which now always means "completely done").
1871 (soup_message_io_stop): disconnect the socket if the read state is
1872 "< FINISHING", not "!= DONE".
1873 (io_error): on an EOF-that-signals-end-of-data, set state to
1874 FINISHING and run io_read().
1875 (io_read, io_write): remove the g_return_if_fails from before.
1876 s/DONE/FINISHING/ in most places. In the FINISHING handler, stop
1877 listening for the readable/writable signal (eg, so we don't end up
1878 reading a following pipelined request), and set the state to DONE.
1879 (soup_message_io_unpause): Only reconnect the readable/writable
1880 signals if the io state isn't DONE. Guard the calls to
1881 io_read/io_write better so that it's safe to call this even after
1882 they are both DONE, since it may be easier for us to test that
1883 than for the caller to.
1885 Fixes 334469, 342640, and another bug caused by the earlier
1886 workaround to 334469. Based on patches and analysis from William
1887 Jon McCann and Armin Bauer.
1889 * tests/simple-proxy.c (main): add g_thread_init (NULL) to make
1890 this work again. (Pointed out by Alex Larsson)
1892 2006-05-26 Dan Winship <danw@novell.com>
1894 * libsoup/soup-socket.c: #include <sys/time.h> for struct timeval.
1897 * libsoup/soup-connection.c (soup_connection_connect_sync): Start
1898 SSL after CONNECTing! Doh. Part of bnc #174255.
1899 (SoupConnectionMode): new enum for the three types of
1900 SoupConnection (direct, proxy, tunnel).
1901 (set_property): set priv->mode according to proxy_uri and
1903 (socket_connect_result, soup_connection_connect_sync): use
1904 priv->mode to decide whether or not to tunnel.
1905 (send_request): Only pass TRUE for is_proxy to
1906 soup_message_send_request if mode is PROXY, not if it's TUNNEL.
1907 (Also part of bnc #174255).
1909 2006-05-26 Dan Winship <danw@novell.com>
1911 * libsoup/soup-message-io.c (soup_message_io_in_progress): tests
1912 if IO is currently in progress on a message.
1914 * libsoup/soup-session-async.c (run_queue): don't process messages
1915 that are io_in_progress. #342545, fix based on analysis from Wang
1916 Xin. (In the future we may want to re-fix this by adding a
1917 REQUEUED message status separate from QUEUED.)
1919 2006-05-22 Dan Winship <danw@novell.com>
1921 * libsoup/soup-session.c (cleanup_hosts): Don't free the hosts
1922 while holding host_lock; that's not allowed and can cause
1923 deadlock. #309867. Based on a patch from Veerapuram Varadhan for
1924 part of bnc #174255.
1926 2006-04-10 Dan Winship <danw@novell.com>
1928 * configure.in: bump version to 2.2.92
1932 2006-04-10 Dan Winship <danw@novell.com>
1934 * libsoup/soup-message-io.c (io_write, io_read): g_return_if_fail
1935 if these get called after the IO is done. This isn't supposed to
1936 happen, but apparently does. Workaround for #334469.
1938 * libsoup/soup-auth-digest.c (qop_types, algorithm_types):
1939 NULL-terminate these so we don't crash when trying to parse an
1940 invalid value. (Flip side of the previous #328615 patch.)
1942 2006-04-02 Dan Winship <danw@novell.com>
1944 * libsoup/soup-server-auth.c (soup_server_auth_context_challenge):
1945 Write out correct digest algorithm value. #328615.
1947 * libsoup/soup-headers.c (soup_headers_parse_request): Rewrite
1948 Request-Line-parsing code to not have a lame max length. #335040.
1950 * Makefile.am (install-data-local): Install the .pc file mode 644,
1953 * libsoup/soup-auth-digest.c:
1954 * libsoup/soup-auth.c:
1955 * libsoup/soup-message-client-io.c:
1956 * libsoup/soup-message-server-io.c:
1957 * libsoup/soup-message.c:
1958 * libsoup/soup-method.c:
1959 * libsoup/soup-server-auth.c:
1960 * tests/get.c: replace locale-ish strcasecmps with
1963 * libsoup/*.c: fix most signed/unsigned mismatch warnings
1965 2006-03-03 Dan Winship <danw@novell.com>
1967 * configure.in: bump version to 2.2.91.
1971 2006-03-03 Dan Winship <danw@novell.com>
1973 * libsoup/soup-dns.c (soup_dns_lookup_resolve_async): Take a
1974 GMainContext as well, and update the resolution code to dispatch
1975 each lookup result in the correct context.
1977 * libsoup/soup-address.c (soup_address_resolve_async_full): New
1978 method that takes a GMainContext to pass to
1979 soup_dns_lookup_resolve_async.
1981 * libsoup/soup-socket.c (soup_socket_connect): Use
1982 soup_address_resolve_async_full. Fixes a problem reported by Armin
1985 * configure.in: update to require glib 2.6, since apparently the
1988 2006-02-25 Veerapuram Varadhan <vvaradhan@novell.com>
1990 * libsoup/soup-connection.c:
1991 * libsoup/soup-session.c:
1992 * libsoup/soup-socket.c: add a "timeout" property,
1993 which gets passed from server to socket, and session to connection
1994 to socket, allowing blocking non-responsive sync connections to
1995 return. Combination of "EAGAIN" && "Blocking" connection is treated
1996 as error and the connection will be terminated and the control
1997 is returned to the caller immediately.
1999 2006-02-02 Tor Lillqvist <tml@novell.com>
2001 * configure.in: Don't use getaddrinfo() etc or try to support IPv6
2002 on Windows, as they are present by default on XP only. We do want
2003 to support Windows 2000, too.
2005 2005-12-21 Dan Winship <danw@novell.com>
2007 * libsoup/soup-date.c (soup_date_iso8601_parse): fix two bugs in
2010 * tests/date.c: add three more ISO 8601 cases, to exercise all the
2013 #324671, from Emmanuele Bassi
2015 2005-11-25 Dan Winship <danw@novell.com>
2017 * README: sync to text on wiki, and point to wiki
2019 * TODO: moved to http://live.gnome.org/LibSoup_2fToDo
2021 2005-11-17 Dan Winship <danw@novell.com>
2023 * libsoup/soup-message-io.c (io_cleanup): clear priv->io_data
2024 right away, to protect against this being re-entered mid-cleanup
2025 (when we unref the connection). #321208, based on a patch from
2028 2005-11-16 Dan Winship <danw@novell.com>
2030 * libsoup/soup-xmlrpc-message.c
2031 (soup_xmlrpc_message_start_member): add the "name" element to the
2032 struct member. #321362, patch from Sebastian Bauer.
2034 2005-11-10 Dan Winship <danw@novell.com>
2036 * configure.in: bump version to 2.2.90. This will not be
2037 officially released, but once these patches have gotten some
2038 testing they may be pulled up to the gnome-2-12 branch.
2040 * libsoup/soup-connection.c:
2041 * libsoup/soup-server.c:
2042 * libsoup/soup-session.c:
2043 * libsoup/soup-socket.c: add an "async-context" property,
2044 which gets passed from server to socket, and session to connection
2045 to socket, allowing async usage outside the main thread. Based on
2046 patches from Armin Bauer and Jürg Billeter.
2048 * libsoup/soup-misc.c (soup_add_io_watch, soup_add_idle,
2049 soup_add_timeout): utility routines to add watches, idles, and
2050 timeouts to non-default GMainContexts.
2052 * libsoup/soup-message-io.c (io_write): set the read state
2053 appropriately after writing a "100 Continue" response
2054 (io_read): More 100-Continue stuff. I don't think this is quite
2055 right so it will probably change again later.
2057 2005-11-01 Dan Winship <danw@novell.com>
2059 * docs/reference/libsoup-docs.sgml: tell it to generate an index
2061 * docs/reference/tmpl/*.sgml: regen with newer gtk-doc
2063 2005-11-01 Dan Winship <danw@novell.com>
2065 * libsoup/soup-connection.c (set_current_request,
2066 clear_current_request): Cast the argument to
2067 g_object_add/remove_weak_pointer to the wrong type, to make gcc
2068 4.1 happy, because C is stupid and "void **" means "a pointer to a
2069 void *", not "a pointer to any kind of pointer".
2071 * libsoup/soup-xmlrpc-response.c
2072 (soup_xmlrpc_value_dump_internal): fix gccism. #320349, from
2075 2005-10-27 Dan Winship <danw@novell.com>
2077 * libsoup/soup-socket.c (soup_socket_client_new_async,
2078 soup_socket_client_new_sync): unref the SoupAddress passed to
2079 soup_socket_connect to avoid a leak. Based on a patch from Wang
2081 (socket_read_watch, read_from_network, socket_write_watch,
2082 soup_socket_write): request and handle G_IO_ERR and G_IO_HUP
2083 events when polling, since poll() will return them whether or not
2084 you asked for them, but glib will ignore them unless you did,
2085 which will result in CPU suckage if such an error occurs. #319305,
2086 patch from Jonathan Matthew.
2088 2005-10-27 Dan Winship <danw@novell.com>
2090 bgo #316313 / bnc #116762, and probably also bgo #318252
2092 * libsoup/soup-message-io.c (soup_message_io_stop): clear io->conn
2093 after releasing it, to make sure we can't accidentally release it
2096 * libsoup/soup-connection.c (clear_current_request): Call
2097 soup_message_io_stop() on the cleared request.
2099 * libsoup/soup-connection-ntlm.c (ntlm_authorize_post): do a
2100 little dance here to make sure the session can't queue another
2101 message on the connection while we're in the process of requeuing
2104 2005-08-30 Tor Lillqvist <tml@novell.com>
2106 * libsoup-zip.in: Include documentation in developer zipfile.
2108 2005-08-22 Dan Winship <danw@novell.com>
2110 * libsoup/soup-soap-message.c (soup_soap_message_class_init): Call
2111 g_type_class_add_private.
2113 * configure.in: Bump to 2.2.6.1
2117 2005-08-22 Dan Winship <danw@novell.com>
2119 * configure.in: Bump to 2.2.6. Bump SOUP_AGE and SOUP_CURRENT for
2120 soup_server_get_socket() addition.
2124 2005-08-22 Dan Winship <danw@novell.com>
2126 * libsoup/soup-connection.c (set_current_request,
2127 clear_current_request): Fix g_object_add/remove_weak_pointer usage
2128 to prevent a crash when canceling a request. From Tambet.
2130 2005-08-16 Dan Winship <danw@novell.com>
2132 Fix a connection leak reported by Tambet.
2134 * libsoup/soup-connection.c (send_request): rather than tracking
2135 the message progress via signals, call
2136 soup_message_send_request_internal() and have it call
2137 soup_connection_release() when it's done.
2138 (request_restarted, request_done): gone
2139 (clear_current_request): handle disconnecting (if necessary) and
2140 updating last_used time here.
2141 (soup_connection_release): Call clear_current_request().
2142 (dispose): Call clear_current_request()
2144 * libsoup/soup-message-client-io.c
2145 (soup_message_send_request_internal): New. Takes a SoupConnection
2146 in addition to the other args, and passes that on to
2149 * libsoup/soup-message-io.c (SoupMessageIOData): add a
2150 SoupConnection field.
2151 (io_cleanup): if io->conn is set, unref it.
2152 (soup_message_io_stop): if io->conn is set, and we ended in a
2153 clean state, call soup_connection_release() on it.
2154 (soup_message_io_client): Add a SoupConnection arg, which gets
2155 reffed and stored in io->conn.
2157 * TODO: misc updates
2159 2005-08-15 Dan Winship <danw@novell.com>
2161 * libsoup/soup-connection.h (soup_connection_new):
2162 * libsoup/soup-server.h (soup_server_new):
2163 * libsoup/soup-session-async.h (soup_session_async_new_with_options):
2164 * libsoup/soup-session-sync.h (soup_session_sync_new_with_options):
2165 * libsoup/soup-socket.h (soup_socket_new): use G_GNUC_NULL_TERMINATED.
2167 * libsoup/soup-types.h (G_GNUC_NULL_TERMINATED): steal the
2168 definition of this from glib 2.8 for use when compiling against
2171 2005-08-15 Tambet Ingo <tambet@ximian.com>
2173 * libsoup/soup-socket.c (update_fdflags, set_property): Fix compilation
2176 * libsoup/soup-server.c (soup_server_get_listener): ditto.
2178 2005-08-12 Dan Winship <danw@novell.com>
2180 * libsoup/soup-server.c (soup_server_get_listener): new method to
2181 get the server's listening socket.
2183 * libsoup/soup-socket.c: add a new "cloexec" property, to set
2184 FD_CLOEXEC on the socket. Update everything for that.
2186 2005-08-05 Dan Winship <danw@novell.com>
2188 * libsoup/soup-socket.c (finalize): Free priv->read_buf. From
2190 (soup_socket_connect): Make sure that get_iochannel() gets called
2191 if the connect succeeds right away, or the socket will fail on
2192 the first read or write. [#312540]
2194 2005-08-01 Dan Winship <danw@novell.com>
2196 * configure.in: drop version back down to 2.2.5 and
2197 SOUP_API_VERSION back to 2.2; due to various snafus, there has
2198 never yet been an official release of the 2.4 API and the GNOME
2199 2.12 betas have been shipping with libsoup 2.2 tarballs (while
2200 jhbuild has been using 2.4, with evolution and related packages
2201 having configure hacks to build against either). As there never
2202 ended up being any API-incompatible changes in the 2.4 series, we
2203 can just merge it back into the 2.2 series and kill off 2.4.
2205 * NEWS: Copy in the 2.2-series news from the gnome-2-10 branch,
2208 * libsoup-zip.in: s/2.2/@SOUP_API_VERSION@/
2210 * libsoup/Makefile.am (libsoupincludedir, lib_LTLIBRARIES,
2211 libsoup_2_2_la_LDFLAGS, libsoup_2_2_la_LIBADD,
2212 libsoup_2_2_la_SOURCES): s/4/2/ in all the places automake won't
2213 let us use a variable.
2215 2005-08-01 Dan Winship <danw@novell.com>
2217 * libsoup/soup-md5-utils.c (soup_md5_final_hex): Finalize a
2218 SoupMD5Context and write out the digest in hex digits.
2220 * libsoup/soup-auth-digest.c (authenticate, compute_response):
2221 * libsoup/soup-server-auth.c (check_digest_passwd): Use that,
2222 rather than duplicating the code in both places here.
2224 Patch from Wim Lewis.
2226 2005-07-15 Dan Winship <danw@novell.com>
2228 * libsoup/soup-session.c (redirect_handler): Allow relative URIs,
2229 since some servers are lame. Based on a patch from Jean-Yves
2232 * tests/uri-parsing.c: add some more tests to make sure that
2233 things that should be %-escaped do get %-escaped
2235 2005-07-06 Tor Lillqvist <tml@novell.com>
2237 * libsoup/soup-date.c (soup_gmtime): Mention in the doc comment
2238 that gmtime() is thread-safe on Windows.
2239 (soup_date_generate): Use soup_gmtime() instead of gmtime_r().
2241 2005-06-14 Dan Winship <danw@novell.com>
2243 * configure.in: check for gmtime_r
2245 * libsoup/soup-date.c: date/time-manipulation functions
2247 * libsoup/soup-xmlrpc-message.c:
2248 * libsoup/soup-xmlrpc-response.c: XMLRPC message classes, from
2249 Mariano Suarez-Alvarez, Fernando Herrera, and Jeff Bailey.
2252 * tests/date.c: soup-date test code
2254 * tests/getbug.c: XMLRPC test code. (Should be switched to use
2255 bugzilla.gnome.org once bgo supports XMLRPC.)
2257 * TODO: XMLRPC is implemented now (but shares the problem with
2258 SOAP that the API is not very good).
2260 2005-06-14 Dan Winship <danw@novell.com>
2262 * libsoup/*.[ch]: add/fix gtk-doc comments, make functions match
2265 * docs/reference/*: update, fix, etc
2267 2005-06-13 Tor Lillqvist <tml@novell.com>
2269 * configure.in: Check also for inet_ntop(). Pre-cache knowledge
2270 that we do have inet_pton() and inet_ntop() on Windows (because we
2271 implement them ourselves in soup-dns.c).
2273 * libsoup/soup-dns.c (inet_pton, inet_ntop): Fix the Win32
2274 implementations, they were completely bogus.
2275 (soup_dns_ntop): Make it compile if HAVE_INET_NTOP.
2277 2005-06-08 Dan Winship <danw@novell.com>
2279 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Fix this to
2280 use just the domain name for the domain, not the whole
2281 DOMAIN\username. Based on a patch by Jeroen Hautekeete in #306877.
2283 2005-05-26 Dan Winship <danw@novell.com>
2285 * libsoup/soup-session.c (cleanup_hosts): lock host_lock around
2286 this, since it can be called from set_property(). Possible fix for
2289 2005-05-05 Dan Winship <danw@novell.com>
2291 * docs/reference/Makefile.am (SCANGOBJ_OPTIONS): Use
2292 --type-init-func to force g_thread_init to be called. [#302674]
2294 2005-04-18 Tor Lillqvist <tml@novell.com>
2296 * configure.in: Call AC_LIBTOOL_WIN32_DLL. Check for Win32, set
2297 Automake conditional OS_WIN32. Pre-cache information that we do
2298 have getaddrinfo(), getnameinfo(), and IPv6 on Win32. (The tests
2299 wouldn't notice as they don't include the necessary headers or
2300 link with -lws2_32. Easiest to just pre-cache it.)
2302 * libsoup-zip.in: New file, to build zipfile-based distribution of
2305 * Makefile.am (EXTRA_DIST)
2306 * configure.in (AC_OUTPUT): Add libsoup-zip(.in).
2308 * libsoup/Makefile.am: Use -no-undefined on Win32. Link with
2309 WinSock library -lws2_32.
2311 * libsoup/soup-portability.h: New file. On Unix it includes the
2312 traditional BSD socket etc headers. On Win32 it includes
2313 winsock2.h and ws2tcpip.h.
2316 * libsoup/*.h: Correspondingly, don't include the BSD socket API
2319 * libsoup/soup-address.h
2320 * libsoup/soup-dns.h: Include soup-portability.h
2322 * libsoup/soup-address.c (soup_address_class_init): This function
2323 should get called before libsoup uses the WinSock API, so this is
2324 a good place to call WSAStartup().
2326 * libsoup/soup-auth-digest.c (get_protection_space): Use
2327 g_strsplit() instead of the relatively unportable strtok_r().
2329 * libsoup/soun-dns.c: Remove unused headers. Implement
2330 inet_pton() and inet_ntop() on Win32 using WSAStringToAddress()
2331 and WSAAddressToString().
2333 * libsoup/soup-socket.c (SOUP_CLOSE_SOCKET, SOUP_IS_SOCKET_ERROR,
2334 SOUP_IS_INVALID_SOCKET, SOUP_IS_CONNECT_STATUS_INPROGRESS):
2336 (soup_socket_class_init): Call soup_address_get_type() to make
2337 sure WSAStartup() gets called (through soup_address_class_init()).
2338 (update_fdflags): Use ioctlsocket(FIONBIO) on Win32.
2339 (soup_socket_write): Conditionalize SIGPIPE use.
2341 * tests/get.c: mkdir() is different in Microsoft's C library.
2343 * tests/simple-httpd.c: Rename TRY_AGAIN label to AGAIN to avoid
2344 some clash with winsock2.h (which includes windows.h). The Win32
2345 headers pollute the namespace wildly.
2347 2005-04-15 Dan Winship <danw@novell.com>
2349 * libsoup/soup-dns.c (resolve_name): make this work with
2350 pre-EAI_OVERFLOW glibc [#300620]
2352 2005-04-12 Dan Winship <danw@novell.com>
2354 * configure.in: Remove the various gethostbyname_r checks and just
2355 check for getnameinfo/getaddrinfo.
2357 * libsoup/soup-dns.c: de-nastify. Make this use threads instead of
2358 forking. Change the API around a bunch in the process.
2360 * libsoup/soup-address.c: Update for soup-dns changes
2362 * tests/dns.c: take multiple hostnames on the command line and
2363 resolve them all at once (patch from tml)
2365 2005-04-11 Dan Winship <danw@novell.com>
2367 * configure.in: require glib-2.0 >= 2.4.0
2369 * libsoup/*.c: use G_DEFINE_TYPE and
2370 g_type_class_add_private/G_TYPE_INSTANCE_GET_PRIVATE
2372 * libsoup/soup-types.h: kill SOUP_MAKE_TYPE and
2373 SOUP_MAKE_TYPE_WITH_IFACE
2375 * tests/revserver.c: use GThread. (patch from tml)
2377 2005-04-11 Dan Winship <danw@novell.com>
2379 * configure.in: bump version to 2.3.0. bump SOUP_API_VERSION to
2382 * libsoup.pc.in: rename from libsoup-2.2.pc.in
2384 * Makefile.am (EXTRA_DIST, pkgconfig_DATA, install-data-local):
2385 install the .pc file by hand, renaming it to include the
2388 * libsoup/Makefile.am: s/2.2/2.4/
2390 2005-03-09 Dan Winship <danw@novell.com>
2392 * libsoup/soup-gnutls.c (soup_gnutls_read): return G_IO_STATUS_EOF
2393 if gnutls returns 0. [#73352]
2394 (verify_certificate): put an #ifdef around
2395 GNUTLS_CERT_NOT_TRUSTED so it works with gnutls 1.2.x. [#57811]
2397 2005-01-08 Not Zed <NotZed@Ximian.com>
2399 ** See ximian bug #70323.
2401 * libsoup/soup-connection-ntlm.c: replace all unsigned long/long
2402 types with guint32, as the code needs 32 bit longs.
2404 2004-10-20 Dan Winship <danw@novell.com>
2406 * libsoup/soup-gnutls.c: Commit the alleged changes from the 10-06
2407 commit, which somehow did not actually get committed then.
2409 * libsoup/soup-connection.c (SoupConnectionPrivate): add a flag
2410 indicating whether or not the connection is connected.
2411 (tunnel_connect_finished): If successful, set connected. If the
2412 server returns a 3xx response, translate it to 407 (under the
2413 assumption that it's trying to redirect us to an HTML login page,
2414 as in bug 68531). Use soup_socket_start_proxy_ssl() rather than
2415 soup_socket_start_ssl().
2416 (socket_connect_result, soup_connection_connect_sync): If
2417 successful, set connected
2418 (soup_connection_disconnect): Don't emit "disconnected" if we
2419 aren't yet connected, or the message that was waiting for this
2420 connection may get stranded in the queue. (also part of 68531)
2422 * libsoup/soup-socket.c (soup_socket_start_proxy_ssl): New, starts
2423 SSL and lets the caller pass the expected hostname. Fixes a
2424 problem where SSL certification validation would always fail if
2425 you used a proxy, because it was comparing the cert against the
2426 proxy's hostname. (68583)
2428 2004-10-06 Dan Winship <danw@novell.com>
2430 * libsoup/soup-ssl.h (SoupSocketError): add
2431 SOUP_SSL_ERROR_CERTIFICATE.
2433 * libsoup/soup-gnutls.c (do_handshake): Pass the GError to
2435 (verify_certificate): Set the GError appropriately rather than
2438 * libsoup/soup-socket.c (read_from_network, soup_socket_write): If
2439 the GIOChannel operation returns an error, store it as GOBject
2440 data on the socket (as a hack so soup-message-io.c can access it
2441 without us needing to change SoupSocket's API).
2443 * libsoup/soup-message-io.c (io_error): peek at the socket's
2444 "last_error" datum and set the message's status to SSL_FAILED
2445 (with the GError's message string) rather than IO_ERROR, if
2446 appropriate. For 64414.
2448 2004-09-30 Dan Winship <danw@novell.com>
2450 * libsoup/soup-gnutls.c (soup_gnutls_init): Add this, with some
2451 extra initialization needed for libgcrypt 1.2 or higher. Fixes
2453 (soup_ssl_get_client_credentials,
2454 soup_ssl_get_server_credentials): Call soup_gnutls_init().
2456 2004-08-26 Dan Winship <danw@novell.com>
2458 * configure.in: Bump version to 2.2.0.
2460 * AUTHORS: Update this to reflect the last 2 years.
2462 * NEWS: Brief summary of 1.99.x -> 2.2 changes
2464 * README, TODO: Updates
2466 2004-08-26 Dan Winship <danw@novell.com>
2468 * libsoup/*: add/fix lots of gtk-doc comments
2470 * libsoup/soup-misc.c (soup_str_case_hash, soup_str_case_equal):
2471 Fix bug noticed while documenting. (We were using the
2472 locale-case-insensitive functions rather than the g_ascii_ ones.)
2474 * libsoup/soup-message.h (SoupMessageFlags): remove the (never
2475 implemented) NO_PIPELINE and NO_COOKIE flags.
2477 * docs/reference/tmpl/*.sgml: Regenerate, fill in some stuff.
2478 There are still problems here with gtk-doc not recognizing many of
2479 the objects in libsoup...
2481 2004-08-13 JP Rosevear <jpr@novell.com>
2483 * configure.in: bump version, libtool number
2485 2004-08-09 Dan Winship <danw@novell.com>
2487 * libsoup/soup-connection.c (soup_connection_connect_sync): Don't
2488 use conn after emitting the "connect_result" signal, since it
2489 might be destroyed by that. Based on a patch from hpj.
2491 2004-08-02 Dan Winship <danw@novell.com>
2493 * libsoup/soup-uri.h: Add flag "broken_encoding" to SoupUri.
2495 * libsoup/soup-uri.c: (soup_uri_to_string): if broken_encoding is
2496 set, don't re-encode the URL parts. Based on a patch by
2497 Alfred.Peng@Sun.COM.
2499 2004-07-19 JP Rosevear <jpr@novell.com>
2501 * configure.in: bump version, libtool number
2503 2004-07-15 Dan Winship <danw@novell.com>
2505 * libsoup/soup-session-sync.c (send_message): Simplify this. If
2506 the message comes back from soup_connection_send_request not
2507 FINISHED, get a new connection rather than reusing the old one.
2508 This fixes a race condition in which a connection could end up
2509 double-booked, and fixes the handling of messages that get
2510 redirected to another server.
2512 2004-07-13 Dan Winship <danw@novell.com>
2514 * libsoup/soup-session.c (connect_result): If the connection
2515 attempt succeeded, reserve the connection before releasing
2516 host_lock. Otherwise, another thread might find it in the
2517 connection pool before the caller can queue a message on it.
2520 * libsoup/soup-session-async.c (got_connection): Call
2521 soup_connection_release(), since we don't have a specific message
2522 in mind for the connection, so we need it to be considered idle.
2524 * libsoup/soup-connection.c (soup_connection_release): New
2525 function, to undo a soup_connection_reserve().
2526 (soup_connection_send_request, soup_connection_reserve,
2527 soup_connection_authenticate, soup_connection_reauthenticate):
2530 2004-07-12 Dan Winship <danw@novell.com>
2532 * libsoup/soup-session-sync.c (send_message): signal the
2533 "connections available" condition after the message finishes. Duh.
2535 * libsoup-2.2.pc.in (Cflags, Libs): add XML_CFLAGS and XML_LIBS
2537 2004-07-08 Dan Winship <danw@novell.com>
2539 * libsoup/soup-soap-response.c: Revert previous change for now; it
2540 breaks the build on distros with older libxmls.
2542 2004-07-08 Dan Winship <danw@novell.com>
2544 * tests/dict.c: Basic SOAP test, using Aonaware's SOAP->DICT
2547 2004-07-07 Fernando Herrera <fherrera@onirica.com>
2549 * libsoup/soup-soap-response.c: (finalize), (init),
2550 (soup_soap_response_from_string): Use a parse context for the
2551 xml document, so we can safely use the option to ignore
2552 blank spaces and '\n'.
2554 2004-07-06 Dan Winship <danw@novell.com>
2556 * libsoup/soup-uri.c (soup_uri_new_with_base): if the protocol is
2557 http or https, require a hostname. For #61049
2559 * tests/uri-parsing.c (rel_tests, do_uri): Update for that
2561 2004-06-03 JP Rosevear <jpr@novell.com>
2563 * configure.in: bump version to 2.1.11, libtool number
2565 2004-06-01 Dan Winship <danw@novell.com>
2567 * libsoup/soup-address.c: Redo the various IPv4/IPv6-abstracting
2568 macros to not use ?: expressions as lvalues, since that's
2569 apparently a GNU extension.
2570 (soup_address_resolve_async): Use a timeout rather than an idle
2571 handler to poll the dns result. (soup-dns really should be
2572 rewritten to not require polling, but this is easier for now.)
2575 * libsoup/soup-server.c (call_handler): Don't use GNU-only
2576 non-constant structure initialization
2578 * tests/dns.c: Simple test of the dns code
2580 * tests/Makefile.am (noinst_PROGRAMS): build it
2582 2004-05-19 JP Rosevear <jpr@novell.com>
2584 * configure.in (SOUP_API_VERSION): bump version, libtool numbers
2586 2004-05-18 Dan Winship <danw@novell.com>
2588 * libsoup/soup-ssl.h:
2589 * libsoup/soup-nossl.c: define some GError codes and stuff
2591 * libsoup/soup-gnutls.c: add missing #include <gnutls/x509.h>
2592 (do_handshake): when returning G_IO_STATUS_AGAIN, set the GError
2593 to SOUP_SSL_ERROR_HANDSHAKE_NEEDS_READ or _NEEDS_WRITE
2596 * libsoup/soup-socket.c (soup_socket_write): Handle
2597 SOUP_SSL_ERROR_HANDSHAKE_NEEDS_READ, by setting an io watch for
2598 G_IO_IN instead of G_IO_OUT. Fixes the rcd-sucking-up-all-cpu bug
2600 (read_from_network): Handle the reverse case (which would cause
2601 hanging rather than spinning, and might be the cause of some
2602 connector 1.5 slowness?)
2604 2004-05-11 Dan Winship <danw@novell.com>
2606 * libsoup/soup-misc.c (soup_signal_connect_once): Do this less
2607 kludgefully, using the magic of GClosure, to fix x86_64 problems
2610 2004-05-04 Sivaiah Nallagatla <snallagatla@novell.com>
2612 * libsoup/soup-soap-message.c (finalize) : free
2613 the elements of priv structure before freeing priv
2615 2004-04-20 Dan Winship <danw@ximian.com>
2617 * libsoup/soup-connection-ntlm.c (ntlm_authorize_post): if
2618 re-sending the message, call soup_message_restarted()
2619 (send_request): Connect to "restarted" signal, and remove the 401
2620 handlers from there; doing it here didn't work because if the
2621 connection was closed, the message would be re-sent on a new
2622 connection, but would still have the handlers from the old
2623 connection attached to it, which would make authentication fail.
2625 * libsoup/soup-message-handlers.c (soup_message_run_handlers):
2626 Copy the handler list before starting, to protect against handlers
2627 that modify the handler list.
2629 2004-04-15 Dan Winship <danw@ximian.com>
2631 * libsoup/soup-connection.c (soup_connection_connect_sync):
2632 Connect to the socket's "disconnect" signal. (We were only doing
2633 this from the async version before, which meant that synchronous
2634 SoupConnections could outlive their sockets and start causing
2637 * libsoup/soup-connection-ntlm.c (send_request): Remove the old
2638 Authorization header before adding a new one.
2640 2004-04-02 JP Rosevear <jpr@ximian.com>
2642 * configure.in: bump version, libtool number
2644 2004-03-15 Dan Winship <danw@ximian.com>
2646 * libsoup/soup-soap-message.c (soup_soap_message_persist): Fix up
2647 types to kill a warning with -Wall -O2
2649 2004-03-05 JP Rosevear <jpr@ximian.com>
2651 * configure.in: bump version, libtool number
2653 2004-03-02 Dan Winship <danw@ximian.com>
2655 * libsoup/soup-dns.c (check_hostent): Only loop on EINTR if
2656 bytes_read is -1, since the value of errno is irrelevant when
2657 bytes_read is 0. Probably #54960.
2659 2004-03-01 Rodrigo Moya <rodrigo@ximian.com>
2661 * libsoup/soup-soap-response.h: removed not-implemented function's
2664 2004-02-27 Rodney Dawes <dobey@ximian.com>
2667 * libsoup/Makefile.am: Use a different variable for linking to the
2668 static version of gnutls, so we don't pull the .a files into the .pc
2672 2004-02-20 Dan Winship <danw@ximian.com>
2674 * libsoup/soup-message-io.c (read_metadata, read_body_chunk,
2675 write_data): Pass gsize *, not guint *, to soup_socket_read/write,
2676 to make this work on 64-bit platforms. (Grr. C type checking
2679 * tests/revserver.c: Likewise
2681 2004-02-18 Rodrigo Moya <rodrigo@ximian.com>
2685 * libsoup/soup-soap-response.c (soup_soap_parameter_get_int_value):
2686 don't leak the value returned from xmlNodeGetContent().
2687 (soup_soap_parameter_get_string_value,
2688 soup_soap_parameter_get_property): return a g_strdup'ed
2689 string, not the value returned by xmlNodeGetContent, so that
2690 callers can use g_free, and not xmlFree.
2692 * libsoup/soup-soap-response.h: made soup_parameter_get_property
2695 2004-02-17 Dan Winship <danw@ximian.com>
2697 * libsoup/soup-soap-message.h (SOUP_IS_SOAP_MESSAGE_CLASS): Fix a
2698 typo. #54433, from Mariano Suarez-Alvarez.
2700 * libsoup/soup-soap-response.h (SOUP_IS_SOAP_RESPONSE_CLASS):
2703 2004-02-17 Rodney Dawes <dobey@ximian.com>
2705 * libsoup/soup-message.c (soup_message_new): HTTP connections require
2706 a hostname, and we also hash on the host for message queueing in the
2707 session, if the host is NULL we free the SoupUri and return NULL
2709 2004-02-14 Dan Winship <danw@ximian.com>
2711 * configure.in: Use POSIX-compliant "test $foo = bar", rather than
2712 GNU-only "test $foo == bar". #54354, from Julio M. Merino Vidal.
2714 2004-02-12 Joe Shaw <joe@ximian.com>
2716 * libsoup/soup-dns.c (check_hostent): Call read() in a do-while
2717 loop to prevent DNS errors from short reads.
2719 2004-02-11 Joe Shaw <joe@ximian.com>
2721 * configure.in: Bumped version number to 2.1.7 and libtool
2724 2004-02-11 Dan Winship <danw@ximian.com>
2726 * libsoup/soup-connection.c (soup_connection_disconnect): Update
2727 Joe's comment here with a gory explanation of exactly what's going
2728 on. (It's not just an SSL bug either, it affects all connections.)
2730 2004-02-10 Joe Shaw <joe@ximian.com>
2732 * libsoup/soup-connection.c (soup_connection_disconnect): Add a
2733 workaround for SSL connections which time-out but don't close the
2734 socket until we try sending data again later.
2736 * libsoup/soup-socket.c (soup_socket_connect, soup_socket_listen):
2737 Don't free the sockaddr from soup_address_get_sockaddr(); we don't
2738 own it, the SoupAddress does.
2740 2004-02-09 JP Rosevear <jpr@ximian.com>
2742 * configure.in: Bump libtool numbers
2744 2004-02-05 Dan Winship <danw@ximian.com>
2746 * libsoup/soup-session.c (soup_session_add_filter): Ref the filter
2748 (soup_session_remove_filter): And unref it here (we were already
2749 unreffing it in dispose().)
2751 2004-02-05 Joe Shaw <joe@ximian.com>
2753 * libsoup/soup-dns.c (soup_dns_entry_unref): Don't try to free the
2754 hostent if it's NULL.
2755 (soup_dns_entry_check_lookup): If the entry is resolved, but the
2756 hostent is NULL, uncache it.
2758 2004-02-04 Dan Winship <danw@ximian.com>
2760 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Always
2761 remove the WWW-Authenticate headers before returning, so the
2762 session won't fall back to Basic auth. Also, leave the connection
2763 in the "authenticating" state rather than setting it to
2765 (ntlm_authorize_post): Only requeue the message if it's in the
2766 "authenticating" state (and set it to "authenticated"). Fixes an
2767 "unepectedly disconnected" error if authentication fails.
2769 2004-02-03 Dan Winship <danw@ximian.com>
2771 * libsoup/soup-message-io.c (io_cleanup): Call
2772 soup_message_io_stop so we don't get a callback on the io after
2773 it's been cleaned up.
2775 * libsoup/soup-session.c (add_auth): Only remove the Authorization
2776 header if we have another one to add. (Otherwise it messes up
2777 SoupConnectionNTLM.)
2779 * libsoup/soup-socket.c (read_from_buf): Use memmove rather than
2780 memcpy here, since the source and destination will overlap if
2781 *nread is small and read_buf->len is large. (Noticed by valgrind,
2784 2004-02-02 Joe Shaw <joe@ximian.com>
2786 * libsoup/soup-gnutls.c (soup_gnutls_close): Call gnutls_bye()
2787 with the GNUTLS_SHUT_WR flag (instead of RDWR) and check only for
2788 GNUTLS_E_INTERRUPTED. GNUTLS_E_AGAIN will be returned by recv()
2789 when there are no messages on the wire on a non-blocking socket.
2790 This sends a SSL hangup message and then allows us to immediately
2793 2004-01-30 Rodrigo Moya <rodrigo@ximian.com>
2795 * configure.in: bumped version number to 2.1.6.
2797 2004-01-29 Rodrigo Moya <rodrigo@ximian.com>
2799 * libsoup/soup-soap-response.[ch] (soup_soap_parameter_get_property):
2802 2004-01-29 Rodrigo Moya <rodrigo@ximian.com>
2804 * libsoup/soup-soap-response.[ch]
2805 (soup_soap_parameter_get_string_value): removed 'const' from return
2808 2004-01-29 Joe Shaw <joe@ximian.com>
2810 * libsoup/soup-gnutls.c (verify_certificate): Initialize the
2811 certificate before we try to use it. Ahem.
2813 2004-01-23 Joe Shaw <joe@ximian.com>
2815 * configure.in: Bump version to 2.1.5 and SOUP_RELEASE to 2
2817 2004-01-21 Joe Shaw <joe@ximian.com>
2819 * configure.in: Require at least GnuTLS 1.0.0.
2821 * libsoup/soup-gnutls.c: Fix the use of deprecated GnuTLS
2823 (verify_certificate): Use gnutls_x509_crt_import() and
2824 gnutls_x509_crt_check_hostname() instead of
2825 gnutls_x509_check_certificates_hostname().
2826 (init_dh_params): Use gnutls_dh_params_generate2() instead of
2827 gnutls_dh_params_generate() and gnutls_dh_params_set().
2829 2004-01-20 Joe Shaw <joe@ximian.com>
2831 * libsoup/soup-gnutls.c (soup_gnutls_close): gnutls_bye() doesn't
2832 close the socket itself, so we need to do it or else our
2833 connections stay in CLOSE_WAIT forever.
2835 2004-01-16 Jason Leach <leach@wam.umd.edu>
2837 * libsoup/Makefile.am: builddir != srcdir fixes.
2839 2004-01-14 Joe Shaw <joe@ximian.com>
2841 * libsoup/soup-gnutls.c (verify_certificate): Remove the
2842 check for GNUTLS_CERT_CORRUPTED, it's not in 1.0.x.
2844 2004-01-12 JP Rosevear <jpr@ximian.com>
2846 * configure.in: bump version and libtool revision
2848 2004-01-12 Dan Winship <danw@ximian.com>
2850 * tests/simple-httpd.c (main): Add a g_thread_init() so this works
2853 2004-01-10 Larry Ewing <lewing@ximian.com>
2855 * libsoup-2.2.pc.in (Libs): use LIBGNUTLS_LIBS in the substitution
2858 2004-01-09 Joe Shaw <joe@ximian.com>
2860 * acinclude.m4: Include the libgnutls.m4 file.
2862 * configure.in: Remove manual checking for libgnutls-config and
2863 use the AM_PATH_LIBGNUTLS so we can pass in a minimum required
2864 version, which is 0.9.7 for now.
2866 * libsoup/Makefile.am: Some changes for the above change.
2868 * libsoup/soup-gnutls.c: Check for HAVE_SSL, not
2869 HAVE_GNUTLS_GNUTLS_H.
2870 (verify_certificate): Uncomment the SSL certificate hostname
2873 * libsoup/soup-session.c (set_property): Be smart about flushing
2874 our SSL credentials only when the CA file is set to something
2875 different than it was before.
2877 2004-01-09 Harish K <kharish@novell.com>
2878 * libsoup/soup-soap-response.c (soup_soap_response_from_string):
2879 added code to ignore Header element, if present, while creating
2882 2004-01-05 Dan Winship <danw@ximian.com>
2884 * configure.in: Remove no-longer-relevant socklen_t check
2886 * libsoup/soup-address.c: Reorder #includes for FreeBSD (From Joe
2887 Marcus Clarke, #52566)
2889 * libsoup/soup-dns.c: Likewise
2891 2003-12-29 JP Rosevear <jpr@ximian.com>
2893 * configure.in: bump version and libtool numbers
2895 2003-12-22 Dan Winship <danw@ximian.com>
2897 * README, TODO: Update these
2899 2003-12-22 Dan Winship <danw@ximian.com>
2901 * libsoup/soup-socket.c: Lots of thread-safety stuff, primarly so
2902 you can disconnect a socket from one thread while doing I/O in
2905 * libsoup/soup-message-io.c (soup_message_io_cancel): Split into
2906 soup_message_io_stop() and io_cleanup(), to separate out the "stop
2907 reading/writing" and "free data" phases to allow thread-safe
2908 synchronous cancellation.
2909 (soup_message_io_finished): call both soup_message_io_stop() and
2911 (io_error): Only set SOUP_STATUS_IO_ERROR on the message if it
2912 doesn't already have a transport error status (eg, CANCELLED).
2913 (new_iostate): Call io_cleanup() if needed.
2915 * libsoup/soup-status.h: add "SOUP_STATUS_NONE" for 0, to make it
2916 clearer that it's not a status.
2918 * libsoup/soup-message.c (finalize, restarted, finished,
2919 soup_message_set_uri): s/soup_message_io_cancel/soup_message_io_stop/
2920 (soup_message_cleanup_response): s/0/SOUP_STATUS_NONE/
2922 * libsoup/soup-connection.c (send_request): Remove
2923 soup_message_io_cancel call.
2925 * libsoup/soup-session-sync.c (send_message): Connect to the
2926 connection's "disconnected" signal rather than using a weak ref,
2927 since that's what we really care about, and it's possible that the
2928 connection may have an extra ref on it somewhere that would keep
2929 it from being destroyed even if it was disconnected.
2931 2003-12-20 Joe Shaw <joe@ximian.com>
2933 * libsoup/soup-session.c (lookup_auth): If const_path is NULL un
2934 the non-proxy case, then use the root ("/").
2936 2003-12-19 Dan Winship <danw@ximian.com>
2938 * libsoup/soup-message-filter.c: New. An interface for objects
2939 that want to act on every message passing through a session.
2940 (Initially being used for authentication, but could also be used
2941 for cache handling, cookie management, etc.)
2943 * libsoup/soup-connection.c (class_init, etc): Add a message
2945 (send_request): If the connection has a message filter set, run
2946 it on the message before sending it.
2947 (soup_connection_connect_async, etc): When setting up a tunnel, if
2948 we get back a 407 and the session tries to requeue the message,
2949 either re-send it, or return SOUP_STATUS_TRY_AGAIN (depending on
2950 whether or not the proxy closed the connection).
2951 (soup_connection_connect_sync): Likewise
2952 (send_request, request_done): Ref/unref the connection
2954 * libsoup/soup-session.c (soup_session_get_type): Implement the
2955 SoupMessageFilter interface.
2956 (soup_session_get_connection): Use the session as the connection's
2958 (soup_session_add_filter, soup_session_remove_filter): Add/remove
2959 filters from the session
2960 (setup_message): do auth handling, and call each of the session's
2961 filters' setup_message methods as well.
2962 (soup_session_send_message_via): No longer needed.
2963 (connect_result): Handle SOUP_STATUS_TRY_AGAIN.
2965 * libsoup/soup-session-async.c (run_queue): Use
2966 soup_connection_send_request, since soup_session_send_message_via
2969 * libsoup/soup-session-sync.c (send_message): Likewise
2971 * libsoup/soup-message.c (soup_message_is_keepalive): A successful
2972 response to a CONNECT is always keepalive, even if it's HTTP/1.0
2973 with no Connection header.
2975 * libsoup/soup-status.h: add SOUP_STATUS_TRY_AGAIN
2977 * libsoup/soup-types.h: Add SoupMessageFilter, and macros for
2978 gobject interface types.
2980 * tests/get.c (main): Add a -p flag to specify a proxy
2982 * tests/simple-proxy.c: Fix #includes
2984 2003-12-18 Dan Winship <danw@ximian.com>
2986 * libsoup/soup-connection.c (soup_connection_disconnect): Actually
2987 disconnect the socket rather than just unreffing it, since the IO
2988 code may be holding an extra ref on it.
2989 (send_request): connect to the "restarted" signal too
2990 (request_restarted): Deal with "Connection: close"
2992 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Make this
2993 not go into an infinite loop if the server only supports Basic.
2995 2003-12-17 Rodrigo Moya <rodrigo@ximian.com>
2997 * libsoup/Makefile.am: install soup-message-queue.h with the rest
3000 2003-12-17 Dan Winship <danw@ximian.com>
3002 * configure.in: Add gthread to glib check
3004 * libsoup/soup-session.c: Make this an abstract class.
3006 * libsoup/soup-session-async.c: A SoupSession class for
3007 asynchronous gmain-based operation; replaces the old SoupSession.
3009 * libsoup/soup-session-sync.c: A SoupSession class for synchronous
3010 blocking operation for use with threaded apps.
3012 * libsoup/soup-types.h, libsoup/soup.h: add the new session
3015 * libsoup/soup-connection.c (soup_connection_connect_sync): Don't
3016 try to unref the socket if the socket creation fails.
3017 (soup_connection_reserve): New, to explicitly mark a connection as
3018 being in use without queueing a message on it.
3020 * libsoup/soup-dns.c (check_hostent): Oof. Fix the logic of the
3021 "block" flag to not be reversed.
3023 * libsoup/soup-message.c (finished): set status to FINISHED here.
3024 (soup_message_cancel): Gone; needs to be done at the session
3027 * libsoup/soup-message-queue.c: Add a mutex and make all of the
3028 operations thread-safe.
3030 * libsoup/soup-socket.c (disconnect_internal): Make this
3032 (soup_socket_connect): Make the sync case work correctly.
3034 * libsoup/Makefile.am: add the SoupSession subclasses
3036 * tests/Makefile.am: libsoup depends on libgthread now, so
3037 revserver doesn't need to explicitly.
3039 * tests/get.c, tests/auth-test.c, tests/simple-proxy.c: Use
3040 soup_session_async_new().
3042 2003-12-16 Rodrigo Moya <rodrigo@ximian.com>
3044 * libsoup/soup-soap-response.[ch] (soup_soap_parameter_get_int_value):
3047 2003-12-16 Joe Shaw <joe@ximian.com>
3049 * libsoup/soup-connection.c (socket_connect_result,
3050 soup_connection_connect_sync): Only set up a tunnel if the
3051 destination protocol is HTTPS.
3053 * libsoup/soup-message.c (class_init): Add a default handler for
3055 (wrote_body): Run the SOUP_HANDLER_POST_REQUEST handlers here.
3056 (soup_message_cancel): Don't set the status to
3057 SOUP_STATUS_CANCELLED and call soup_message_finished() if the
3058 status is already SOUP_MESSAGE_STATUS_FINISHED.
3060 * libsoup/soup-session.c (set_property): Don't cancel the session
3061 if the proxy URI set as a property isn't different from the old
3063 (get_host_for_message): Refactor some code so that we can easily
3064 get the right SoupSessionHost for proxies as well as from the
3066 (authenticate_auth): Take a gboolean proxy parameter. Check it to
3067 see which URI (message URI or proxy URI) to use for
3068 authentication. Add a long comment about lack of clarity in RFC
3069 2617 with respect to proxies and protection spaces.
3071 2003-12-15 Dan Winship <danw@ximian.com>
3073 * libsoup/soup-socket.h (soup_socket_read, soup_socket_read_until,
3074 soup_socket_write): s/guint/gsize/ to match the definitions in
3075 soup-socket.c. #52167.
3077 2003-12-12 Rodrigo Moya <rodrigo@ximian.com>
3079 * libsoup/soup-soap-message.c: removed debugging of the messages here.
3081 2003-12-12 Rodrigo Moya <rodrigo@ximian.com>
3083 * libsoup/soup-soap-message.c (soup_soap_message_start_envelope):
3084 added information for SOAP-ENV namespace.
3086 2003-12-10 Dan Winship <danw@ximian.com>
3088 * libsoup/soup-message-client-io.c (parse_response_headers): if we
3089 receive an HTTP/1.0 response to an HTTP/1.1 request, downgrade the
3090 message's http_version so the keep-alive handling is correct.
3091 Fixes a problem noticed almost simultaneously by Rodrigo and Joe.
3093 * libsoup/soup-message.c (soup_message_restarted, etc): Add a
3094 "restarted" signal as suggested by Joe.
3096 * libsoup/soup-message-io.c (soup_message_io_finished): emit
3097 either "restarted" or "finished" as appropriate
3099 * libsoup/soup-session.c (soup_session_queue_message): Connect to
3100 "restarted" and run the queue if a message gets restarted
3102 * libsoup/soup-status.h: Remove a stray comma that gtk-doc doesn't
3105 2003-12-10 Tambet Ingo <tambet@ximian.com>
3107 * configure.in: Use autoconfig to check for socklen_t ...
3109 * libsoup/soup-address.c: ... and remove it from here ...
3111 * libsoup/soup-dns.c: ... and here.
3113 2003-12-09 Rodrigo Moya <rodrigo@ximian.com>
3115 * libsoup/soup-soap-message.c (soup_soap_message_persist):
3116 (soup_soap_message_parse_response): print out request/response's
3117 contents, if in debug mode.
3119 2003-12-07 JP Rosevear <jpr@ximian.com>
3121 * configure.in: Bump version
3123 2003-11-28 Rodrigo Moya <rodrigo@ximian.com>
3125 * libsoup/soup-soap-response.[ch]
3126 (soup_soap_parameter_get_first_child,
3127 soup_soap_parameter_get_first_child_by_name,
3128 soup_soap_parameter_get_next_child,
3129 soup_soap_parameter_get_next_child_by_name): new functions to
3130 manage SoupSoapParameter's children.
3131 (soup_soap_response_get_first_parameter): dont return a GList, but
3132 a SoupSoapParameter contained in the GList.
3134 2003-11-26 Rodrigo Moya <rodrigo@ximian.com>
3136 * libsoup/soup-soap-response.[ch]
3137 (soup_soap_parameter_get_string_value): new function.
3139 2003-11-26 Rodrigo Moya <rodrigo@ximian.com>
3141 * libsoup/soup-soap-response.[ch]: added SoupSoapParameter
3142 structure, to "hide" the usage of xmlNode's.
3143 (soup_soap_parameter_get_name): functions to manage SOAP
3144 response parameters.
3145 (soup_soap_response_get_first_parameter,
3146 soup_soap_response_get_first_parameter_by_name,
3147 soup_soap_response_get_next_parameter,
3148 soup_soap_response_get_next_parameter_by_name):
3149 new functions for an easy access to the response's parameters.
3150 (soup_soap_response_from_string): removed warnings.
3152 2003-11-25 Rodrigo Moya <rodrigo@ximian.com>
3154 * libsoup/soup-soap-response.c (soup_soap_response_set_method_name):
3157 2003-11-25 Rodrigo Moya <rodrigo@ximian.com>
3159 * libsoup/soup-soap-response.[ch] (soup_soap_response_get_method_name,
3160 soup_soap_response_set_method_name, soup_soap_message_get_parameters):
3162 (finalize): NULL out new private fields.
3163 (soup_soap_response_from_string): added validation code.
3165 2003-11-23 Rodrigo Moya <rodrigo@ximian.com>
3167 * libsoup/soup-soap-response.[ch]: new class for managing SOAP
3170 * libsoup/soup-soap-message.[ch] (soup_soap_message_parse_response):
3173 * libsoup/Makefile.am: added new files.
3175 2003-11-18 Rodney Dawes <dobey@ximian.com>
3177 * gtk-doc.make: Add gtk-doc.make to cvs for systems without gtk-doc
3179 2003-11-18 Rodney Dawes <dobey@ximian.com>
3181 * acinclude.m4: Add GTK_DOC_CHECK
3183 2003-11-18 Dan Winship <danw@ximian.com>
3185 * configure.in: Replace old gtk-doc test with GTK_DOC_CHECK()
3186 (AC_OUTPUT): add docs/Makefile, docs/reference/Makefile
3188 * autogen.sh (REQUIRED_AUTOMAKE_VERSION): 1.6, for gtk-doc.make
3190 * Makefile.am: updates for gtk-doc
3191 (SUBDIRS): add back "docs"
3193 * docs/Makefile.am (EXTRA_DIST): remove, since those old docs
3194 aren't around any more
3196 * docs/reference/*: set up gtk-doc
3198 * libsoup/Makefile.am (INCLUDES): Change G_LOG_DOMAIN to
3199 "libsoup". Remove unused defines.
3201 * libsoup/soup-connection.c: Fix doc comments
3202 * libsoup/soup-message.c: Likewise
3203 * libsoup/soup-misc.c: Likewise
3204 * libsoup/soup-socket.c: Likewise
3205 * libsoup/soup-uri.c: Likewise
3207 * libsoup/soup-address.h: Fixes to please gtk-doc
3208 * libsoup/soup-connection.h: Likewise
3209 * libsoup/soup-message.h: Likewise
3210 * libsoup/soup-message-private.h: Likewise
3211 * libsoup/soup-misc.h: Likewise
3212 * libsoup/soup-server-auth.h: Likewise
3213 * libsoup/soup-socket.h: Likewise
3214 * libsoup/soup-status.h: Likewise
3216 2003-11-18 Dan Winship <danw@ximian.com>
3218 * configure.in: Fix up the SSL checks some. Remove some useless
3221 * libsoup/soup-misc.h: declare soup_ssl_supported.
3223 * libsoup/soup-gnutls.c: add soup_ssl_supported declaration.
3225 * libsoup/soup-nossl.c: Not an SSL implementation, built if
3226 HAVE_SSL is not defined.
3228 * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): add soup-nossl.c
3230 * libsoup/soup-socket.c (soup_socket_start_ssl): Return success or
3232 (listen_watch): Deal with soup_socket_start_ssl failing.
3234 * libsoup/soup-connection.c (tunnel_connect_finished,
3235 socket_connect_result, soup_connection_connect_sync): Deal with
3236 the soup_socket_start_ssl failing.
3238 * libsoup/soup-server.c (soup_server_new): Deal with
3239 soup_ssl_get_server_credentials failing
3241 2003-11-18 Rodrigo Moya <rodrigo@ximian.com>
3243 * libsoup/soup-soap-message.[ch] (soup_soap_message_start_fault,
3244 soup_soap_message_end_fault, soup_soap_message_start_fault_detail,
3245 soup_soap_message_end_fault_detail, soup_soap_message_start_header,
3246 soup_soap_message_end_header,
3247 soup_soap_message_start_header_element,
3248 soup_soap_message_end_header_element, soup_soap_message_write_int,
3249 soup_soap_message_write_double, soup_soap_message_write_base64,
3250 soup_soap_message_write_time, soup_soap_message_write_string,
3251 soup_soap_message_write_buffer, soup_soap_message_set_element_type,
3252 soup_soap_message_set_null, soup_soap_message_add_attribute,
3253 soup_soap_message_add_namespace,
3254 soup_soap_message_set_default_namespace,
3255 soup_soap_message_get_namespace_prefix,
3256 soup_soap_message_set_encoding_style, soup_soap_message_reset,
3257 soup_soap_message_persist): new functions from old SoupSerializer.
3259 2003-11-17 Rodrigo Moya <rodrigo@ximian.com>
3261 * libsoup/soup-soap-message.[ch] (soup_soap_message_new,
3262 soup_soap_message_new_from_uri): added a bunch of initialization
3264 (soup_soap_message_get_xml_doc, soup_soap_message_start_envelope,
3265 soup_soap_message_end_envelope, soup_soap_message_start_body,
3266 soup_soap_message_end_body, soup_soap_message_start_element,
3267 soup_soap_message_end_element):
3270 * configure.in: depend on libxml-2.0 for the SOAP code.
3272 * libsoup/Makefile.am: use XML CFLAGS and LIBS.
3274 2003-11-17 Joe Shaw <joe@ximian.com>
3276 * configure.in: Add in the --enable-libgpg-error flag from the 2.0
3279 * acinclude.m4: Include the gpg-error macros.
3281 2003-11-17 Rodrigo Moya <rodrigo@ximian.com>
3283 * libsoup/soup-soap-message.[ch]: new class to make it easier to
3284 build SOAP messages.
3286 * libsoup/Makefile.am: added new files.
3288 * configure.in: increased version number.
3290 2003-10-24 Joe Shaw <joe@ximian.com>
3292 * libsoup/soup-address.c (update_address_from_entry): Call
3293 soup_dns_entry_get_hostent() on the SoupAddress passed in, not the
3294 one in addr->priv->lookup. Fixes a crash on synchronous DNS
3297 * libsoup/soup-server.c (soup_server_new): We need to ref the
3298 address we're binding to, because soup_socket_get_local_address()
3301 2003-10-23 Dan Winship <danw@ximian.com>
3303 * libsoup/soup-socket.c (init): Initialize flags to default
3306 2003-09-23 Dan Winship <danw@ximian.com>
3308 * libsoup/soup-gnutls.c (SoupGNUTLSCred): Remove refcounting, but
3309 note whether or not the CA file has been loaded.
3310 (SoupGNUTLSChannel): add a "hostname" field.
3311 (verify_certificate): Remove the comment about not being able to
3312 verify the hostname because of soup problems. Now it's because of
3313 GNUTLS problems instead.
3314 (soup_ssl_wrap_iochannel): Renamed from soup_ssl_get_iochannel,
3315 and takes a hostname and a creds argument now.
3316 (soup_ssl_get_client_credentials,
3317 soup_ssl_get_server_credentials): Return client/server credentials
3319 (soup_ssl_free_client_credentials,
3320 soup_ssl_free_server_credentials): and free them.
3322 * libsoup/soup-session.c (class_init, set_property, get_property):
3323 add ssl_ca_file property
3324 (get_host_for_message): when returning an SSL host for the first
3325 time, create a client credentials structure for the session.
3326 (run_queue): Pass the ssl creds to the new connection. Also fix an
3327 unrelated bug that caused infinite loops on "bad hostname".
3329 * libsoup/soup-server.c: Use GObject properties, including
3330 ssl_cert_file and ssl_key_file properties.
3331 (soup_server_new): Remove "protocol" argument; if the cert file
3332 and key file properties were set, create a server credential
3333 structure from them and pass that to soup_socket_server_new.
3335 * libsoup/soup-connection.c (SoupConnectionPrivate): Rename
3336 dest_uri to origin_uri to match RFC 2616 terminology. Add an
3338 (class_init, set_property, get_property): add SSL_CREDS property
3339 (soup_connection_connect_async, soup_connection_connect_sync):
3340 Pass ssl_creds to soup_socket_client_new calls.
3342 * libsoup/soup-socket.c: Use GObject properties, including an
3344 (soup_socket_set_flags): Gone (replaced with boolean properties)
3345 (soup_socket_new): Make this take a list of properties
3346 (listen_watch): copy ssl creds from listener to new socket
3347 (soup_socket_start_ssl): Pass remote hostname and socket creds
3348 structure to soup_ssl_wrap_iochannel.
3349 (soup_socket_client_new_async, soup_socket_client_new_sync,
3350 soup_socket_server_new): Replace the SSL boolean with an ssl_creds
3353 * libsoup/soup-misc.c (soup_set_ssl_ca_file,
3354 soup_set_ssl_cert_files, soup_get_ssl_ca_file,
3355 soup_get_ssl_cert_files): Gone. SSL state is now per-session or
3358 * tests/get.c: add a "-c CAfile" argument, for loading a CA
3359 certificate file to validate https connections against
3361 * tests/simple-httpd.c: Add "-c certfile" and "-k keyfile"
3362 arguments for loading an SSL server certificate. Only start an SSL
3363 server if those arguments were used.
3365 * tests/test-cert.pem:
3366 * tests/test-key.pem: SSL certificate for testing simple-httpd
3368 * tests/revserver.c: Update for API changes
3369 * tests/simple-proxy.c: Likewise
3371 2003-09-22 Dan Winship <danw@ximian.com>
3373 * libsoup/soup-message-io.c: Move RESPONSE_BLOCK_SIZE #define here
3376 * libsoup/soup-misc.c (soup_load_config, etc): Remove all this.
3377 (soup_set_security_policy, soup_get_security_policy): Remove,
3378 since the GNUTLS backend doesn't actually implement it.
3379 (soup_set_ssl_ca_dir, soup_get_ssl_ca_dir): Likewise
3381 * libsoup/soup-misc.h: sync to soup-misc.c. Don't #include extra
3384 * libsoup/soup-types.h (SOUP_MAKE_TYPE): Move this here from
3387 * libsoup/soup-ssl.h: Merge soup_ssl_get_iochannel and
3388 soup_ssl_get_server_iochannel into a single function that takes a
3391 * libsoup/soup-gnutls.c: Remove soup_get_ssl_ca_dir() reference.
3392 (soup_ssl_get_iochannel): Renamed from soup_gnutls_get_iochannel.
3393 (soup_gnutls_set_security_policy): Gone
3395 * libsoup/soup-gnutls.h
3396 * libsoup/soup-ssl.c: Gone; soup-ssl.h is the #include file for
3399 * libsoup/soup-socket.c: Move soup_sockaddr_max
3400 #define here from soup-private.h
3401 (soup_socket_start_ssl): Update for new soup_ssl_get_iochannel
3404 * libsoup/soup-private.h: Gone
3406 * libsoup/soup-address.c: Fix #includes for soup-private.h and
3408 * libsoup/soup-auth-digest.c: Likewise
3409 * libsoup/soup-auth.c: Likewise
3410 * libsoup/soup-connection-ntlm.c: Likewise
3411 * libsoup/soup-connection.c: Likewise
3412 * libsoup/soup-dns.c: Likewise
3413 * libsoup/soup-gnutls.c: Likewise
3414 * libsoup/soup-headers.c: Likewise
3415 * libsoup/soup-message-client-io.c: Likewise
3416 * libsoup/soup-message-handlers.c: Likewise
3417 * libsoup/soup-message-io.c: Likewise
3418 * libsoup/soup-message-server-io.c: Likewise
3419 * libsoup/soup-message.c: Likewise
3420 * libsoup/soup-server-message.c: Likewise
3421 * libsoup/soup-server.c: Likewise
3422 * libsoup/soup-session.c: Likewise
3423 * libsoup/soup-socket.c: Likewise
3424 * tests/auth-test.c: Likewise
3426 2003-09-19 Dan Winship <danw@ximian.com>
3428 * libsoup/soup-address.c (update_address_from_entry): free the
3431 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Don't leak
3434 * libsoup/soup-gnutls.c (soup_gnutls_get_iochannel): Add some more
3435 iochannel initialization. Not sure how this worked before...
3437 * libsoup/soup-message.c (soup_message_cleanup_response): Renamed
3438 from soup_message_prepare (and a few things removed).
3440 * libsoup/soup-message-client-io.c (soup_message_send_request):
3441 s/soup_message_prepare/soup_message_cleanup_response/
3443 * libsoup/soup-message-io.c (io_read): Replace the final "\r\n"
3444 with "\0" on the headers before passing them to the parse
3446 (io_read): Call soup_message_cleanup_response after returning an
3447 informational response so the data doesn't leak.
3449 * libsoup/soup-headers.c (soup_headers_parse): Update for
3450 soup-message-io.c:io_read change
3452 * libsoup/soup-server.c (soup_server_new,
3453 soup_server_new_with_host): Don't leak the SoupAddress.
3455 * libsoup/soup-session.c (class_init): Make PROP_PROXY_URI not
3457 (set_property): If the proxy uri changes, call
3458 soup_session_abort() and cleanup_hosts().
3459 (request_finished, final_finished): Fix a bug when requeuing
3462 * tests/libsoup.supp: valgrind suppression file for soup tests
3464 * tests/Makefile.am (EXTRA_DIST): dist it.
3465 (noinst_PROGRAMS): move the former check_PROGRAMS to
3466 noinst_PROGRAMS instead.
3468 2003-09-18 Dan Winship <danw@ximian.com>
3470 * libsoup/soup-message.c: Add wrote_informational and
3471 got_informational signals.
3473 * libsoup/soup-message-client-io.c (get_request_headers): Set the
3474 EXPECT_CONTINUE flag on the message if that header is set.
3476 * libsoup/soup-message-server-io.c (parse_request_headers):
3479 * libsoup/soup-message-io.c (io_write): Set read_state to HEADERS
3480 when blocking on an expect-continue. Emit wrote_informational
3481 instead of wrote_headers in the 1xx case.
3482 (io_read): Set read_state to BLOCKING, not NOT_STARTED after
3483 reading a 100 Continue response. Emit got_informational instead of
3484 got_headers in the 1xx case.
3486 * libsoup/soup-session.c (soup_session_send_message): Reorder
3487 things to deal with the fact that the message could finish right
3488 away if there is a connection available and the server is very
3491 * libsoup/soup-status.h: Rename SOUP_STATUS_CLASS_TRANSPORT to
3492 SOUP_STATUS_CLASS_TRANSPORT_ERROR.
3494 2003-09-17 Dan Winship <danw@ximian.com>
3496 * libsoup/soup-session.c (find_oldest_connection): Fix two bugs
3497 (one that pruned too little, one that pruned too much).
3498 (queue_message): When requeuing, don't run the queue;
3499 final_finished will take care of that later.
3500 (soup_session_abort): New, to cancel all pending requests.
3502 * libsoup/soup-socket.c (soup_socket_connect, got_address): ref
3503 the socket while waiting for the address to resolve
3505 2003-09-17 Dan Winship <danw@ximian.com>
3507 * libsoup/soup-connection.c (soup_connection_new): Replaces the
3508 three previous soup_connection_new* functions and uses gobject
3509 properties to set the destination and proxy uris.
3510 (class_init): set up two more signals, authenticate and
3512 (soup_connection_send_request): virtualize
3513 (send_request): Default implementation
3515 * libsoup/soup-connection-ntlm.c: New SoupConnection subclass that
3516 also handles NTLM authentication. Includes all of the NTLM code
3517 formerly in soup-auth-ntlm.c.
3519 * libsoup/soup-auth-ntlm.[ch]: Gone.
3521 * libsoup/soup-auth.c: Remove NTLM refs
3523 * libsoup/soup-session.c (class_init): Add gobject properties for
3524 proxy, max_conns, use_ntlm. Change the "authenticate" and
3525 "reauthenticate" signal prototypes to not pass a SoupAuth (so they
3526 can be used for authenticating SoupConnectionNTLM as well, which
3527 doesn't use a SoupAuth).
3528 (soup_session_new): Renamed from soup_session_new_default.
3529 (soup_session_new_with_options): Replaces
3530 soup_session_new_with_proxy and soup_session_new_full. Takes
3532 (run_queue): Create a new connection of type SoupConnection or
3533 SoupConnectionNTLM depending on our "use_ntlm" property. Connect
3534 to its authenticate and reauthenticate signals.
3535 (connection_authenticate, connection_reauthenticate): proxy these
3538 * libsoup/soup-address.c (update_address_from_entry): Fix a
3539 crasher when failing to resolve the address.
3541 * libsoup/soup-dns.c (check_hostent): Fix some "how was this
3542 working before" bugs.
3544 * libsoup/soup-message-client-io.c (soup_message_send_request):
3545 call soup_message_prepare() to clean up the existing response
3548 * libsoup/soup-message-io.c (io_error): Set the read_state to DONE
3549 when processing an OK EOF.
3551 * libsoup/soup-status.h (SoupStatusClass): fix the numbering of
3552 these so that SOUP_STATUS_CLASS_SUCCESS is 2, etc.
3554 * tests/auth-test.c (authenticate, reauthenticate): Update for new
3556 (main): Use soup_session_new.
3557 * tests/get.c (main): Likewise.
3558 * tests/simple-proxy.c (main): Likewise.
3560 2003-09-10 Dan Winship <danw@ximian.com>
3562 * libsoup/soup-session.c: Add "authenticate" and "reauthenticate"
3564 (invalidate_auth): Remove the call to soup_auth_invalidate.
3565 (authenticate_auth): soup_auth_fn is gone. If the URI doesn't
3566 contain authentication, then emit "authenticate" or
3567 "reauthenticate" (depending on whether or not this is the first
3568 time we've asked for a password for this auth).
3569 (update_auth_internal): If the server rejects our
3570 username/password, don't bail out immediately. Try doing a
3571 "reauthenticate" first.
3573 * libsoup/soup-misc.c (soup_set_authorize_callback): Gone
3575 * libsoup/soup-auth.c (soup_auth_new_from_header_list): Remove the
3577 (soup_auth_invalidate): Remove this; it doesn't actually do
3578 anything useful for us.
3580 * libsoup/soup-auth-basic.c (invalidate): Remove
3581 * libsoup/soup-auth-digest.c: (invalidate): Remove
3582 * libsoup/soup-auth-ntlm.c: (invalidate): Remove
3584 * libsoup/soup-uri.c: Remove all references to "authmech".
3585 (soup_uri_set_auth): Remove this too.
3587 * tests/auth-test.c: Update to use the "authenticate" and
3588 "reauthenticate" signals instead of encoding usernames and
3589 passwords in the URIs. Add a few more test cases.
3591 2003-09-10 Dan Winship <danw@ximian.com>
3593 * libsoup/soup-message-private.h (SoupMessagePrivate): Remove the
3594 "status" field from here, since it's mostly used by SoupSession,
3595 which shouldn't need access to SoupMessagePrivate.
3597 * libsoup/soup-message.h (SoupMessage): Move it here.
3598 (SoupCallbackFn): Remove this alias for SoupMessageCallbackFn.
3599 (soup_message_set_uri): also moved from soup-message-private.h
3601 * libsoup/soup-message.c: s/msg->priv->status/msg->status/.
3603 * libsoup/soup-message-handlers.c:
3604 s/SoupCallbackFn/SoupMessageCallbackFn/ everywhere.
3606 * libsoup/soup-message-io.c (soup_message_io_client,
3607 soup_message_io_server, soup_message_io_unpause): Don't set up an
3608 idle handler, just jump right in to reading/writing; if this is a
3609 synchronous socket, then the caller wants to block, and if it's
3610 not, then we'll quickly get an EAGAIN anyway.
3612 * libsoup/soup-session.c: (queue_message): Likewise.
3613 (*) Update for SoupMessageStatus move and remove
3614 soup-message-private.h include.
3616 * libsoup/soup-server-message.c: Remove soup-message-private.h
3619 * libsoup/soup-server.c: Likewise.
3621 * libsoup/soup-connection.c (soup_connection_is_connected,
3622 soup_connection_is_new): Remove these, since they weren't being
3625 * libsoup/soup-md5-utils.c: Moved from md5-utils.c and renamed, to
3626 avoid namespace pollution.
3628 * libsoup/soup-auth-digest.c: Update for that.
3629 * libsoup/soup-server-auth.c: Likewise
3631 * tests/auth-test.c: Remove soup-message-private.h include
3633 2003-09-09 Dan Winship <danw@ximian.com>
3635 Beginnings of improved synchronous API support
3637 * libsoup/soup-dns.c: Simplify this by making it not automatically
3638 return the result: force the caller to poll. (This isn't really a
3639 performance issue: the results should come back quickly anyway.)
3640 Also, make the cache thread-safe.
3641 (soup_dns_entry_from_name): Was soup_gethostbyname
3642 (soup_dns_entry_from_addr): Was soup_gethostbyaddr
3643 (soup_dns_entry_check_lookup): Used to poll to see if DNS is done
3644 (soup_dns_entry_get_hostent): Gets the hostent from an entry (and
3645 blocks if it's not resolved yet).
3647 * libsoup/soup-address.c: Update for soup-dns changes.
3648 (soup_address_new): Don't automatically start resolving the
3649 hostname now, since we don't know if the caller is going to want
3650 it resolved synchronously or asynchronously.
3651 (soup_address_resolve_async): Renamed from soup_address_resolve.
3652 (soup_address_resolve_sync): New routine to do blocking
3655 * libsoup/soup-socket.c (soup_socket_connect): Now returns a
3656 status value directly when connecting synchronously.
3657 (soup_socket_client_new_async, soup_socket_client_new_sync):
3658 Separate async/sync client socket functions.
3659 (soup_socket_get_iochannel): Made static since it was not used
3660 outside soup-socket.
3662 * libsoup/soup-connection.c (soup_connection_new,
3663 soup_connection_new_proxy, soup_connection_new_tunnel): Just set
3664 up the data, don't actually start connecting.
3665 (soup_connection_connect_async, soup_connection_connect_sync): New
3666 async and sync SoupConnection connecting routines.
3667 (soup_connection_get_socket): Remove this since it wasn't being
3670 * libsoup/soup-session.c (final_finished): Run the queue since a
3671 connection is now freed up.
3672 (run_queue): Update for soup_connection_new* changes.
3674 * libsoup/soup-misc.c (soup_substring_index): Remove, since it
3675 wasn't being used any more.
3677 * libsoup/soup-private.h: Remove some prototypes for functions
3678 that no longer exist.
3680 * libsoup/soup-uri.c (soup_uri_copy_root): New utility function
3681 (copies the protocol, host, and port of a SoupUri).
3683 * tests/auth-test.c:
3685 * tests/simple-proxy.c: belatedly update for soup-session change
3687 * tests/revserver.c: Handle each new connection in its own thread,
3688 using synchronous SoupSocket calls.
3690 2003-09-05 Dan Winship <danw@ximian.com>
3692 * libsoup/soup-session.c: Move a bunch of logic here from
3693 soup-context. Now the session keeps track of hosts (instead of
3694 having a global soup_hosts hash) and their connections.
3695 (soup_session_new_with_proxy, soup_session_new_full): New session
3696 constructors to specify a proxy or a proxy and connection limits
3697 (send_request): Add Authorization and Proxy-Authorization headers
3698 before sending off the request.
3699 (soup_session_queue_message, et al): Improve the way this works.
3700 There's no need to use timeouts to wait for connections to become
3701 free; we *know* when they become free.
3703 * libsoup/soup-private.h: Remove SoupHost and some other
3704 no-longer-used stuff.
3706 * libsoup/soup-misc.c (soup_set_proxy, soup_get_proxy,
3707 soup_set_connection_limit, soup_set_connection_limit): Gone. These
3708 are all per-session now.
3710 * libsoup/soup-message.c: Remove all SoupContext references
3711 (mostly replaced with SoupUri references)
3712 (cleanup_message): priv->connect_tag and priv->connection are gone
3713 now, so this was just soup_message_io_cancel(). So remove
3714 cleanup_message and replace it with that everywhere.
3715 (soup_message_disconnect): Gone.
3716 (soup_message_set_uri): Replaces soup_message_set_context.
3717 (soup_message_set_connection, soup_message_get_connection): Gone
3719 * libsoup/soup-message-server-io.c (parse_request_headers):
3720 s/soup_message_set_context/soup_message_set_uri/
3722 * libsoup/soup-message-private.h (SoupMessagePrivate): Remove
3723 connect_tag, context, and connection.
3725 * libsoup/soup-message-client-io.c (encode_http_auth): Gone.
3727 * libsoup/soup-context.c: Gone
3729 * tests/auth-test.c (identify_auth): update for session/context
3732 2003-09-03 Dan Winship <danw@ximian.com>
3734 * libsoup/soup-status.h: Renamed from soup-error.h, with types
3735 and defines renamed accordingly.
3737 * libsoup/soup-message.h (SoupMessage): Rename errorcode to
3738 status_code and errorphrase to reason_phrase. Remove errorclass.
3739 (SOUP_MESSAGE_IS_ERROR): Remove this. You can't classify redirects
3740 as being either "errors" or "not errors", so its semantics are
3741 guaranteed to be wrong sometimes.
3743 * libsoup/soup-message.c (soup_message_set_status,
3744 soup_message_set_status_full): Renamed
3746 * libsoup/soup-message-handlers.c
3747 (soup_message_add_status_code_handler,
3748 soup_message_add_status_class_handler): Rename.
3750 * libsoup/soup-session.c (soup_session_send_message): Make this
3751 return a status code rather than a status class.
3753 * libsoup/soup-message-private.h (SoupMessagePrivate): Remove some
3754 unrelated unused fields (retries, callback, user_data).
3758 2003-09-02 Dan Winship <danw@ximian.com>
3760 * libsoup/soup-session.c: First draft at the new object to
3761 maintain formerly-global state. (Not yet complete; still need to
3762 get rid of SoupContext).
3764 * libsoup/soup-message-queue.c: Data structure used by SoupSession
3766 * libsoup/soup-queue.c: Gone. Mostly moved into soup-session, but
3767 some bits went into soup-connection.
3769 * libsoup/soup-connection.c (soup_connection_send_request): New,
3770 to send a request on a connection. The connection updates its
3771 internal state and then hands off to soup_message_send_request.
3772 (request_done): Callback set up by soup_connection_send_request.
3773 Marks the connection as no-longer-in-use, and disconnects it if
3774 the message says to.
3775 (soup_connection_set_in_use, soup_connection_mark_old): No longer
3776 needed; the connection takes care of this itself now.
3777 (soup_connection_new_proxy): New, to create a new connection that
3778 is explicitly marked as being through an HTTP proxy.
3779 (soup_connection_new_tunnel): New, to create a new HTTPS
3780 connection through a proxy. (Includes the code to send the
3783 * libsoup/soup-context.c (try_existing_connections): Don't need to
3784 call soup_connection_set_in_use.
3785 (try_create_connection): Use soup_connection_new,
3786 soup_connection_new_proxy, or soup_connection_new_tunnel as
3789 * libsoup/soup-message.c (soup_message_prepare): Replaces
3791 (soup_message_queue, soup_message_requeue, soup_message_prepare):
3792 Gone. This must be done via a SoupSession now.
3793 (soup_message_set_connection): don't need to mark in_use/not
3794 in_use. Also, msg->priv->socket is gone now.
3795 (soup_message_get_socket): Gone.
3797 * libsoup/soup-message-handlers.c (soup_message_run_handlers):
3798 Remove references to global handlers.
3799 (redirect_handler, authorize_handler): Moved to soup-session.c.
3801 * libsoup/soup-misc.c (soup_shutdown): Gone; just unref the
3802 session to shut down now.
3804 * libsoup/soup.h: add soup-session.h
3806 * libsoup/Makefile.am: updates
3808 * tests/auth-test.c, tests/get.c, tests/simple-proxy.c: Use
3811 2003-08-29 Dan Winship <danw@ximian.com>
3813 * libsoup/soup-message-io.c: Major rewrite. There is now only a
3814 single IO state object (instead of one for reading and one for
3815 writing), and the IO code handles switching back and forth between
3816 reading and writing as appropriate (including handling the extra
3817 switches needed for "Expect: 100-continue").
3818 (soup_message_io_client, soup_message_io_server): The new entry
3820 (soup_message_io_cancel): If the caller cancels the IO when we
3821 were expecting to read more data, disconnect the socket.
3823 * libsoup/soup-message.h (SoupMessageFlags): add
3824 SOUP_MESSAGE_EXPECT_CONTINUE, to indicate that the IO code should
3825 do the special expect-continue handling.
3827 * libsoup/soup-message.c: Move all the signal stuff here. Remove
3828 the "done_reading" and "done_writing" signals and replace them
3829 with a single "finished" signal. (A single signal. Say that 10
3831 (soup_message_got_headers, etc): Functions to emit signals.
3832 (got_headers, got_chunk, got_body): Default signal methods that
3833 call soup_message_run_handlers.
3834 (finished): Default signal method that replaces
3835 soup_message_issue_callback.
3836 ([various]): s/soup_message_issue_callback/soup_message_finished/
3837 (soup_message_requeue): There's no soup_message_set_read_callbacks
3838 any more, so if the caller requeues while it's still reading, just
3840 (soup_message_add_chunk, soup_message_add_final_chunk,
3841 soup_message_pop_chunk): Moved here from soup-server-message,
3842 although we don't actually quite support using chunked encoding
3845 * libsoup/soup-server-message.c (soup_server_message_new): No
3846 longer takes a socket argument.
3847 (soup_server_message_add_chunk, soup_server_message_get_chunk):
3848 Moved into SoupMessage.
3850 * libsoup/soup-message-handlers.c (global_handlers): Make these
3851 POST_BODY rather than PRE_BODY, so they won't mess up the IO
3852 channel when the requeue the message.
3853 (soup_message_run_handlers): Don't need to issue the message
3854 callback from here any more.
3855 (authorize_handler): Just leave the error as 401 or 407 (see
3856 soup-error.h change)
3858 * libsoup/soup-message-client-io.c (soup_message_send_request):
3859 Replaces soup_message_write_request and
3860 soup_message_read_response.
3862 * libsoup/soup-message-server-io.c: Parallel to
3863 soup-message-client-io.c, this defines the server-side header
3865 (soup_message_read_request): Its entry point.
3867 * libsoup/soup-server.c: Lots of code moved into
3868 soup-message-server-io.c. Update for other changes.
3870 * libsoup/soup-queue.c: Update for changes
3872 * libsoup/soup-socket.c (read_from_network, soup_socket_write):
3873 Don't call soup_socket_disconnect() on an error, just return
3874 SOUP_SOCKET_ERROR. Otherwise soup_socket_disconnect() could emit
3875 signals that will mess up the caller of the read/write function.
3877 * libsoup/soup-connection.c (soup_connection_disconnect): When
3878 disconnecting the socket, disconnect from its signals first to
3879 prevent bad reentrancy.
3881 * libsoup/soup-error.h: Kill off SOUP_ERROR_CANT_AUTHENTICATE and
3882 SOUP_ERROR_CANT_AUTHENTICATE_PROXY, since they don't really say
3883 anything that SOUP_ERROR_UNATHORIZED and
3884 SOUP_ERROR_PROXY_UNAUTHORIZED don't say. (And now, all of the
3885 "transport" errors actually are transport-related.)
3887 * tests/auth-test.c (main): s/CANT_AUTHENTICATE/UNAUTHORIZED/
3889 * tests/simple-proxy.c: Complicate this a bunch. In particular,
3890 use SOUP_MESSAGE_OVERWRITE_CHUNKS and the GOT_CHUNK signal, and
3891 pass the data back to the client in chunked format.
3893 2003-08-27 Dan Winship <danw@ximian.com>
3895 * libsoup/soup-types.h: New header with typedefs, to avoid
3896 #include loops among other headers.
3898 * libsoup/Makefile.am (libsoupinclude_HEADERS): add it
3900 * libsoup/*.[ch], tests/*.c: Update for soup-types.h
3902 2003-08-26 Dan Winship <danw@ximian.com>
3904 * libsoup/soup-message-client-io.c (soup_message_write_request,
3905 soup_message_read_response): Higher-than-soup-message-io-level
3906 functions to do client-side IO. (Code that used to be in
3908 (get_request_header_cb): Fix a bug in the generation of the Host:
3909 header; need to include the port number if it's not the default.
3911 * libsoup/soup-message-io.c (soup_message_write,
3912 soup_message_write_simple): Take separate user_datas for the get_*
3913 callbacks and the done callbacks.
3915 * libsoup/soup-queue.c: Update to use soup_message_write_request
3916 and soup_message_read_response.
3918 * libsoup/soup-connection.c (soup_connection_new): Change the
3919 prototype to take a SoupUri and a callback.
3921 * libsoup/soup-context.c (try_create_connection,
3922 soup_context_connect_cb): Update for soup_connection_new change.
3924 * libsoup/soup-server.c (read_done_cb, issue_bad_request): Update
3925 for soup_message_write changes
3927 * libsoup/soup-uri.c (soup_uri_uses_default_port): new utility
3930 2003-08-26 Dan Winship <danw@ximian.com>
3932 * libsoup/soup-message-private.h: Define SoupMessage signal stuff
3933 (READ_HEADERS, READ_CHUNK, READ_BODY, READ_ERROR, WROTE_HEADERS,
3934 WROTE_CHUNK, WROTE_BODY, WRITE_ERROR).
3936 * libsoup/soup-message.c (class_init): set up signals
3937 (requeue_read_finished): Update for changes.
3939 * libsoup/soup-message-io.c (soup_message_read): Split out
3940 parse_headers_cb from read_headers_cb. Also add a SoupDataBuffer *
3941 arg to say where to store the message body. Set up
3942 read_headers_cb, read_chunk_cb, read_body_cb, and error_cb as
3944 (do_read): Call r->parse_headers_cb, then emit READ_HEADERS
3945 (read_body_chunk): emit READ_CHUNK.
3946 (issue_final_callback): Set r->body. emit READ_BODY.
3947 (failed_read): emit READ_ERROR.
3948 (soup_message_read_set_callbacks): Disconnect old signal handlers,
3950 (soup_message_read_cancel): Disconnect signal handlers.
3951 (soup_message_write, soup_message_write_simple): Set up
3952 wrote_body_cb and error_cb as signal handlers.
3953 (do_write): emit WROTE_HEADERS and WROTE_CHUNK, even though
3954 nothing currently ever listens for them. emit WROTE_BODY when
3956 (failed_write): emit WRITE_ERROR
3958 * libsoup/soup-queue.c (soup_queue_parse_headers_cb,
3959 soup_queue_read_headers_cb): Split this into two unequal chunks.
3960 (read_header_cb only runs the pre-body handlers).
3961 (soup_queue_read_chunk_cb, soup_queue_read_done_cb): Update
3963 (soup_queue_write_done_cb): Update call to soup_message_read
3965 * libsoup/soup-server.c (parse_headers_cb): Renamed from
3967 (read_done_cb): Update prototype
3968 (start_request): Update soup_message_read call.
3970 2003-08-25 Dan Winship <danw@ximian.com>
3972 * libsoup/soup-message-io.c (soup_message_read,
3973 soup_message_write, soup_message_write_simple): Add a "user_data"
3974 arg, pass it to the callbacks.
3976 * libsoup/soup-message.c (soup_message_requeue,
3977 requeue_read_finished, requeue_read_error): Update for that
3979 * libsoup/soup-queue.c: Likewise
3981 * libsoup/soup-server.c: Likewise
3983 2003-08-25 Dan Winship <danw@ximian.com>
3985 * libsoup/soup-message.c (soup_message_new): Take a uri string
3986 instead of a context. Also, swap the args (so the method comes
3987 before the URI, just like in the protocol).
3988 (soup_message_new_from_uri): Like soup_messgae_new, but takes a
3989 SoupUri instead of a string
3990 (soup_message_set_request, soup_message_set_response): Replace
3991 soup_message_new_full.
3992 (cleanup_message): Was soup_message_cleanup, but is static now.
3993 (queue_message): Do the pre-queuing message cleanup here instead
3994 of in soup_queue_message.
3995 (soup_message_queue): Set the callback and user_data, then call
3997 (requeue_read_error, requeue_read_finished, soup_message_requeue):
3999 (soup_message_get_uri): Replaces soup_message_get_context.
4001 * libsoup/soup-message.h (SoupMessage): Remove msg->context. (It's
4002 part of SoupMessagePrivate now)
4004 * libsoup/soup-context.c: #include soup-message-private
4005 (soup_context_from_uri): constify the uri arg.
4007 * libsoup/soup-queue.c: Various context/uri fixes
4008 (proxy_https_connect): Use soup_message_new_from_uri.
4009 (soup_queue_message): Drastically simplified since most of the
4010 work is in soup-messsage.c:queue_message() now
4012 * libsoup/soup-auth-digest.c (compute_response,
4013 get_authorization): Use soup_message_get_uri.
4015 * libsoup/soup-server-auth.c (parse_digest): Likewise
4017 * libsoup/soup-server.c (call_handler): Likewise
4019 * tests/simple-httpd.c (server_callback): Likewise.
4021 * tests/simple-proxy.c (server_callback): Likewise
4023 * tests/get.c (got_url): Likewise.
4024 (get_url): Update soup_message_new usage.
4026 * tests/auth-test.c: #include soup-message-private. Update for
4027 context changes and soup_message_new change.
4029 2003-08-22 Dan Winship <danw@ximian.com>
4031 * libsoup/soup-message-private.h: New file containing
4032 SoupMessagePrivate and some other soup-message-internal
4033 types/functions. Also includes the new, expanded SoupMessageStatus
4036 * libsoup/soup-message-io.c: Replaces what used to be in
4037 soup-transfer, but now all the interfaces take SoupMessages
4038 instead of SoupReader/SoupWriter and deal with maintaining
4039 msg->priv->{read,write}_state themselves. Fixes up all the
4040 refcounting madness.
4042 * libsoup/soup-message-handlers.c: Move the handler code here,
4043 mostly unchanged. (But rename SoupHandlerType to SoupHandlerPhase
4044 to make the distinction from SoupHandlerKind clearer.)
4046 * libsoup/soup-message.c: Update for soup-message-io and new
4047 SoupMessageStatus values. Remove handler code.
4048 (soup_message_cleanup): Remove the hack to try to preserve the
4049 connection if the message gets cleaned up before it finishes
4050 reading. soup_message_requeue handles this in the requeuing case,
4051 and there's no especially compelling reason to bother doing it in
4052 any other case. (And the soup-message-io api doesn't support
4053 having a read operation that's not connected to any message.)
4055 * libsoup/soup-private.h: remove SoupMessagePrivate
4057 * libsoup/soup-queue.c: Update for soup-message-io and new
4058 SoupMessageStatus values.
4060 * libsoup/soup-server-message.c: Likewise
4062 * libsoup/soup-server.c: Likewise
4064 * libsoup/soup-transfer.c: Gone (yay)
4066 * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): update
4068 2003-08-20 Dan Winship <danw@ximian.com>
4070 * libsoup/soup-message.c: Make this a GObject. (Note that since
4071 SoupMessage was not refcounted before, it's not really refcounted
4073 (soup_message_free): Gone, replaced by g_object_unref
4074 (soup_message_copy, soup_message_foreach_remove_header): Remove
4075 these, since neither was currently functional.
4076 (soup_message_is_keepalive): New utility function to look at
4077 HTTP version and request/response headers to decide if a message
4078 indicates the connection should be kept alive.
4079 (soup_message_set_connection, soup_message_get_connection): New
4080 (soup_message_get_socket): New
4082 * libsoup/soup-server-message.c: Make this a subclass of
4084 (soup_server_message_new): Now takes a SoupServer and SoupSocket
4085 (soup_server_message_get_server): New
4086 (soup_server_message_set_encoding,
4087 soup_server_message_get_encoding): Get/set whether the message
4088 should be sent with content-length or chunked encoding
4089 (soup_server_message_is_started, soup_server_message_is_finished):
4090 Private member accessors.
4091 (soup_server_message_add_chunk): Renamed from add_data
4092 (soup_server_message_get_chunk): Pops a chunk from the list.
4093 (soup_server_message_get_source): Gone
4095 * libsoup/soup-server.c: Update for SoupServerMessage changes.
4096 (error_cb, write_done_cb): All the cleanup stuff that used to be
4097 here happens automatically by unreffing the message now.
4098 (get_response_header): Remove some erroneous leftover CGI stuff
4099 (issue_bad_request): add "Connection: close" to the response.
4100 (read_headers_cb): clean this up a bit. Reject HTTP/1.1 messages
4101 with no Host header as per RFC 2616.
4103 * libsoup/soup-connection.c (soup_connection_start_ssl): Gone
4104 (soup_connection_set_in_use): Let the caller set the connection to
4105 "not in use" even after the socket has been disconnected.
4107 * libsoup/soup-context.c: Use soup_message_get_connection
4109 * libsoup/soup-headers.c (soup_headers_parse_request): Remove the
4110 check on request length, since it was rejecting
4111 "GET / HTTP/1.0\r\n\r\n", which is a valid complete request.
4113 * libsoup/soup-queue.c: Use soup_message_get_connection and
4114 soup_message_get_socket.
4115 (soup_queue_read_done_cb): Use soup_message_is_keepalive
4116 (proxy_https_connect_cb): Use soup_socket_start_ssl rather than
4117 soup_connection_start_ssl
4119 * libsoup/soup-socket.c (finalize): disconnect the GIOChannel
4120 handlers if the socket hasn't been disconnected yet.
4122 * libsoup/soup-transfer.c (soup_reader_read_body_chunk,
4123 reader_read): Fix these so that reader_read will exit properly if
4124 the read is cancelled.
4126 * tests/auth-test.c (main): s/soup_message_free/g_object_unref/
4128 * tests/simple-httpd.c (server_callback): set the message to
4129 content-length encoding.
4130 * tests/simple-proxy.c (server_callback): Likewise
4132 2003-08-19 Dan Winship <danw@ximian.com>
4134 * libsoup/soup-socket.c (soup_socket_read,
4135 soup_socket_read_until, soup_socket_write): New API for doing
4136 socket IO. Works both synchronously and asynchronously, and
4137 buffers data to prevent the "100 Continue" problem.
4138 (soup_socket_set_flag): Replaces formerly-private
4139 soup_set_sockopts. (primarily to let the caller turn off
4140 SOUP_SOCKET_FLAG_NONBLOCKING).
4142 * libsoup/soup-transfer.c (soup_transfer_read,
4143 soup_transfer_write, soup_transfer_write_simple): Take a
4144 SoupSocket instead of a GIOChannel. Use the new socket IO api.
4145 Changed the prototypes of some of the callbacks to be less
4148 * libsoup/soup-connection.c (soup_connection_get_socket): Replaces
4149 soup_connection_get_iochannel.
4151 * libsoup/soup-message.c: Fix up for soup-transfer changes
4153 * libsoup/soup-queue.c: Likewise
4155 * libsoup/soup-server.c: Likewise
4157 * tests/revserver.c: A slightly more complicated replacement for
4158 timeserver. (Does both reads and writes)
4160 2003-08-19 Dan Winship <danw@ximian.com>
4162 * libsoup/soup-socks.[ch]: Remove this. RC doesn't let you
4163 configure it, and no one has complained, and it looks like the
4164 SOCKS5 auth code doesn't actually work anyway...
4166 * libsoup/soup-queue.c (proxy_connect): Remove SOCKS code.
4168 * libsoup/soup-uri.h: Remove SOUP_PROTOCOL_SOCKS4 and
4169 SOUP_PROTOCOL_SOCKS5
4171 * libsoup/soup-misc.c: Remove a references to SOCKS in a comment
4173 * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): remove
4176 2003-08-19 Dan Winship <danw@ximian.com>
4178 * libsoup/soup-server.c: Make this a GObject. Remove
4179 SoupServerMessage code (to soup-server-message.c). Remove CGI
4180 server code (for now?)
4181 (soup_server_add_handler, soup_server_remove_handler): Rename
4182 (from register/unregister) to make it clearer what they do.
4184 * libsoup/soup-server-message.c: Moved out of soup-server.c
4186 * libsoup/soup-private.h: Remove SoupServer def
4188 * libsoup/Makefile.am (libsoupinclude_HEADERS,
4189 libsoup_2_2_la_SOURCES): add soup-server-message.[ch]
4191 * tests/simple-httpd.c:
4192 * tests/simple-proxy.c: Update for SoupServer changes
4194 2003-08-18 Dan Winship <danw@ximian.com>
4196 * libsoup/soup-address.c (SoupAddressPrivate): Make this more like
4197 a struct sockaddr again (like it used to be). In particular, add
4198 back the "port" field. Add a bunch of macros to try (and fail) to
4199 simplify some of the code.
4200 (soup_address_new): Now returns a SoupAddress directly rather than
4201 a random handle, and the caller can just use g_object_unref to
4202 cancel the lookup. Also, the callback now uses a
4203 SoupKnownErrorCode rather than a special-purpose address-lookup
4205 (soup_address_new_cancel): No longer needed.
4206 (soup_address_new_sync): Removed
4207 (soup_address_new_any): Replaces soup_address_ipv4_any and
4208 soup_address_ipv6_any.
4209 (soup_address_get_name, etc): Gone. Use soup_address_resolve()
4211 (soup_address_get_physical): Renamed from
4212 soup_address_get_canonical_name.
4213 (soup_address_get_sockaddr): Replaces soup_address_make_sockaddr()
4215 * libsoup/soup-socket.c: Update for SoupAddress changes and make
4216 similar changes here.
4217 (soup_socket_new): Just creates a generic SoupSocket now.
4218 (soup_socket_connect): Client setup
4219 (soup_socket_listen): Server setup. Now also sets up an iochannel
4220 listening for connects and emits a "new_connection" signal as they
4222 (soup_socket_start_ssl): Turns on SSL.
4223 (soup_socket_client_new, soup_socket_server_new): Utility
4224 functions that wrap the above.
4225 (soup_socket_new_cancel, soup_socket_new_sync): Gone
4226 (soup_socket_server_accept, soup_socket_server_try_accept): No
4228 (soup_socket_get_iochannel): No longer adds a ref when returning
4229 the iochannel. Also, we set it to "close_on_unref" so that if a
4230 caller adds a ref to it, the connection will actually remain open
4231 even after the SoupSocket is destroyed.
4232 (soup_socket_get_local_address, soup_socket_get_remote_address):
4233 Let the caller get both of these.
4235 * libsoup/soup-connection.c: Don't keep a private copy of the
4237 (soup_connection_new): Don't need to set socket options here.
4239 (soup_connection_start_ssl): Just call soup_socket_start_ssl.
4240 (soup_connection_get_iochannel): Just return the socket's
4241 iochannel (and don't ref it)
4243 * libsoup/soup-error.c: add SOUP_ERROR_CANT_RESOLVE and
4244 SOUP_ERROR_CANT_RESOLVE_PROXY
4246 * libsoup/soup-dns.c (soup_ntop): Make the address arg const.
4247 Remove the "FIXME add a CANT_RESOLVE error" and return
4248 SOUP_ERROR_CANT_RESOLVE instead.
4250 * libsoup/soup-server.c: Update for socket/address changes. Don't
4251 poke into SoupSocket's private fields.
4252 (soup_server_run_async): Just connect to the socket's
4253 "new_connection" signal.
4255 * libsoup/soup-context.c (try_create_connection,
4256 soup_context_connect_cb): Update for socket changes. Replace
4257 SOUP_CONNECT_ERROR codes with plain SOUP_ERROR codes.
4259 * libsoup/soup-misc.c (soup_signal_connect_once): Utility function
4260 to connect to a signal handler and connect another function to
4261 clean up the first signal handler after its first invocation.
4262 (Lets us use signals to replace one-off callbacks.)
4264 * libsoup/soup-private.h: Remove SoupSocketPrivate since it is
4265 actually private now.
4266 (struct _SoupServer): Remove accept_tag.
4268 * libsoup/soup-queue.c (soup_queue_read_done_cb, start_request):
4269 Don't unref the iochannel.
4270 (soup_queue_connect_cb): Takes a SoupKnownErrorCode now.
4272 * libsoup/soup-socks.c: Update for socket/address changes
4274 * tests/simple-httpd.c (main):
4275 s/SOUP_SERVER_ANY_PORT/SOUP_ADDRESS_ANY_PORT/
4276 * tests/simple-proxy.c (main): Likewise
4278 * tests/timeserver.c: Update for SoupSocket's "new_connection"
4279 signal, and for SoupAddress changes.
4281 2003-08-14 Dan Winship <danw@ximian.com>
4283 * libsoup/soup-connection.c: New, split out from soup-context and
4284 made into a GObject.
4285 (soup_connection_disconnect): Disconnects the connection and emits
4286 a signal. (Replaces the old "keep_alive" flag.)
4287 (soup_connection_is_connected): Checks if the connection is still
4289 (connection_died): Just disconnect, rather than freeing the
4290 connection. This way if anyone else is still referencing it they
4291 won't end up with an invalid pointer.
4293 * libsoup/soup-context.c: Make this a GObject, remove all the
4294 SoupConnection code. Add an "ntlm_auths" field to SoupHost so that
4295 SoupContext can keep track of connection auth stuff there without
4296 SoupConnection needing to care. Various other updates.
4298 * libsoup/soup-private.h: Remove SoupContext and SoupConnection
4301 * libsoup/*.c, tests/get.c: Update for context/connection changes
4303 * libsoup/soup-socks.c (soup_connect_socks_proxy): Change the
4304 definition to deal with the fact that there's no
4305 soup_connection_get_context any more.
4307 * libsoup/soup-queue.c (soup_queue_read_headers_cb): Don't deal
4308 with connection persistence here.
4309 (soup_queue_read_done_cb): Do it here instead. Disconnect the
4310 connection when appropriate.
4311 (proxy_connect, proxy_https_connect, proxy_https_connect_cb):
4312 Reference-count the connection properly. (I think.)
4314 * libsoup/soup-marshal.list: New, for SoupConnection's
4315 "disconnected" signal.
4317 * libsoup/Makefile.am: add rules to build soup-marshal.[ch]
4319 * configure.in: Use AM_PATH_GLIB_2 rather than pkg-config, so that
4320 GLIB_GENMARSHAL gets set too.
4322 2003-08-14 Dan Winship <danw@ximian.com>
4324 * libsoup/soup-error.c: Fix a spelling mistake.
4326 * libsoup/*.c: Fix use of @/%/#/() in gtk-doc comments
4328 2003-08-12 Dan Winship <danw@ximian.com>
4330 * libsoup/soup-auth.c: Make this an abstract GObject. Tweak some
4331 of the interfaces around a little bit.
4333 * libsoup/soup-auth-basic.c: subclass for Basic auth
4335 * libsoup/soup-auth-digest.c: subclass for Digest auth
4337 * libsoup/soup-auth-ntlm.c: subclass for NTLM auth. Move all of
4338 the code from soup-ntlm.c here, and make it private.
4340 * libsoup/soup-ntlm.c: gone
4342 * libsoup/soup-misc.h: Remove the definition of SoupAuthType from
4343 here, and change the signature of SoupAuthorizeFn.
4345 * libsoup/soup-context.c: Use g_object_unref to free auths, use
4346 methods instead of directly access private fields.
4348 * libsoup/soup-queue.c: Likewise
4350 * libsoup/soup-server-auth.c (soup_server_auth_free): Remove all
4351 NTLM references. We have no plans to implement server-side NTLM
4354 * tests/auth-test.c (identify_auth): Update for auth api changes
4356 2003-08-12 Dan Winship <danw@ximian.com>
4358 * configure.in (GLIB): add gobject-2.0 to the PKG_CHECK_MODULES
4361 * libsoup/soup-address.c: Make this a GObject.
4362 (soup_address_ref, soup_address_unref): Gone.
4363 (soup_address_copy): Gone. Wasn't being used anyway.
4365 * libsoup/soup-dns.c: Move all of the DNS code and caching stuff
4366 here from soup-address.c, so that soup-address doesn't need to
4367 worry about trying to cache zero-ref addresses.
4369 * libsoup/soup-socket.c: Make this a GObject. Use "guint"
4370 consistently for port numbers.
4371 (soup_socket_ref, soup_socket_unref): Gone.
4373 * libsoup/soup-private.h: Change the SoupSocket definition to be
4374 SoupSocketPrivate. (Still need to keep this here since soup-server
4375 pokes around in its internals.)
4376 (SOUP_MAKE_TYPE): Copied from gal's E_MAKE_TYPE.
4378 * libsoup/soup-server.c (read_done_cb, write_done_cb): Unref the
4379 reader/writer rather than leaking them.
4381 * libsoup/*: Use GObject methods for socket/address refcounting
4383 * tests/auth-test.c (main)
4384 * tests/timeserver.c (main): Call g_type_init.
4386 * tests/get.c (main): Call g_type_init.
4387 (get_url, got_url): Fix some bugs that could make -r mode get into
4388 infinite loops downloading the same files over and over. Plug some
4389 memory leaks to make this more useful for valgrinding libsoup.
4391 * tests/simple-httpd.c (main): Call g_type_init. Set up a signal
4392 handler for SIGINT so we can exit cleanly, since valgrind won't
4393 give a leak report if you don't. Plug a few memory leaks.
4395 * tests/simple-proxy.c (main): Likewise
4397 2003-08-12 Dan Winship <danw@ximian.com>
4399 Pull over some new test programs from the soup-refactoring branch,
4400 along with the SoupUri changes they depend on.
4402 * tests/simple-httpd.c: A really simple HTTP server, to test the
4405 * tests/simple-proxy.c: An even simpler HTTP proxy
4407 * tests/get.c: Add "-r" flag to recursively get files (thereby
4408 testing multiple-connections-at-once code). Also good for setting
4409 up a tree to use with simple-httpd.
4411 * tests/timeserver.c (main): Fix a bug. (s/ipv6/ipv4/ in the
4414 * tests/uri-parsing.c: Regression test for the new soup-uri.c
4416 * libsoup/soup-uri.c: Rewrite/update to conform to RFC 2396, and
4417 pull in some optimizations from camel-url. Also, make SoupProtocol
4418 a GQuark so we can still compare them with ==, but we can also
4419 recognize any protocol.
4420 (soup_uri_new_with_base): New, to merge base and relative URIs
4421 (soup_uri_to_string): Update this. Change the "show_password" flag
4422 (which we always passed FALSE for) to "just_path", for places that
4423 want the path+query without the protocol, host, etc.
4425 * libsoup/soup-queue.c (soup_get_request_header): Just use
4426 soup_uri_to_string to generate the request URI.
4428 * libsoup/soup-auth.c (compute_response, digest_auth_func): Use
4429 "soup_uri_to_path (uri, TRUE)" rather than trying to reassemble
4430 the URI by hand badly.
4431 * libsoup/soup-server-auth.c (parse_digest): Likewise
4433 * libsoup/soup-socks.c (soup_connect_socks_proxy): Change a
4434 switch() to an series of if()s since SOUP_PROTOCOL_* aren't
4437 * libsoup/soup-context.c (soup_context_uri_hash,
4438 soup_context_uri_equal): s/querystring/query/
4440 2003-08-12 Dan Winship <danw@ximian.com>
4442 * configure.in: Bump API version to 2.2 and package version to
4443 2.1.0. Remove NSS and OpenSSL checks and proxy-related config. Use
4444 libgnutls-config to find GNUTLS.
4446 * libsoup-2.2.pc.in: Update, and rename from soup-2.0.pc
4448 * Makefile.am: Update for pc file rename
4450 * libsoup/Makefile.am: s/2.0/2.2/ everywhere. Remove NSS, OpenSSL,
4451 and libsoup-ssl-proxy stuff.
4453 * libsoup/soup-ssl-proxy.c
4454 * libsoup/soup-nss.[ch]
4455 * libsoup/soup-openssl.[ch]: gone
4457 * libsoup/soup-ssl.c: remove NSS and OpenSSL bits
4459 * tests/Makefile.am (get_LDADD, timeserver_LDADD,
4460 auth_test_LDADD): Update libsoup version
4462 2003-08-07 Dan Winship <danw@ximian.com>
4464 * libsoup/soup-auth.c (soup_auth_lookup, soup_auth_set_context,
4465 soup_auth_invalidate): These are all really SoupContext functions,
4466 so move them to soup-context.c (and rename them appropriately).
4467 (soup_auth_get_protection_space): New method to get the
4468 "protection space" of an auth (paths where it is valid).
4469 (soup_auth_invalidate): New method to try to un-authenticate an
4470 auth (so we can keep the domain info cached even if the auth info
4472 (basic_pspace_func): Basic protection space is all directories
4473 below the current one.
4474 (basic_invalidate_func): Clear the encoded username/password
4475 (digest_pspace_func): Digest protection space is either the whole
4476 server, or "what the domain parameter says" (though we don't deal
4477 with cross-host domains).
4478 (digest_invalidate_func): Return FALSE; bad digest auth info isn't
4480 (digest_parse_func, digest_free): Set/free domain parameter
4481 (ntlm_pspace): NTLM protection space is always the whole server.
4482 (ntlm_invalidate): Clear the auth state.
4483 (soup_auth_new_ntlm): Make this non-static
4484 (SoupAuth): Replace the quad-state "status" field with an
4485 "authenticated" boolean.
4487 * libsoup/soup-private.h (SoupHost): Replace the "valid_auths"
4488 hash with separate "auth_realms" (path->realm) and "auths"
4489 (realm->auth) hashes. Also add a "use_ntlm" flag.
4491 * libsoup/soup-context.c (soup_context_unref): Update SoupHost
4493 (connection_free): Don't the connection's auth, just free it.
4494 (soup_context_lookup_auth): Formerly soup_auth_lookup, but now
4495 does two-stage lookup (path->realm then realm->auth) and also
4496 deals with NTLM hacks.
4497 (soup_context_update_auth): Mostly formerly soup_auth_set_context,
4498 but also large parts of authorize_handler. Updates the auth hashes
4499 based on information from a 401 or 407 response. Does a better job
4500 than authorize_handler did of not throwing away good information.
4501 (soup_context_preauthenticate): New; fakes up auth info so that
4502 requests will end up using authentication without the server
4503 needing to return an error first.
4504 (soup_context_authenticate_auth): Moved out of authorize_handler
4505 so it can be used at request-sending time too, if we know that we
4506 need it. (That way we can avoid requeuing the request if it isn't
4507 going to be able to be authenticated.)
4508 (soup_context_invalidate_auth): Sort of like the old
4509 soup_auth_invalidate, but only destroys the auth data, while still
4510 remembering the path->realm mapping.
4512 * libsoup/soup-message.c (authorize_handler): Mostly moved into
4513 soup_context_update_auth.
4514 (maybe_validate_auth): Remove this; it was only useful because of
4515 bugs elsewhere in the auth handling.
4517 * libsoup/soup-queue.c (soup_encode_http_auth): Update for
4518 soup_context_lookup_auth. If the returned auth isn't
4519 authenticated, call soup_context_authenticate_auth() on it.
4521 * tests/auth-test.c: New (from soup-refactoring branch). Tests
4522 that the Basic/Digest auth code does the right thing. (TODO: find
4523 a good way to add NTLM tests too.)
4525 * tests/Makefile.am (check_PROGRAMS): add auth-test
4527 2003-07-29 Dan Winship <danw@ximian.com>
4529 * configure.in: 1.99.25 ("Potato and Leek Soup")
4531 * libsoup/soup-message.c (requeue_read_finished,
4532 release_connection): Free the passed-in body data. Otherwise the
4533 response body ends up getting leaked on most 3xx and 4xx
4535 (soup_message_cleanup): Remove a piece of code that didn't
4536 actually do anything and its associated confused comment.
4538 * libsoup/soup-auth.c (ntlm_free): plug an occasional NTLM auth leak
4540 * libsoup/soup-context.c (connection_free): plug a non-occasional
4543 2003-06-26 Joe Shaw <joe@ximian.com>
4545 * configure.in: Version 1.99.24
4547 2003-06-24 Dan Winship <danw@ximian.com>
4549 * configure.in: Check pkgconfig for openssl, since 0.9.7 (a) uses
4550 it, and (b) depends on lots of new things sometimes (like on RH9).
4552 * libsoup/soup-openssl.c:
4553 * libsoup/soup-ssl-proxy.c: Change #ifdef HAVE_OPENSSL_SSL_H to
4554 just #ifdef HAVE_OPENSSL since the header check doesn't get run in
4557 2003-06-19 Dan Winship <danw@ximian.com>
4559 * libsoup/soup-queue.c (soup_queue_read_done_cb): unref the
4560 old read_tag before changing/clearing it.
4561 (soup_queue_write_done_cb): Likewise with the write_tag.
4563 * libsoup/soup-transfer.c (issue_final_callback): ref the reader
4564 around the stop+callback.
4565 (soup_transfer_write_cb): Likewise.
4567 2003-06-12 Dan Winship <danw@ximian.com>
4569 * libsoup/soup-transfer.c (SoupReader, SoupWriter): add a
4571 (soup_transfer_read, create_writer): Set initial ref_count to 2
4572 (one for soup-transfer, one for the caller).
4573 (soup_transfer_read_ref, soup_transfer_read_unref): ref/unref a
4575 (soup_transfer_read_stop): Clears the GIOChannel callbacks and
4576 drops soup-transfer's ref.
4577 (soup_transfer_read_cancel): Now just a stop+unref
4578 (soup_transfer_write_ref, soup_transfer_write_unref,
4579 soup_transfer_write_stop, soup_transfer_write_cancel): Similarly.
4581 * libsoup/soup-message.c (soup_message_cleanup): when setting up
4582 the "finish reading" callbacks, unref the reader so it will be
4583 destroyed once it's done reading.
4584 (soup_message_requeue): Likewise.
4586 * libsoup/soup-queue.c (soup_queue_read_headers_cb): Update for
4587 prototype change (no longer returns a SoupTransferDone).
4588 (soup_queue_read_chunk_cb): Likewise.
4590 * libsoup/soup-server.c (read_headers_cb): Likewise
4592 2003-06-11 Dan Winship <danw@ximian.com>
4594 * libsoup/soup-transfer.c: Change all functions to take a
4595 SoupReader * or SoupWriter * instead of a guint.
4597 * libsoup/soup-private.h (SoupMessagePrivate): make read_tag and
4598 write_tag pointers instead of guints.
4600 2003-06-02 Chris Toshok <toshok@ximian.com>
4602 * libsoup/soup-ssl.c: remove #include for soup-nss.h
4604 2003-06-02 Chris Toshok <toshok@ximian.com>
4606 * libsoup/Makefile.am (INCLUDES): remove NSS_CFLAGS.
4607 (libsoup_2_0_la_LIBADD): remove NSS_LIBS.
4608 (libsoup_2_0_la_SOURCES): remove soup-nss.[ch]
4610 2003-06-02 Chris Toshok <toshok@ximian.com>
4612 * configure.in: Bump version to 1.99.23.
4614 2003-05-30 Chris Toshok <toshok@ximian.com>
4616 * libsoup/soup-queue.c (soup_queue_error_cb): always force a
4617 reconnect when there's an error with ssl connection. This fixes
4618 #43387, but it runs the risk of sending requests multiple times to
4619 the exchange server, and it results in lots of shorter lived
4620 connections and more forking (in the ssl proxy case), depending on
4621 the length of the operation.
4623 2003-05-21 Dan Winship <danw@ximian.com>
4625 * configure.in: 1.99.22 (codename: French Onion Soup)
4627 2003-05-20 Dan Winship <danw@ximian.com>
4629 * libsoup/soup-message.c (soup_message_requeue): Clear the
4630 write_tag as well so we don't double-cancel it. #43395.
4632 * libsoup/soup-queue.c (soup_queue_error_cb): The connection might
4633 be destroyed by the end of the func, so we have to call
4634 soup_connection_set_used at the beginning.
4636 * libsoup/soup-openssl.c (soup_openssl_read, soup_openssl_write):
4637 Call g_set_error() so that we don't SEGV immediately after
4638 returning G_IO_STATUS_ERROR.
4640 2003-05-08 Joe Shaw <joe@ximian.com>
4642 * configure.in: Bump version to 1.99.21
4644 * libsoup/soup-queue.c (proxy_connect): If the proxy HTTPS
4645 tunnelling fails, the other message which shares our same
4646 connection will free it first, so set ours to NULL.
4648 2003-05-08 Dan Winship <danw@ximian.com>
4650 * libsoup/soup-auth.c (ntlm_auth): If the auth status is PENDING,
4651 return an NTLM request string. Otherwise return the "response"
4652 field (which should include the NTLM authenticate message)
4653 (ntlm_init): Don't bother setting "response" to the NTLM request
4654 string. Just leave it NULL in that case.
4656 * libsoup/soup-message.c (authorize_handler): Never try to reuse
4657 an NTLM auth returned from soup_auth_lookup. Only set the auth on
4658 the connection when it's SOUP_AUTH_STATUS_SUCCESSFUL. Otherwise,
4659 call soup_auth_set_context() on it just like for non-NTLM auth.
4660 The net effect of all of this is that now we record when a context
4661 needs NTLM auth just like with non-NTLM auth, so that that info
4662 gets preserved across connections.
4663 (soup_message_requeue): No longer need the hackery here to
4664 preserve the connection auth state.
4666 2003-05-07 Dan Winship <danw@ximian.com>
4668 * libsoup/soup-context.c (soup_connection_set_in_use): New, to
4669 toggle the connection's in_use flag, and set up the death watch
4670 when it's not in use.
4671 (connection_death): This is only hooked up when the connection is
4672 not in use now, so don't need to check that. Should fix the
4673 infinite connection_death loop.
4674 (soup_connection_is_new): Keep a distinct "new" flag rather than
4675 defining "new" as "has been released at least once".
4676 (soup_connection_set_used): Mark a connection no-longer new.
4677 (soup_context_connect_cb): Mark the connection as new. Don't set
4678 up the death watch since it's in_use.
4679 (try_existing_connections): Use soup_connection_set_in_use.
4680 (soup_connection_release): Likewise
4682 * libsoup/soup-message.c (requeue_read_finished): Call
4683 soup_connection_set_used so that the connection isn't still
4684 considered new when we send the message the second time.
4686 * libsoup/soup-queue.c (soup_queue_error_cb): Call
4687 soup_connection_set_used (assuming we don't close the connection)
4688 (soup_queue_read_done_cb): Likewise.
4690 * libsoup/soup-transfer.c (soup_transfer_read_cb): If we read
4691 nothing, call soup_transfer_read_error_cb rather than just
4692 cancelling, or else it will get cancelled again later.
4694 2003-05-07 Dan Winship <danw@ximian.com>
4696 * soup-2.0.pc.in (Libs): Don't put @OPENSSL_LIBS@ here; the
4697 library doesn't depend on them, only the proxy does. #42473
4699 2003-05-06 Dan Winship <danw@ximian.com>
4701 * src/libsoup/soup-message.c (global_handlers): Change the
4702 redirect handler to be a RESPONSE_ERROR_CLASS_HANDLER for
4703 SOUP_ERROR_CLASS_REDIRECT rather than a RESPONSE_HEADER_HANDLER
4704 for "Location" to get around the non-64-bit-clean union
4705 initialization pointed out by Jeremy Katz <katzj@redhat.com>.
4706 (redirect_handler): Update for that.
4708 2003-04-28 Dan Winship <danw@ximian.com>
4710 * configure.in: 1.99.20
4712 * libsoup/soup-transfer.c (soup_transfer_read_error_cb): Make sure
4713 we always call UNIGNORE_CANCEL. Might fix #41971
4715 2003-04-25 Dan Winship <danw@ximian.com>
4717 * libsoup/soup-queue.c (soup_queue_error_cb): if an old connection
4718 suddenly gets an io error while reading or writing, assume it's a
4719 timeout or something, close the connection, and requeue the
4722 2003-04-23 Dan Winship <danw@ximian.com>
4724 * libsoup/soup-message.c (soup_message_cleanup): Don't set up the
4725 soup-transfer callbacks to keep reading off the connection unless
4726 we're actually going to keep the connection around afterward.
4727 Otherwise we can just close it.
4729 * libsoup/soup-transfer.c: Re-kludge the awful IGNORE_CANCEL
4730 thingy so that it's possible to cancel a read from inside a
4731 callback so that the above change actually works instead of just
4734 2003-04-20 Rodney Dawes <dobey@ximian.com>
4736 * configure.in: Up version to 1.99.18
4737 * libsoup/Makefile.am: Line separator after GNUTLS_CFLAGS
4739 2003-04-11 Dan Winship <danw@ximian.com>
4741 * libsoup/soup-context.c (soup_connection_purge_idle): New
4742 function to close all idle connections. (Needed for #41117 or else
4743 there's no way to force-discard NTLM authentication.)
4745 * libsoup/soup-queue.c (soup_queue_shutdown): Use it
4747 2003-04-10 Joe Shaw <joe@ximian.com>
4749 * libsoup/soup-queue.c (proxy_https_connect):
4750 proxy_https_connect_cb() might not get called if connecting to the
4751 proxy fails, and it causes us to double-free the connection.
4752 Always set the message's connection to NULL before freeing it.
4754 2003-04-09 Dan Winship <danw@ximian.com>
4756 * configure.in: 1.99.17
4758 2003-04-07 Dan Winship <danw@ximian.com>
4760 * libsoup/soup-context.c (connection_death): Revert Joe's changes.
4761 We can't release the connection there because there may be
4762 SoupMessages still pointing to it. (Needs to be revisited.)
4764 2003-04-03 JP Rosevear <jpr@ximian.com>
4766 * libsoup/soup-ssl.c (soup_ssl_hup_waitpid): guard against EINTR
4767 error during waitpid
4769 * libsoup/soup-address.c: ditto
4771 2003-04-02 Joe Shaw <joe@ximian.com>
4773 * libsoup/soup-context.c (connection_death): Only drop the
4774 connection if we get an error condition on the channel. Fixes a
4777 2003-04-02 Joe Shaw <joe@ximian.com>
4779 * libsoup/soup-context.c (connection_death): Just call
4780 soup_connection_release() from here and return whether the
4781 connection is in use.
4783 2003-03-31 Ian Peters <itp@ximian.com>
4785 * libsoup/soup-gnutls.c (soup_gnutls_close): loop on gnutls_bye in
4786 case of EAGAIN or EINTR, since shutting down an SSL connection
4787 requires more than just closing a socket.
4789 2003-03-28 Dan Winship <danw@ximian.com>
4791 * libsoup/soup-message.c (soup_message_set_context): If the new
4792 context points to a different server from the old context, call
4793 soup_message_cleanup. Otherwise it tries to reuse the old
4796 2003-03-25 Joe Shaw <joe@ximian.com>
4798 * configure.in: Bump up to 1.99.16
4800 2003-03-24 Joe Shaw <joe@ximian.com>
4802 * soup-error.[ch]: Add SOUP_ERROR_SSL_FAILED which gives a
4803 slightly better error message on various SSL failures than the
4806 * soup-queue.c (soup_queue_error_cb): Throw the
4807 SOUP_ERROR_SSL_FAILED error when we fail an SSL handshake.
4809 2003-03-21 Joe Shaw <joe@ximian.com>
4811 * soup-server.c: Use non-deprecated g_main_loop_* calls
4813 (soup_server_unref): Don't unref the main loop if it's NULL.
4814 Fixes a glib warning.
4816 2003-03-18 Dan Winship <danw@ximian.com>
4818 * configure.in: comment out NSS checks. The NSS code doesn't work
4819 and there are no current plans to fix it.
4821 * README (Features): Mention GnuTLS, remove NSS and the rest of
4822 the "Planned Features" section.
4824 * MAINTAINERS: remove Alex
4826 * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Bump the
4827 timeout to 10 seconds (and get rid of the 3 tries) so we don't
4828 fail to connect just because the server is slow/far away.
4830 2003-03-17 Joe Shaw <joe@ximian.com>
4832 * configure.in: Bump up to 1.99.15.
4834 2003-03-12 Ian Peters <itp@ximian.com>
4836 * libsoup/soup-gnutls.c: because creating client credentials is
4837 expensive, keep the same one around as long as possible, only
4838 recreating it if the ssl_ca_file changes. Wrap
4839 gnutls_certificate_credentials in a refcounted struct to avoid
4840 freeing it while another established connection may potentially
4841 need it (say, to rehandshake).
4843 2003-03-11 Frank Belew <frb@ximian.com>
4845 * soup-2.0.pc.in: add ssl libs to defaults, since ssl doesn't
4848 2003-03-10 Joe Shaw <joe@ximian.com>
4850 * configure.in: Bump up to 1.99.14.
4852 * configure.in, libsoup/Makefile.am, libsoup/soup.gnutls.[ch],
4853 libsoup/soup-ssl.c: Add support for GnuTLS. Patch from Ian
4856 2003-03-07 Joe Shaw <joe@ximian.com>
4858 * configure.in: Bump up to 1.99.13.
4860 * libsoup/soup-context.c (soup_context_connect_cb): Add G_IO_IN to
4861 the list of conditions to watch. If the remote end hangs up the
4862 connection, we'll get a successful read of 0 bytes, not a HUP.
4863 The connection will have to be released by the point we check for
4864 it in connection_death().
4866 * libsoup/soup-queue.c (soup_queue_error_cb): Get rid of some
4867 (apparently) errant resetting of the read and write tags. I think
4868 this might have been causing some reentrancy and crashes.
4870 * libsoup/soup-socket.c (soup_socket_get_iochannel): Set the IO
4871 channel to NULL encoding and not buffered.
4873 * libsoup/soup-transfer.c (soup_transfer_read_cb): Remove some
4876 2003-02-28 Joe Shaw <joe@ximian.com>
4878 * configure.in: Bump up to 1.99.12.
4880 * libsoup/soup-transfer.c (soup_transfer_read_cb): We can get a
4881 header_len of 0 and a total_read of 0 in the case of a SIGPIPE; in
4882 this case we probably don't want to call the error callback, we
4883 just want to act like our transfer was cancelled.
4885 2003-02-27 Joe Shaw <joe@ximian.com>
4887 Try to apply some order to the iochannel refcounting...
4889 * configure.in: Bump up to 1.99.11.
4891 * libsoup/soup-context.c (soup_connection_get_iochannel): The
4892 connections needs to own a reference to the iochannel! If we're
4893 using HTTPS, release the ref we get from soup_socket_get_iochannel
4894 and replace it with the ref we get from soup_ssl_get_iochannel().
4895 Then, always ref the channel that we return (ugh, but that's the
4897 (connection_free): Release the connection's ref to the iochannel.
4899 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Ref the
4900 iochannel. The reference we pass back will be owned by the
4902 (soup_ssl_hup_waitpid): Release our ref.
4904 2003-02-27 Joe Shaw <joe@ximian.com>
4906 * configure.in: Bump up to 1.99.10.
4908 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Ref the
4909 iochannel, return to the status quo. Sigh.
4911 2003-02-26 Joe Shaw <joe@ximian.com>
4913 * configure.in: Bump up to 1.99.9.
4915 * libsoup/soup-ssl.c (soup_ssl_hup_waitpid): Comment out the unref,
4916 it's causing problems with HTTPS and proxies; the iochannel
4917 refcounting is waaaaaay horked.
4919 2003-02-26 Frank Belew <frb@ximian.com>
4921 * libsoup/Makefile.am: added workaround to link ssl-proxy statically
4923 2003-02-11 Joe Shaw <joe@ximian.com>
4925 * configure.in: Bump up to 1.99.8 for snaps.
4927 * libsoup/soup-address.c (soup_gethostbyname): Fix this for Solaris.
4928 It returns the address to the resulting hostent or NULL on failure,
4929 unlike Linux which returns an error code.
4931 2003-02-11 Joe Shaw <joe@ximian.com>
4933 * configure.in: Bump up to 1.99.7 for snaps.
4935 * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Print out
4936 the error string from OpenSSL if we can't establish a connection.
4938 2003-02-04 Joe Shaw <joe@ximian.com>
4940 * configure.in: Bump up to 1.99.6 for snaps.
4942 * libsoup/soup-server.c (destroy_message): We already assigned
4943 chan, so don't reassign it, and unref it in all cases.
4944 (issue_bad_request): Always unref after a call to
4945 soup_socket_get_iochannel(), because it refs it.
4946 (conn_accept): Fix some funky GIOChannel reffing here.
4948 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Don't call
4949 g_io_channel_ref() on the socket. This is the exact opposite of
4950 what we want to do. Create a temporary structure containing the
4951 parent pid and the old socket and unref the socket when our
4952 callback is called. This should fix GIOChannels being leaked on
4955 * libsoup/soup-ssl-proxy.c: Always close the GIOChannels after the
4958 2003-01-22 Joe Shaw <joe@ximian.com>
4960 * configure.in: Bump up to 1.99.5 for the snaps.
4962 * libsoup/soup-address.c (soup_address_new): If we found the
4963 address in our hash, we need to return NULL or else Soup will
4964 think we're doing an async lookup and do some cancellation on
4965 us. Besides, we were returning the wrong type anyway and it
4966 was crashing things.
4968 2003-01-17 Joe Shaw <joe@ximian.com>
4970 * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): It's not
4971 uncommon for us to get a G_IO_ERROR_AGAIN when trying to write
4972 out, so keep trying until we succeed.
4974 2003-01-10 Joe Shaw <joe@ximian.com>
4976 * libsoup/soup-openssl.c (verify_cb): Load some X509 and SSL error
4977 strings and print out the error when the cert can't verify.
4979 2003-01-09 Dan Winship <danw@ximian.com>
4981 * libsoup/soup-address.c (soup_gethostbyname): Fix a memcpy
4982 overrun noticed by valgrind
4984 2002-12-20 Joe Shaw <joe@ximian.com>
4986 * libsoup/soup-server.c (soup_server_new_with_host): Added.
4987 Starts a server only on the interface specified, instead of all
4990 2002-12-16 Jeremy Katz <katzj@redhat.com>
4992 * configure.in: use $libdir instead of /usr/lib when looking for
4995 2002-12-11 Joe Shaw <joe@ximian.com>
4997 * libsoup/soup-queue.c (proxy_https_connect_cb): I am an idiot.
4998 Don't set a variable to NULL and then immediately try to
5001 2002-12-09 Joe Shaw <joe@ximian.com>
5003 * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Put a
5004 timeout on the select()s when we get SSL_ERROR_WANT_READ/WRITE so
5005 we don't hang forever if we don't get more data.
5007 * libsoup/soup-ssl-proxy.c (main): Don't set our fds to blocking
5008 or else we'll hang forever in SSL_connect() if the other side
5011 * libsoup/soup-queue.c (proxy_https_connect_cb): We never want to
5012 release the connection on message free, even if the connection was
5015 2002-12-03 Joe Shaw <joe@ximian.com>
5017 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Call
5018 g_io_channel_set_close_on_unref() on the second half of the socket
5019 pair so we don't leak file descriptors.
5021 2002-12-03 Frank Belew <frb@ximian.com>
5023 * libsoup/soup-address.c: add signal.h to the list of headers to
5026 2002-11-25 Joe Shaw <joe@ximian.com>
5028 * Makefile.am: Build the tests directory again
5030 2002-11-21 Rodney Dawes <dobey@ximian.com>
5032 * configure.in: Don't require autoconf 2.5x, needs to work with 2.13
5034 2002-11-20 Michael Meeks <michael@ximian.com>
5036 * configure.in: require autoconf 2.52 not 2.53.
5038 2002-11-18 Dan Winship <danw@ximian.com>
5040 * libsoup/soup-address.c (soup_address_hash): Don't use s6_addr32
5041 since it's apparently non-portable. Use s6_addr instead.
5042 (soup_gethostbyaddr): fix a sometimes-uninitialized variable.
5044 * libsoup/soup-error.c: Fix spelling of
5045 SOUP_ERROR_MOVED_PERMANENTLY and its description.
5047 * libsoup/soup-message.c (soup_message_get_request_header, etc):
5048 Remove long-deprecated API.
5050 * libsoup/soup-socket.c (soup_socket_connect): remove unused
5053 * libsoup/soup-openssl.c (soup_openssl_read): Use gsize.
5054 * libsoup/soup-server.c (cgi_read): Likewise
5055 * libsoup/soup-socks.c (soup_socks_write, soup_socks_read):
5057 * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): Likewise.
5058 * libsoup/soup-transfer.c (soup_transfer_read_cb,
5059 soup_transfer_write_cb): Likewise.
5061 * tests/timeserver.c: Add "-6" to listen on the IPv6 local address
5062 instead of IPv4. (Tested on OS X.)
5064 2002-11-15 Dan Winship <danw@ximian.com>
5066 * libsoup/*: Change old Helix Code refs to Ximian (and update
5069 2002-11-15 Frank Belew <frb@ximian.com>
5071 * tests/Makefile.am: uncomment lines to make timeserver build
5074 2002-11-14 Joe Shaw <joe@ximian.com>
5076 * libsoup/soup-address.c (soup_address_new): When we get an
5077 address from the hash, call our address lookup callback or else
5078 the connection will hang.
5080 2002-11-13 Dan Winship <danw@ximian.com>
5082 * tests/timeserver.c: Oops, commit this.
5084 * tests/Makefile.am (noinst_PROGRAMS): reenable timeserver.
5086 2002-11-13 Joe Shaw <joe@ximian.com>
5088 * libsoup/Makefile.am: Replace the BINDIR define with LIBEXECDIR.
5089 (install-exec-hook): Install libsoup-ssl-proxy into libexecdir
5092 * libsoup/soup-openssl.c (soup_openssl_close): Call SSL_shutdown()
5093 to properly shut down the SSL connection before closing the
5096 * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): Close the
5097 iochannels before quitting the main loop.
5099 * tests/Makefile.am: disable building timeserver, the source file
5102 2002-11-12 Dan Winship <danw@ximian.com>
5104 * configure.in: Check for IPv6 support in networking headers.
5106 * libsoup/soup-address.c: Make the internal structure of
5107 SoupAddress entirely private, and make SoupAddress be more like a
5108 hostent and less like a sockaddr. (Ie, make it not have a port
5109 associated with it.) Document undocumented functions. Add
5110 completely-untested support for IPv6.
5111 (soup_address_new_from_sockaddr): New, to parse a sockaddr into a
5112 SoupAddress and a port.
5113 (soup_address_ipv4_any, soup_address_ipv6_any): Return static
5114 addresses corresponding to the IPv6 and IPv6 "any" addresses.
5115 (soup_address_get_canonical_name): Use inet_ntop/inet_ntoa.
5116 (soup_address_make_sockaddr): Now constructs a new sockaddr, which
5117 may be a sockaddr_in or sockaddr_in6.
5118 (soup_address_gethostname, soup_address_gethostaddr): Remove
5119 these. They aren't reliable, especially on multihomed hosts.
5120 (soup_gethostbyname, soup_gethostbyaddr): support IPv6
5121 (soup_address_new): Keep pending lookups in a separate hash table
5122 from completed lookups. Fix a bug when canceling a lookup when
5123 there was more one outstanding request for it.
5124 (soup_address_lookup_in_cache): Removed.
5126 * libsoup/soup-socket.c: Add a port field to SoupSocket (since
5127 it's not in SoupAddress any more).
5128 (soup_socket_connect): Simplify this. Don't use
5129 soup_address_lookup_in_cache, just call soup_address_new, since we
5130 already know the code can deal with the callback being invoked
5132 (soup_socket_new_sync, soup_socket_new): Take a port argument.
5133 (soup_socket_server_new): Take a SoupAddress to use as the local
5134 address to bind to. This lets the caller choose between the IPv4
5135 and IPv6 "any" addresses, and also lets you bind to a single
5136 interface of a multi-homed machine.
5137 (soup_socket_server_accept, soup_socket_server_try_accept): Merge
5140 * libsoup/soup-server.c (soup_server_new): Pass
5141 soup_address_ipv4_any() to soup_socket_server_new().
5143 * libsoup/soup-socks.c (soup_connect_socks_proxy,
5144 soup_socks_write): Fix up for the API changes, but it won't work
5147 * tests/timeserver.c: Another really simple test, for the server
5150 * tests/Makefile.am: build timeserver
5152 2002-11-11 Dan Winship <danw@ximian.com>
5154 * libsoup/soup-address.c: Move the SoupAddress code from
5155 soup-socket.c and soup-socket-unix.c to here.
5157 * libsoup/soup-socket.c: Move the remaining code from
5158 soup-socket-unix.c here.
5160 * libsoup/soup-socket-unix.c: Gone
5162 * tests/get.c: really really trivial test program
5164 * configure.in (AC_OUTPUT):
5165 * Makefile.am (SUBDIRS): add tests/
5167 2002-11-05 Dan Winship <danw@ximian.com>
5169 * Split libsoup out of soup. ChangeLog.old contains the original
5172 * Makefile.am, etc: Fix things up to work with the new directory
5173 layout. Disable docs until we fix them.
5175 * autogen.sh: Use gnome-autogen.sh
5177 * configure.in: Require autoconf 2.53. Remove stuff that was only
5178 needed for httpd or wsdl code. Remove glib1 support. Bump version
5181 * libsoup/Makefile.am: Rename library to libsoup-2.0, put includes
5182 in ${includedir}/soup-2.0
5184 * libsoup/*: Merge soup-0-7 back onto the trunk. Remove
5185 SOAP-specific stuff, Windows support, and other things that
5186 weren't being maintained.
5188 * soup-config.in, soupConf.sh: Kill these. We only support