1 2008-01-18 Dan Winship <danw@gnome.org>
3 * configure.in: require glib 2.15.3, not 2.15.0, since
4 AM_PATH_GLIB_2_0 didn't know about gio until post-2.15.2. Pointed
5 out by Matthew Barnes, #510216.
7 2008-01-18 Dan Winship <danw@gnome.org>
9 * libsoup/soup-auth-domain.c
10 (soup_auth_domain_set_generic_auth_callback):
11 (soup_auth_domain_check_password): add a new generic auth callback
12 that can be used with any subclass to do cleartext password
13 checking against messages. Suggested by Mathias Hasselmann.
15 * libsoup/soup-auth-domain-basic.c: Implement generic auth
17 * libsoup/soup-auth-domain-digest.c: Implement generic auth.
18 (soup_auth_domain_digest_evil_check_password): Gone, use the
21 2008-01-17 Dan Winship <danw@gnome.org>
23 * libsoup/soup-auth-digest.c (soup_auth_digest_compute_hex_urp)
24 (soup_auth_digest_compute_hex_a1)
25 (soup_auth_digest_compute_response): cast the second arg to
26 g_checksum_update to (guchar *) to avoid warnings
28 2008-01-16 Dan Winship <danw@gnome.org>
30 * libsoup/soup-headers.c (soup_headers_parse_status_line): Deal
31 with Shoutcast servers, which return "ICY 200 OK", but are
32 otherwise straight HTTP/1.0. #502325, Wouter Cloetens.
34 * tests/header-parsing.c (resptests): add a test for it
36 2008-01-16 Dan Winship <danw@gnome.org>
38 * libsoup/soup-auth-manager.c (authorize_handler, etc): Allow the
39 session authenticate signal to be handled asynchronously, by
40 pausing the message and then authenticating the auth later.
41 (auth_type_compare_func): make this work. oops.
42 (extract_challenge): plug leak
44 * libsoup/soup-auth-manager-ntlm.c: Make this work async too.
46 * libsoup/soup-headers.c (soup_header_parse_list):
47 (soup_header_parse_param_list): plug leaks
49 * tests/auth-test.c (do_async_auth_test): test async auth
51 * docs/reference/client-howto.xml (Handling Authentication):
54 2008-01-16 Dan Winship <danw@gnome.org>
56 * configure.in: Bomb out if glib 2.15.0 isn't found.
57 (AM_PATH_GLIB_2_0 doesn't do this itself.)
59 2008-01-15 Dan Winship <danw@gnome.org>
61 * libsoup/soup-auth-manager-ntlm.c: Replaces SoupConnectionNTLM;
62 now works as a SoupSession::request_started watcher.
64 * libsoup/soup-connection.c: remove the no-longer-needed
67 * libsoup/soup-session.c: Use a SoupAuthManagerNTLM if USE_NTLM is
68 set. Remove connection-authenticate-signal references.
70 2008-01-15 Dan Winship <danw@gnome.org>
72 * Merge libsoup-2.4 branch to trunk
74 2008-01-15 Dan Winship <danw@gnome.org>
76 * libsoup/soup-dns.c (resolve_status): Fix the logic here
78 2008-01-15 Dan Winship <danw@gnome.org>
80 * docs/reference/porting-2.2-2.4.xml: add a few more updates
82 2008-01-15 Dan Winship <danw@gnome.org>
84 * libsoup/soup-auth-digest.c: Use GChecksum for MD5
86 * libsoup/soup-md5-utils.[ch]: gone
88 2008-01-15 Dan Winship <danw@gnome.org>
90 * libsoup/soup-server.c (soup_server_run_async):
91 (soup_server_quit): Don't ref/unref the server here. It doesn't
92 match the way other things work. #494128, Mathias Hasselmann.
94 2008-01-14 Dan Winship <danw@gnome.org>
96 * libsoup/soup-address.h:
97 * libsoup/soup-auth-domain-basic.h:
98 * libsoup/soup-auth-domain-digest.h:
99 * libsoup/soup-auth-domain.h:
100 * libsoup/soup-auth.h:
101 * libsoup/soup-logger.h:
102 * libsoup/soup-message.h:
103 * libsoup/soup-server.h:
104 * libsoup/soup-session-async.h:
105 * libsoup/soup-session-sync.h:
106 * libsoup/soup-session.h:
107 * libsoup/soup-socket.h: Add padding for future expansion to class
110 2008-01-14 Dan Winship <danw@gnome.org>
112 * libsoup/soup-uri.c: Add more documentation.
113 (soup_uri_is_https): gone, replaced by SOUP_URI_SCHEME_HTTP /
114 SOUP_URI_SCHEME_HTTPS
115 (soup_uri_new): allow passing NULL to get back an "empty" SoupURI.
116 (soup_uri_to_string): rename just_path to just_path_and_query, to
117 avoid fooling people.
118 (soup_uri_decode, soup_uri_normalize): Change these to return the
119 decoded/normalized string rather than modifying it in place.
120 (soup_uri_set_scheme, etc): provide setters for SoupURI parts.
121 (soup_uri_set_query_from_form): set uri->query via
122 soup_form_encode_urlencoded().
124 2008-01-14 Dan Winship <danw@gnome.org>
126 * configure.in: require glib 2.15.0, and gio
128 * libsoup/soup-dns.c (soup_dns_lookup_resolve)
129 (soup_dns_lookup_resolve_async): Add GCancellables, and support
130 cancellation of DNS lookups.
131 (resolve_address, resolve_name): If we get a DNS failure (eg,
132 because we're disconnected from the network), don't cache that
133 result, just try again next time someone asks. [#508593]
135 * libsoup/soup-address.c (soup_address_resolve_async)
136 (soup_address_resolve_sync): Add GCancellables, pass them to
139 * libsoup/soup-socket.c (soup_socket_connect_async)
140 (soup_socket_connect_sync): Add GCancellables and implement
142 (soup_socket_start_ssl, soup_socket_start_proxy_ssl)
143 (soup_socket_read, soup_socket_read_until, soup_socket_write): add
144 GCancellables, though these routines don't actually implement
146 (soup_socket_disconnect): Don't close() the socket if someone is
147 doing I/O on it, as that creates a race condition. (The fd number
148 might be quickly recycled.) Instead, keep the socket open but
149 dead, via shutdown().
151 2008-01-14 Benjamin Otte <otte@gnome.org>
153 * libsoup/soup-socket.c: (soup_socket_class_init): clarify docs for
154 new-connection signal.
156 2008-01-14 Dan Winship <danw@gnome.org>
158 * tests/test-utils.c: renamed from apache-wrappers and expanded.
159 (test_init): do option parsing and general setup
160 (test_cleanup): print error count and do cleanup
161 (debug_printf): define here rather than in each test, and rename
162 from dprintf [#501631]
163 (soup_test_server_new): create a SoupServer, optionally in its own
164 thread, and clean it up when exiting.
165 (soup_test_session_new): create a SoupSession, optionally with
166 an attached SoupLogger (if requested via command line)
168 * tests/*.c: use test-utils
170 2008-01-13 Dan Winship <danw@gnome.org>
172 * libsoup/soup-logger.c: New HTTP debug logging object. (Based on
173 E2K_DEBUG and its clones.)
175 * libsoup/soup-message.c (soup_message_class_init)
176 (soup_message_add_header_handler)
177 (soup_message_add_status_code_handler): Change things around a
178 little; remove the "requeuing or cancelling the message stops
179 signal emission" rule, and instead make that be a feature of just
180 the header and status code handlers. (Makes the basic signal
181 handlers behave more predictably.)
183 2008-01-11 Dan Winship <danw@gnome.org>
185 * libsoup/soup-auth-domain.c (soup_auth_domain_set_filter):
186 * libsoup/soup-auth-domain-basic.c
187 (soup_auth_domain_basic_set_auth_callback):
188 * libsoup/soup-auth-domain-digest.c
189 (soup_auth_domain_digest_set_auth_callback):
190 * libsoup/soup-message.c (soup_message_cleanup_response)
191 (soup_message_set_flags, soup_message_set_http_version)
192 (soup_message_set_uri, soup_message_set_status)
193 (soup_message_set_status_full):
194 * libsoup/soup-message-client-io.c (parse_response_headers):
195 * libsoup/soup-message-server-io.c (parse_request_headers):
196 Call g_object_notify() when changing properties.
198 * libsoup/soup-session.c (soup_session_class_init): bump the
199 default value of SOUP_SESSION_MAX_CONNS_PER_HOST down to 2, per
202 * libsoup/soup-message-body.c (soup_buffer_copy): When copying a
203 TEMPORARY buffer, keep a reference to the copy, so that a second
204 copy will get that same buffer, rather than actually copying it
207 * libsoup/soup-types.h: remove SoupMessageFilter, which doesn't
210 2008-01-07 Dan Winship <danw@gnome.org>
212 * libsoup/soup-session.c (soup_session_class_init): Change
213 request_started signal to have a SoupSocket as its last parameter.
215 * libsoup/soup-server.c: Fix request_* signals to all be (server,
216 msg, client) rather than (server, client, msg).
218 2008-01-07 Dan Winship <danw@gnome.org>
220 * docs/reference/porting-2.2-2.4.xml: Notes on porting from 2.2 to
223 2008-01-07 Dan Winship <danw@gnome.org>
225 * libsoup/*.c: Move gtk-doc stuff from docs/reference/tmpl/ to the
226 C files themselves. Some updates.
228 * docs/reference/Makefile.am: fix (kludge?) this up to not require
231 * docs/reference/client-howto.xml:
232 * docs/reference/server-howto.xml: update
234 2008-01-06 Dan Winship <danw@gnome.org>
236 * libsoup/soup-soap-message.c:
237 * libsoup/soup-soap-response.c: For the second time, remove SOAP
238 support from libsoup... These APIs are not really all that helpful
239 in the grand scheme of SOAPiness, and are only used by the
240 Evolution GroupWise backend, which can just import this code and
241 integrate it better there.
243 * libsoup/soup-misc.c (soup_xml_real_node):
244 * libsoup/soup-xmlrpc.c: Move soup_xml_real_node out of soup-misc
245 to soup-xmlrpc, and make it private. libxml is no longer exposed
248 2008-01-06 Dan Winship <danw@gnome.org>
250 * libsoup/soup-date.c (soup_date_new_from_now): new method to
251 generate a date relative to now.
252 (soup_date_new, etc): document SoupDate methods
254 * libsoup/soup-server.c (got_headers): set Date header, as
257 2008-01-06 Dan Winship <danw@gnome.org>
259 * libsoup/soup-server.c (got_headers): if raw_paths isn't set,
260 decode the request's uri->path before doing anything else
261 (soup_server_class_init): add "raw-paths" property, to tell
262 SoupServer to NOT decode the Request-URI path.
264 * libsoup/soup-auth-domain.c (soup_auth_domain_covers): Revert
265 earlier path-decoding change; that happens at the SoupServer level
268 2008-01-06 Dan Winship <danw@gnome.org>
270 * libsoup/soup-message-body.c (soup_buffer_get_type): Register
271 SoupBuffer as a boxed type.
273 * libsoup/soup-message.c (soup_message_class_init): Use
274 SOUP_TYPE_BUFFER in got_chunk signal definition
276 * libsoup/soup-server.c (soup_client_context_get_type): Register
277 SoupClientContext as a pointer type
278 (soup_server_class_init): use SOUP_TYPE_CLIENT_CONTEXT in signal
281 * libsoup/soup-marshal.list: clean this up
283 2008-01-06 Dan Winship <danw@gnome.org>
285 * libsoup/soup-server.c (SoupClientContext): Make this opaque.
286 (soup_client_context_get_socket)
287 (soup_client_context_get_auth_domain)
288 (soup_client_context_get_auth_user): New accessors
289 (soup_server_class_init): Make the signals take a
290 SoupClientContext rather than a SoupSocket.
291 (start_request, check_auth, call_handler, request_finished): Clean
292 these up by using a SoupClientContext to communicate between them.
293 (soup_server_add_handler): tweak the argument order to match the
294 gtk standard (callback, user_data, destroynotify).
296 2008-01-06 Dan Winship <danw@gnome.org>
298 * libsoup/soup-address.c: remove the "dns_result" signal, which
299 was just an implementation detail of soup_address_resolve_async().
301 2008-01-06 Dan Winship <danw@gnome.org>
303 * libsoup/*.c: misc documentation updates/gtk-doc fixes
305 * libsoup/soup-server.c: finally start documenting this properly.
307 * libsoup/soup-status.h (SoupStatusClass): kill this, since
308 soup_message_add_status_class_handler() is gone now.
310 * libsoup/soup-status.c (soup_status_get_phrase): Update docs to
311 explain that you probably don't want to use this.
313 * libsoup/soup-misc.h (SOUP_SSL_ERROR, SoupSSLError): Move these
314 here, since soup-ssl.h isn't installed.
316 * docs/references: start updating this...
318 2008-01-04 Dan Winship <danw@gnome.org>
320 * libsoup/soup-message-body.c (soup_buffer_new)
321 (soup_message_body_append): Reorder the arguments to match
322 soup_message_set_request/response, so it's not confusing.
324 * libsoup/soup-message.c (wrote_chunk): remove the "chunk" arg
325 from the signal, as it turns out to be *in*convenient, since most
326 callers use this signal to mean "need another chunk", so they want
327 it to have the same prototype as "wrote_headers", which means
330 2008-01-04 Dan Winship <danw@gnome.org>
332 * libsoup/soup-auth-domain.c: add documentation
333 (soup_auth_domain_set_filter): take a GDestroyNotify, for better
336 * libsoup/soup-auth-domain-basic.c:
337 * libsoup/soup-auth-domain-digest.c: Add documentation. Replace
338 authentication signals with more-easily-bindable authentication
339 callbacks (with GDestroyNotifys).
340 (soup_auth_domain_digest_evil_check_password): Add this for the
341 benefit of code that depends on being able to do the equivalent
342 of the old soup_server_auth_check_passwd().
344 2008-01-02 Dan Winship <danw@gnome.org>
346 * libsoup/soup-message-body.h (SoupMessageBody): add data and
347 length parameters like SoupBuffer, to make this easier for callers
350 * libsoup/soup-message-body.c (soup_message_body_append)
351 (soup_message_body_append_buffer)
352 (soup_message_body_truncate): Update body->length
353 (soup_message_body_flatten): Fill in body->data (and NUL-terminate
354 it as an added bonus).
356 * libsoup/soup-message.c (got_body): flatten the newly-gotten
358 (soup_message_get_request, soup_message_get_response): gone
360 * libsoup/soup-message-client-io.c (get_request_headers):
361 * libsoup/soup-message-server-io.c (get_response_headers):
362 * libsoup/soup-soap-message.c (soup_soap_message_parse_response):
363 * tests/*.c: simplify
365 2008-01-02 Dan Winship <danw@gnome.org>
367 * libsoup/Makefile.am (soup_headers): oops, move soup-auth.h here
369 2008-01-02 Dan Winship <danw@gnome.org>
371 * libsoup/soup-form.c: new HTML-form-related methods (just URI
372 decoding/encoding at the moment).
374 * libsoup/soup-server.h (SoupServerCallback): change the prototype
375 to include the decoded path and query rather than the undecoded
378 * libsoup/soup-server.c (call_handler): %-decode the URI path
379 before looking up a handler. Decode query if available. Pass path
380 and query to the callback.
382 * libsoup/soup-auth-domain.c (soup_auth_domain_covers): fix this
383 to %-decode the URI path before testing it
385 * libsoup/soup-message-body.c (soup_message_body_append): allow
388 * tests/query-test.c: URI query parsing test
390 2008-01-02 Dan Winship <danw@gnome.org>
392 * libsoup/soup-uri.c:
393 * libsoup/soup-uri.h: Change all the "const SoupURI *" to just
394 "SoupURI *", since the const is just there to be annoying.
398 2008-01-02 Dan Winship <danw@gnome.org>
400 * libsoup/soup-message-body.c (soup_message_body_get_length)
401 (soup_message_body_get_chunk): Use goffset rather than gsize for
402 references to the entire size of the message body. (SoupBuffer
403 still uses gsize, so individual chunks can only be G_MAXSIZE
406 * libsoup/soup-message-headers.c
407 (soup_message_headers_get_content_length):
408 (soup_message_headers_set_content_length): Likewise, use goffset.
410 2008-01-02 Dan Winship <danw@gnome.org>
412 * libsoup/soup-message-headers.c (soup_message_headers_get):
413 Renamed from soup_message_headers_find, and with new behavior; now
414 multiple headers with the same name are automatically merged
415 together into a single comma-separated value, to ensure that apps
416 treat multivalued headers the same regardless of how upstream
417 servers generate them.
418 (soup_message_headers_find_nth): no longer needed/wanted
420 * libsoup/soup-auth-manager.c: Update to deal with
421 SoupMessageHeaders change. (Ugh.)
423 * tests/header-parsing.c: Update multiple-values test, and undo a
424 change that mistakenly got committed while debugging something
427 2008-01-01 Dan Winship <danw@gnome.org>
429 * libsoup/soup-auth-manager.c:
430 * libsoup/soup-dns.c:
431 * libsoup/soup-gnutls.c:
432 * libsoup/soup-message.c:
433 * libsoup/soup-message-io.c:
434 * libsoup/soup-message-queue.c:
435 * libsoup/soup-misc.c:
436 * libsoup/soup-path-map.c:
437 * libsoup/soup-server.c:
438 * libsoup/soup-session.c:
439 * libsoup/soup-session-sync.c:
440 * libsoup/soup-socket.c: Use g_slice.
442 2008-01-01 Dan Winship <danw@gnome.org>
444 * libsoup/soup-session.c (soup_session_cancel_message): add a
445 "status_code" argument rather than having the caller set the
446 status code separately, to prevent a race condition.
448 2008-01-01 Dan Winship <danw@gnome.org>
450 * libsoup/soup-session.c (soup_session_queue_message): change the
451 callback type to include the SoupSession as a parameter as well.
455 2007-12-31 Dan Winship <danw@gnome.org>
457 * libsoup/soup-session.c (soup_session_class_init): change
458 the "authenticate" signal to include a SoupAuth rather than its
459 components, and to have a "retrying" parameter rather than
460 separating "authenticate" and "reauthenticate".
462 * libsoup/soup-connection.c (soup_connection_class_init): Likewise
464 * libsoup/soup-auth-manager.c (authenticate_auth): update
466 * libsoup/soup-auth.c: make various attributes into gobject
468 (soup_auth_is_for_proxy): check whether an auth is plain or proxy
469 (soup_auth_get_host): get the hostname associated with an auth
471 * libsoup/soup-auth-ntlm.c: dummy class used by SoupConnectionNTLM
472 in the authenticate signal
474 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): update for
475 authenticate signals changes; use a fake SoupAuthNTLM to assist.
477 2007-12-20 Dan Winship <danw@gnome.org>
479 * libsoup/soup-message.c (soup_message_add_header_handler)
480 (soup_message_add_status_code_handler): Make these be wrappers
481 around g_signal_connect() rather than having a completely separate
483 (soup_message_class_init): improve signal docs. Use
484 "got_foo_signal_wrapper" to wrap the got-foo signals.
485 (got_foo_signal_wrapper): Wraps the marshaller for the got-foo
486 signals and cancels the signal emission if the message gets
487 cancelled or requeued.
488 (got_informational, got_headers, got_chunk, got_body): remove
489 no-longer-needed default implementations.
491 * libsoup/soup-message-handlers.c: gone
493 * tests/ntlm-test.c (do_message): Simplify now that callback
494 processing doesn't happen in two separate phases.
496 2007-12-20 Dan Winship <danw@gnome.org>
498 * libsoup/soup-auth-domain.c:
499 * libsoup/soup-auth-domain-basic.c:
500 * libsoup/soup-auth-domain-digest.c: New server-side auth system.
502 * libsoup/soup-server.c: remove SoupServerAuth / SoupAuthContext
503 stuff, add SoupAuthDomain support.
504 (SoupServerCallbackFn): improve the args here
505 (SoupClientContext): renamed from SoupServerContext and made less
508 * libsoup/soup-server-auth.c: gone!
510 * libsoup/soup-auth-digest.c (soup_auth_digest_parse_algorithm)
511 (soup_auth_digest_get_algorithm, soup_auth_digest_parse_qop)
512 (soup_auth_digest_get_qop, soup_auth_digest_compute_hex_urp)
513 (soup_auth_digest_compute_hex_a1)
514 (soup_auth_digest_compute_response): New routines shared between
515 client-side and server-side digest auth.
517 * tests/server-auth-test.c: test server-side auth, using curl for
520 * configure.in: check for curl, for server-auth-test
522 2007-12-20 Dan Winship <danw@gnome.org>
524 * libsoup/soup-headers.c (soup_header_parse_list)
525 (soup_header_parse_quality_list): New methods to parse list-type
526 headers (with optional qvalues) correctly.
527 (soup_header_parse_param_list): Rename to match the other methods,
528 and update the semantics a bit.
529 (soup_header_contains): Correctly check for a token in a list
531 * libsoup/soup-message.c (soup_message_is_keepalive):
532 * libsoup/soup-message-client-io.c (get_request_headers):
533 * libsoup/soup-message-server-io.c (parse_request_headers): Use
534 soup_header_contains() with Connection headers.
536 * tests/header-parsing.c (do_qvalue_tests): add
537 soup_header_parse_quality_list() test
539 2007-12-20 Dan Winship <danw@gnome.org>
541 * libsoup/soup-auth-manager.c: Move auth-related code from
542 SoupSession and SoupAuth here, and make various cleanups and
543 beginnings of cleanups.
545 * libsoup/soup-session.c: lots of stuff moved to
548 * libsoup/soup-auth.c (soup_auth_new_from_headers): partly moved
549 to soup-auth-manager.c, partly renamed to soup_auth_new().
550 (soup_auth_update): new method to update an existing auth based on
551 a new WWW-Authenticate/Proxy-Authenticate header. Also replaces
552 the old "construct" method.
554 * libsoup/soup-auth-digest.c (update): Implement. If the new auth
555 has stale=true, don't invalidate the auth, just update the nonce.
556 (get_authorization): add a header handler to the message to catch
557 Authentication-Info/Proxy-Authentication-Info headers so that if
558 there's a nextnonce, we can start using it. #471380.
560 * libsoup/soup-auth-basic.c (update): Implement. (Updating an
561 existing Basic auth always invalidates it.)
563 * tests/http.conf.in:
564 * tests/auth-test.c: add a test for digest nonce handling
566 2007-12-20 Dan Winship <danw@gnome.org>
568 * libsoup/soup-path-map.c: New type representing a sparse
569 path->something mapping
571 * libsoup/soup-server.c: Use SoupPathMap to record handlers. Make
572 SoupServerHandler a private type.
573 (soup_server_new): Rewrite this to just be a thin wrapper, and put
574 all of the code into a constructor override. #491653
575 (soup_server_add_handler): Turn the "unregister" arg into a
576 GDestroyNotify, for better bindability.
578 2007-12-19 Dan Winship <danw@gnome.org>
580 * libsoup/soup-server.c: define new request_started, request_read,
581 request_finished, and request_aborted signals, for finer-grained
582 tracking than normal handlers allow.
583 (check_auth): split this out of call_handler, and run it
584 immediately after "got_headers", not "got_body", so that we can
585 preemptively reject "Expect: 100-continue" messages that will
588 * libsoup/soup-message-io.c (io_write, io_read): Fix up
589 100-continue processing
591 * tests/continue-test.c: new test of client/server 100-continue
594 2007-12-19 Dan Winship <danw@gnome.org>
596 * libsoup/soup-socket.c: Cleanup. Remove the "connect_result"
597 signal. Make local_address and remote_address
598 into (construct-only) properties.
599 (soup_socket_connect_async, soup_socket_connect_sync): Replace
600 soup_socket_connect. _async takes a callback+user_data (like the
601 old soup_socket_client_new_async), but doesn't implement the
602 callback in terms of a connect_result signal.
603 (soup_socket_client_new_async, soup_socket_client_new_sync): Gone.
604 (Unused since the async_context addition anyway). Replaced by the
605 new construct properties and connect methods.
606 (soup_socket_read, soup_socket_read_until, soup_socket_write):
607 Make these actually take a GError rather than doing an ugly hack
608 to preserve the old API.
609 (SOUP_SOCKET_FLAG_NODELAY, SOUP_SOCKET_FLAG_REUSEADDR)
610 (SOUP_SOCKET_FLAG_CLOEXEC): kill these off (all three are always
611 TRUE now); SoupSocket is libsoup's socket API; it's not
612 necessarily intended to be generically useful for everyone.
614 * *.c: Update for SoupSocket changes
616 2007-12-19 Dan Winship <danw@gnome.org>
618 * libsoup/soup-server-message.c: Kill!
620 * libsoup/soup-message-server-io.c (parse_request_headers):
621 Generate the full request URL from the socket's data, since we no
622 longer have soup_server_message_get_server().
624 * libsoup/soup-server.c (request_finished, call_handler)
625 (start_request, new_connection): update
627 2007-12-19 Dan Winship <danw@gnome.org>
629 * libsoup/soup-message-headers.c: Add some more fields to
630 SoupMessageHeaders, and start caching the parsed values of certain
632 (soup_message_headers_get/set_encoding): replaces old SoupMessage
633 methods, and only deals with the declared transfer encoding, not
635 (soup_message_headers_get/set_content_length): Handle
637 (soup_message_headers_get_expectations): Handle Expect. (Replaces
638 the SOUP_MESSAGE_EXPECT_CONTINUE flag).
640 * libsoup/soup-message.c (soup_message_get_request_encoding):
641 (soup_message_get_response_encoding):
642 (soup_message_set_response_encoding): replaced by
643 SoupMessageHeaders methods.
645 * libsoup/soup-message-client-io.c:
646 * libsoup/soup-message-server-io.c:
647 * libsoup/soup-message-io.c: Update for SoupMessageHeaders changes
648 with encoding/content-length stuff.
650 2007-12-19 Dan Winship <danw@gnome.org>
652 * libsoup/soup-message-body.c (SoupMessageBody): new opaque type
653 for request/response bodies allowing less hacky handling of
655 (SoupBuffer): refcounted buffer type
657 * libsoup/soup-message.h (SoupMessage): turn request and response
658 members into SoupMessageBody.
659 (SoupOwnership, SoupDataBuffer): gone, replaced by
660 SoupMessageBody/SoupBuffer.
662 * libsoup/soup-message.c (soup_message_wrote_chunk)
663 (soup_message_got_chunk): add the chunk as a signal param rather
664 than having it be visible in msg->request/response.
665 (soup_message_add_chunk, soup_message_add_final_chunk)
666 (soup_message_pop_chunk): replaced by SoupMessageBody methods now.
668 2007-12-19 Dan Winship <danw@gnome.org>
670 * libsoup/soup-xmlrpc.c:
671 * libsoup/soup-value-utils.c: Oops. Change the API a bunch so this
672 works on x86; apparently I was doing illegal things with va_lists
673 before that only work on x86_64.
675 2007-12-14 Dan Winship <danw@gnome.org>
677 * libsoup/soup-message.c: use GObject properties for SoupMessage
680 * libsoup/soup-message-server-io.c:
681 * libsoup/soup-soap-message.c: update for that
683 2007-12-14 Dan Winship <danw@gnome.org>
685 * libsoup/soup-uri.c: Rename from SoupUri to SoupURI. Use the
686 slice allocator and register as a boxed type.
687 (SoupURI): Rename "protocol" field to "scheme" and "passwd" to
688 "password". Make scheme an interned string. Replace
689 SOUP_PROTOCOL_HTTPS with soup_uri_is_https().
693 2007-12-14 Dan Winship <danw@gnome.org>
695 * libsoup/Makefile.am: Use glib-mkenums to build soup-enum-types.c
696 and soup-enum-types.h
698 * libsoup/soup-address.h (SoupAddressFamily): redo this definition
699 again, to make glib-mkenums happy.
701 2007-12-13 Dan Winship <danw@gnome.org>
703 * libsoup/soup-xmlrpc.c: New easier-to-use and
704 easier-to-do-language-bindings-of XML-RPC code.
706 * libsoup/soup-xmlrpc-message.c:
707 * libsoup/soup-xmlrpc-response.c: gone
709 * libsoup/soup-value-utils.c: Utilites for working with
710 GValueArray, and GHashTables of GValues, used by soup-xmlrpc.
713 * tests/xmlrpc-test.c: Update to use new XML-RPC stuff
715 2007-12-13 Dan Winship <danw@gnome.org>
717 * libsoup/soup-date.c: Make a SoupDate type, and redo in terms of
718 that rather than struct tm and time_t. Also be much more liberal
721 * libsoup/soup-xmlrpc-message.c (soup_xmlrpc_message_write_datetime):
722 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_datetime):
725 * tests/date.c: Use SoupDate, test parsing lots more formats
727 * tests/xmlrpc-test.c: update for SoupDate
729 2007-12-12 Dan Winship <danw@gnome.org>
731 * libsoup/soup-message.c:
732 * libsoup/soup-message-private.h: Remove SoupMessageStatus,
733 msg->status, and soup_message_io_* from the public API, as they
734 all really belong to the session, not the message. (For now
735 they've just been moved to soup-message-private.h, but some day
736 they'll be fully refactored away from SoupMessage.)
738 * libsoup/soup-server.c (soup_server_pause_message)
739 (soup_server_unpause_message):
740 * libsoup/soup-session.c (soup_session_pause_message)
741 (soup_session_unpause_message): session/server-level methods to
742 replace soup_message_io_pause() and soup_message_io_unpause().
744 * libsoup/soup-server-message.c: Remove some unused methods
748 2007-12-05 Dan Winship <danw@gnome.org>
750 * libsoup/soup-connection.c:
751 * libsoup/soup-session.c: replace message filters with a
752 "request_started" signal
754 * libsoup/soup-message-filter.c: gone
756 * libsoup/soup-types.h (SOUP_MAKE_INTERFACE): no longer needed
758 2007-12-05 Dan Winship <danw@gnome.org>
760 * libsoup/soup-uri.c: Update for RFC 3986 changes, bgo 266516, and
762 (soup_uri_get_protocol): match protocols case-insensitively
763 (soup_uri_new_with_base): Don't fully %-decode the fragment,
764 query, and path, but do %-decode anything which isn't supposed to
765 be encoded. Recognize IPv6 address literals. Use stricter
766 "../"-stripping rules on the path. Reject URIs with junk between
767 the port number and the path.
768 (soup_uri_to_string): Update for the fact that the host might be
769 an IPv6 literal, and for the fact that path, query, and fragment
771 (soup_uri_equal): compare hostnames case-insensitively
772 (uri_encoded_char): update to match RFC 3986
773 (append_uri_encoded): use uppercase hex letters as recommended by
775 (soup_uri_normalize): decode only %-escapes that don't belong
778 * docs/reference/tmpl/soup-uri.sgml: add some more SoupUri docs
780 * tests/uri-parsing.c: Add new tests from RFC 3986, RFC 2732, RFC
781 2616, bgo 266516, and elsewhere. Update some tests to match new
782 parsing/unparsing rules.
784 2007-12-05 Dan Winship <danw@gnome.org>
786 * libsoup/soup-message.c (soup_message_new)
787 (soup_message_new_from_uri): g_intern_string() the method name
788 rather than assuming it's static. Also remove the NULL==GET
791 * libsoup/soup-method.c:
792 * libsoup/soup-method.h: remove the SOUP_METHOD_ID_* macros, and
793 have the SOUP_METHOD_* macros return interned strings
795 * libsoup/soup-server.h (SoupServerContext): remove method_id
798 * libsoup/soup-server-message.c (finalize): no longer needed,
799 since smsg->method is now an interned string just like with a
802 * libsoup/soup-soap-message.c (soup_soap_message_new_from_uri):
803 remove NULL==GET assumption
807 2007-12-05 Dan Winship <danw@gnome.org>
809 * libsoup/soup-message.h (SoupHTTPVersion): rename (from
812 * libsoup/soup-message-headers.c: New opaque type representing
813 message headers, and new methods that work on it. Uses an array
814 rather than a hash table, to preserve header ordering as required
815 by RFC 2616. (Also fixes the API wart that
816 "soup_message_get_header", etc, did not actually take a
819 * libsoup/soup-message.c: Kill off old header-manipulating
822 * libsoup/soup-headers.c (soup_headers_parse_request): return a
823 guint rather than gboolean, so we can properly return
824 SOUP_STATUS_HTTP_VERSION_NOT_SUPPORTED where appropriate. Also fix
825 up HTTP-Version parsing to conform with the RFC.
826 (soup_headers_parse_status_line): Likewise update HTTP-Version
829 * libsoup/soup-message-server-io.c (parse_request_headers): set
830 return status appropriately on parse errors
832 * tests/header-parsing.c: update / add more tests
836 2007-12-05 Dan Winship <danw@gnome.org>
838 * libsoup/soup-misc.c: remove deprecated base64 methods
840 * tests/auth-test.c (identify_auth): oops, update to use
843 2007-12-05 Dan Winship <danw@gnome.org>
845 * libsoup/Makefile.am (libsoupinclude_HEADERS): remove
846 soup-connection.h and soup-message-queue.h
848 * libsoup/soup-types.h: remove SoupConnection and SoupMessageQueue
849 which are no longer public
851 * libsoup/soup.h: sync this to reality for the first time in years
853 * libsoup/soup-session.c (soup_session_get_queue): Add this, for
854 subclasses, as the queue is no longer a public part of the session
857 * libsoup/soup-message.h:
858 * libsoup/soup-message-private.h: Move soup_message_send_request()
859 and soup_message_receive_request() to soup-message-private.h,
860 remove soup_message_send_request_internal().
862 * libsoup/soup-session-private.h: Move "protected" SoupSession
863 methods (soup_session_get_connection,
864 soup_session_try_prune_connection) here from soup-session.h
865 Add soup_session_get_queue.
867 2007-12-05 Dan Winship <danw@gnome.org>
869 * configure.in: bump version to 2.3.0 and SOUP_API_VERSION to 2.4,
870 and drop AGE/CURRENT/REVISION all to 0.
872 * libsoup/Makefile.am: Rename library to libsoup-2.4.la
874 (start of libsoup-2.4 branch)
876 2007-11-26 Dan Winship <danw@gnome.org>
878 * configure.in: 2.2.104
882 2007-11-21 Dan Winship <danw@gnome.org>
884 * libsoup/soup-message-io.c (soup_message_io_cleanup): make this
887 * libsoup/soup-message.c (finalize): Use soup_message_io_cleanup()
888 rather than soup_message_io_stop(), to avoid leaks when finalizing
889 an unfinished message. (Another part of #498509, Wouter Cloetens.)
891 2007-11-20 Dan Winship <danw@gnome.org>
893 Fix up SOUP_SESSION_ASYNC_CONTEXT. #498509, Wouter Cloetens
895 * libsoup/soup-message-io.c (soup_message_io_unpause): don't leak
898 * libsoup/soup-server.c (soup_server_quit): disconnect the
899 "new_connection" handler.
900 (soup_server_get_async_context): Convenience method to return the
901 server's async_context.
903 * libsoup/soup-server-message.c: don't circularly ref the server,
904 there's no need anyway.
906 * libsoup/soup-session.c (soup_session_get_async_context):
907 Convenience method to return the session's async_context.
909 * libsoup/soup-session-async.c (queue_message): call run_queue in
910 the session's async_context, not the main context.
911 (send_message): don't leak the async_context
913 * libsoup/soup-session-sync.c (queue_message_thread): don't leak
916 * tests/context-test.c: test that SOUP_SESSION_ASYNC_CONTEXT works
919 2007-11-20 Dan Winship <danw@gnome.org>
921 * libsoup/soup-connection.c (soup_connection_connect_async): don't
922 leak the SoupAddress.
924 * libsoup/soup-dns.c (soup_dns_lookup_resolve_async): fix a leak
925 when re-looking up an address
927 * libsoup/soup-session.c (soup_session_abort): close all
928 connections in addition to cancelling messages (needed because
929 connections currently end up holding a ref on their session,
930 preventing them from being destroyed).
934 * tests/proxy-test.c:
937 * tests/xmlrpc-test.c: clean up more memory on exit, to help find
940 * tests/libsoup.supp: add a zillion new suppressions so we
941 can use --leak-resolution=med
943 2007-11-16 Dan Winship <danw@gnome.org>
945 * libsoup/soup-message-io.c (read_body_chunk): Fix the guards
946 around the got_chunk emission so that it doesn't get messed up if
947 you pause the I/O from the got_chunk handler. (#452280, Marco
949 (soup_message_io_pause, soup_message_io_unpause): Update docs
950 again; these are now allowed with client-side I/O as well. Fix
951 unpause() to unpause asynchronously on async sockets.
953 * libsoup/soup-session-async.c (send_message): Iterate session's
954 async_context, not the default main context.
956 * tests/pull-api.c: Test/sample of creating a pull-style API using
959 * tests/index.txt: new file to act as DirectoryIndex for the
960 tests. (In particular, pull-api wants this to be largeish.)
962 2007-10-28 Dan Winship <danw@gnome.org>
964 * configure.in: 2.2.103
968 2007-10-28 Dan Winship <danw@gnome.org>
970 * libsoup/soup-server.c (start_request, request_finished): ref the
971 socket around the processing of the message, since otherwise it
972 might already be freed when request_finished runs. #459896.
974 * libsoup/soup-message-io.c (soup_message_io_pause)
975 (soup_message_io_unpause): Clarify the docs here; this is for
976 server-side use only. Inspired by #452280.
978 * docs/reference/server-howto.xml: You need to watch the
979 "finished" signal on the message if using soup_message_io_pause()
980 or chunked encoding, because the client might disconnect while
981 you're paused. Clarification inspired by #471385.
983 * tests/simple-proxy.c (client_msg_failed): Fix this to DTRT since
984 server-howto.xml points to it as an example of what to do.
986 2007-10-28 Dan Winship <danw@gnome.org>
988 * libsoup/soup-session.c (finalize): free proxy-related stuff
990 * libsoup/soup-session-async.c (idle_run_queue): clean up the weak
991 pointer. (From the dev repo, but identical to a patch from Rob
992 Bradford in #484988.)
994 * tests/*.c: fix leaks
996 2007-10-28 Dan Winship <danw@gnome.org>
1000 * tests/header-parsing.c:
1001 * tests/ntlm-test.c:
1002 * tests/proxy-test.c:
1003 * tests/uri-parsing.c:
1004 * tests/xmlrpc-test.c: Make these less verbose by default (to make
1005 it easier to see what failed when a "make check" fails).
1007 2007-10-15 Dan Winship <danw@gnome.org>
1009 * configure.in: 2.2.102
1013 2007-10-08 Dan Winship <danw@gnome.org>
1015 * libsoup/soup-nossl.c: Update for current soup-ssl.h prototypes
1017 * tests/proxy-test.c (run_test): wrap https tests in #if HAVE_SSL
1019 2007-10-05 Dan Winship <danw@gnome.org>
1021 * configure.in: 2.2.101
1025 * tests/httpd.conf.in:
1026 * tests/Makefile.am:
1027 * tests/ssl-test.c: srcdir != builddir fixes
1029 2007-10-05 Dan Winship <danw@gnome.org>
1031 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Don't crash
1032 if the authenticate callback returns a username and no password
1033 (even though it's not supposed to do that). #480987
1035 2007-09-24 Dan Winship <danw@gnome.org>
1037 * libsoup/soup-auth.h (SoupAuth): add "realm" field to the struct.
1038 (SoupAuthClass) remove "get_realm" virtual method.
1040 * libsoup/soup-auth.c (soup_auth_new_from_header_list): Parse the
1041 WWW-Authenticate/Proxy-Authenticate header here, set realm, and
1042 pass the params hash to the construct method.
1043 (soup_auth_get_info): Return an identifier for the auth:
1046 * libsoup/soup-auth-basic.c:
1047 * libsoup/soup-auth-digest.c: update
1049 * libsoup/soup-session.c (invalidate_auth, update_auth_internal):
1050 use soup_auth_get_info().
1052 2007-09-24 Dan Winship <danw@gnome.org>
1054 * libsoup/soup-date.c (soup_date_parse): minor rfc850-date parsing
1055 improvement suggested by RFC2616 19.3.
1057 * libsoup/soup-headers.c (soup_headers_parse_request): allow
1058 erroneous trailing whitespace after HTTP version. #475169
1060 * libsoup/soup-message-server-io.c (parse_request_headers): fix
1061 the parsing of the Host header to assume it already includes the
1062 port (which it should; the only reason this ever worked is because
1063 SoupUri ignores the second port number when parse_request_headers
1064 generates a URL like "http://localhost:9999:9999/").
1066 * tests/header-parsing.c (reqtests): add a test for #475169
1068 2007-09-23 Dan Winship <danw@gnome.org>
1070 * libsoup/soup-message.c (soup_message_class_init): remove a
1071 mysterious partial sentence in the ::wrote-chunk docstring.
1074 * docs/reference/libsoup-sections.txt: Remove documentation of MD5
1075 methods, which are not public. #440092
1077 2007-09-23 Dan Winship <danw@gnome.org>
1079 * libsoup/soup-message.c (soup_message_set_auth)
1080 (soup_message_set_proxy_auth): Only remove the Authorization /
1081 Proxy-Authorization header from the message if it was previously
1082 set by soup_message_set_auth(). (Eg, not if it was added by
1083 SoupConnectionNTLM.) #471389
1085 * libsoup/soup-connection-ntlm.h: fix a search-and-replace-o
1087 * tests/ntlm-test.c: Simple NTLM regression test; doesn't really
1088 test the crypto/encoding bits, just that the right headers are
1089 being sent at the right times.
1091 2007-09-14 Dan Winship <danw@gnome.org>
1093 Make "make check" pass on Fedora 7:
1095 * configure.in: update apache/php tests with additional filenames
1097 * tests/httpd.conf.in: updates for configure.in changes and
1098 slightly-more-recent apache
1100 * tests/ssl-test.c (start_writing): fix uninitialized struct field
1101 (main): start server after setting up client since otherwise
1102 there's a race condition since soup_gnutls_init() isn't actually
1103 thread-safe. (FIXME)
1105 * tests/xmlrpc-server.php: rewrite to not use $HTTP_RAW_POST_DATA
1106 (which only exists if register_globals is set)
1108 2007-06-01 Dan Winship <danw@novell.com>
1110 * libsoup/soup-message-filter.h (SOUP_IS_MESSAGE_FILTER_CLASS):
1111 fix. noted by "cascardo" on libsoup-list.
1113 2007-05-16 Jonathon Jongsma <jjongsma@gnome.org>
1115 * libsoup/*.h: add G_BEGIN_DECLS / G_END_DECLS to all installed
1116 headers so that libsoup can be used from C++ programs. #438776
1118 2007-04-16 Dan Winship <danw@novell.com>
1120 * libsoup/soup-ssl.h: Make a real SoupSSLCredentials type rather
1121 than just using gpointer
1123 * libsoup/soup-server.c (SoupServerPrivate): use it
1125 * libsoup/soup-session.c (SoupSessionPrivate): use it
1127 * libsoup/soup-gnutls.c: Use it, and consistently use "creds"
1128 rather than "cred" as the abbreviation for "credentials".
1130 * docs/reference/libsoup-sections.txt:
1131 * docs/reference/tmpl/soup-misc.sgml:
1132 * docs/reference/tmpl/soup-ssl.sgml: update
1134 2007-03-29 Dan Winship <danw@novell.com>
1136 * libsoup/soup-session-sync.c (queue_message): Implement this by
1137 sending the message (synchronously) in another thread and then
1138 queueing the callback back in the main thread.
1140 * libsoup/soup-session.c (soup_session_queue_message): update docs
1141 to be more explicit about what thread the callback occurs in
1143 2007-03-17 Dan Winship <danw@novell.com>
1145 * libsoup/soup-message.c (soup_message_set_auth)
1146 (soup_message_get_auth, soup_message_set_proxy_auth)
1147 (soup_message_get_proxy_auth): get/set auth/proxy_auth info for a
1150 * libsoup/soup-session.c (add_auth): Use soup_message_set_auth and
1151 soup_message_set_proxy_auth.
1152 (update_auth_internal): Call soup_message_get_auth or
1153 soup_message_get_proxy_auth to determine the message's prior auth,
1154 rather than calling lookup_auth() again, since it isn't guaranteed
1155 to return the same thing now as it did when the message was
1156 originally sent. Fixes erroneous 401s when queuing multiple
1157 messages at once to an as-yet-unauthenticated-to server. #271540
1159 * libsoup/soup-session-async.c (queue_message): don't run the
1160 queue right away, do it at idle time. Otherwise in some cases
1161 (especially errors), the message callbacks could be invoked before
1162 queue_message returns.
1164 * tests/auth-test.c: add a regression test for #271540.
1166 2007-03-17 Dan Winship <danw@novell.com>
1168 * configure.in: require glib 2.12. check for timegm().
1170 * libsoup/soup-date.c (soup_mktime_utc): Use timegm if available.
1171 (soup_date_iso8601_parse): use g_time_val_from_iso8601. #337010,
1172 patch from Emmanuele Bassi.
1174 * libsoup/soup-types.h: remove local copy of
1175 G_GNUC_NULL_TERMINATED since we now depend on a new-enough copy of
1178 * libsoup/soup-misc.c (soup_base64_encode_close)
1179 (soup_base64_encode_step, soup_base64_encode)
1180 (soup_base64_decode_step): Make these just be wrappers around the
1181 glib base64 methods. (For now; eventually they'll just go away.)
1183 * libsoup/soup-auth-basic.c (authenticate):
1184 * libsoup/soup-auth-digest.c (authenticate):
1185 * libsoup/soup-connection-ntlm.c (soup_ntlm_parse_challenge)
1186 (soup_ntlm_response):
1187 * libsoup/soup-server-auth.c (soup_server_auth_new):
1188 * libsoup/soup-soap-message.c (soup_soap_message_write_base64):
1189 * libsoup/soup-xmlrpc-message.c
1190 (soup_xmlrpc_message_write_base64):
1191 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_base64):
1192 Use glib base64 methods
1194 2007-03-16 Dan Winship <danw@novell.com>
1196 * libsoup/soup-message.c (soup_message_get_response_encoding):
1197 update the handling of CONNECT: it has no response body by
1198 default, but does have a body if its headers say so.
1200 * tests/proxy-test.c: test libsoup's behavior when talking to
1203 * tests/httpd.conf.in: Load mod_proxy and mod_ssl, and add
1204 sections configuring them, for proxy-test
1206 * configure.in: update the apache-module-dir-finding code to deal
1207 with the fact that some modules (eg, mod_ssl) might only be in the
1208 mpm-specific module dir, while others (eg, mod_php5) might only be
1209 in the generic module dir.
1211 2007-03-12 Dan Winship <danw@novell.com>
1213 * tests/Makefile.am (INCLUDES): add $(LIBGNUTLS_CFLAGS) for
1214 ssl-test. #417617, patch from Elijah Newren.
1216 2007-03-12 Dan Winship <danw@novell.com>
1218 * libsoup/soup-session-sync.c (wait_for_connection): if
1219 soup_connection_connect_sync() returns SOUP_STATUS_TRY_AGAIN, then
1220 try again. (Duh.) Fixes SSL-via-proxy-when-using-synchronous-I/O-
1221 where-the-proxy-closes-the-connection-when-returning-407. (Reported
1224 * tests/get.c: Rewrite to use soup_session_send_message rather
1225 than soup_session_queue_message, and add a "-s" flag to use
1226 SoupSessionSync rather than SoupSessionAsync (so we can test bugs
1227 in the sync code paths).
1229 2007-03-08 Dan Winship <danw@novell.com>
1231 * libsoup/soup-gnutls.c (do_handshake): don't return
1232 G_IO_STATUS_AGAIN if we're doing blocking I/O; just keep retrying
1233 until the handshake is complete.
1234 (soup_gnutls_read, soup_gnutls_write): if we get
1235 GNUTLS_E_REHANDSHAKE, call do_handshake() immediately rather than
1236 returning G_IO_STATUS_AGAIN; if the socket is blocking then
1237 G_IO_STATUS_AGAIN is wrong, and if the socket is non-blocking, we
1238 might already need to return SOUP_SSL_ERROR_HANDSHAKE_NEEDS_WRITE
1239 or SOUP_SSL_ERROR_HANDSHAKE_NEEDS_READ.
1241 #415402, based on a patch from Jacob Berkman.
1243 * tests/ssl-test.c: basic ssl test. In particular, tests that
1244 rehandshake requests are handled correctly during both synchronous
1245 and asynchronous I/O. Might eventually test other stuff too...
1248 * tests/Makefile.am: updates for ssl-test
1250 2007-02-19 Dan Winship <danw@novell.com>
1252 * configure.in: Get gcrypt libs/cflags.
1254 * libsoup/Makefile.am (INCLUDES, libsoup_2_2_la_LIBADD): add
1255 gcrypt flags. Patch from "Cygwin Ports Maintainer", #384498
1257 2007-02-12 Dan Winship <danw@novell.com>
1259 * configure.in: 2.2.100
1261 2007-02-12 Dan Winship <danw@novell.com>
1263 * libsoup/soup-headers.c (soup_headers_parse_status_line): Fix
1264 this to handle "\0"-terminated status lines (eg, from WebDAV
1265 responses), like the docs say it does. #406997
1266 (soup_headers_parse): Balance that out by rejecting internal "\0"s
1268 (soup_headers_parse_request, soup_headers_parse_response): Update
1269 docs to warn that @dest may be modified even on error. (This was
1270 always true, it just wasn't documented.)
1272 2007-01-16 Dan Winship <danw@novell.com>
1274 * tests/header-parsing.c (do_request_tests, do_response_tests):
1275 initialize "errors" to 0. duh. Pointed out by Michael Wolf.
1277 2007-01-08 Dan Winship <danw@novell.com>
1279 * configure.in: 2.2.99
1283 2007-01-06 Dan Winship <danw@novell.com>
1285 * libsoup/soup-headers.c (soup_headers_parse): Rewrite this to be
1286 easier to understand and more correct, and make the "str" param
1287 const rather than overwriting it during parsing.
1288 (soup_headers_parse_request, soup_headers_parse_response):
1289 Likewise, make "str" param const. Fix the doc comment to describe
1290 the correct constraint on str. Make the parsing slightly more
1291 lenient as per sections 4.1 and 19.3 of RFC 2616.
1293 * tests/header-parsing.c: new regression test, for Request-Line,
1294 Status-Line, and message-header parsing.
1296 Inspired by #391970 (crash in SoupServer when certain invalid
1297 requests are received).
1299 2006-12-05 Dan Winship <danw@novell.com>
1301 * libsoup/soup-message.c (soup_message_set_uri): Remove the calls
1302 to soup_message_io_stop() here; the corresponding calls were
1303 needed back in the SoupContext days, but they are wrong now and
1304 cause async-redirects-to-other-hosts to fail. #382251. Also
1305 clarify docs with respect to soup_session_requeue_message().
1307 * libsoup/soup-message-io.c (soup_message_io_stop): Clarify docs
1309 * libsoup/soup-session.c (finalize): Free ssl_creds. Pointed out
1312 2006-11-20 Dan Winship <danw@novell.com>
1314 * configure.in: 2.2.98
1318 2006-11-20 Dan Winship <danw@novell.com>
1320 Patch from Andrew W. Nosenko:
1322 * libsoup/soup-message-client-io.c (parse_response_headers): Avoid
1323 memory leak when parse_response_headers() is called on a message
1324 that has a 'reason_phrase' already for some reason.
1326 * libsoup/soup-gnutls.c (soup_gnutls_free): Avoid memory leak:
1327 hostname was not freed.
1328 (soup_ssl_wrap_iochannel): Avoid memory leak: SoupGNUTLSChannel
1329 'chan' was not freed in case of initialization error. Avoid double
1330 close of the "real" (plain, non-ssl) channel FD.
1332 * libsoup/soup-socket.c (soup_socket_start_proxy_ssl): Avoid
1333 memory leak: the "real" (plain, non-ssl) GIOChannel was never
1334 "finally" unreffed (one more *_ref() than *_unref()) in case of
1337 2006-11-20 Dan Winship <danw@novell.com>
1339 * libsoup/soup-connection-ntlm.c (send_request):
1340 * libsoup/soup-session-sync.c (queue_message):
1341 * libsoup/soup-status.c (reason_phrases): Add some missing
1342 "static"s. Patch from Matthias Clasen, #376387
1344 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_type)
1345 (soup_xmlrpc_value_get_string): <value>foo</value> should mean the
1346 same thing as <value><string>foo</string></value>. Pointed out by
1347 Todd Kulesza. #364490
1349 2006-11-06 Dan Winship <danw@novell.com>
1351 * configure.in: Bump version to 2.2.97. Bump AGE and CURRENT for
1352 addition of soup_xml_real_node.
1356 2006-11-06 Dan Winship <danw@novell.com>
1358 * libsoup/soup-misc.c (soup_xml_real_node): new method to find a
1359 "real" (ie, not comment or whitespace) xml node
1361 * libsoup/soup-soap-response.c (parse_parameters)
1362 (soup_soap_response_from_string)
1363 (soup_soap_parameter_get_first_child)
1364 (soup_soap_parameter_get_next_child): Use soup_xml_real_node.
1365 Based on a patch from Andrew W. Nosenko.
1367 * libsoup/soup-xmlrpc-message.c (soup_xmlrpc_message_from_string):
1368 don't call xmlKeepBlanksDefault, which changes libxml's behavior
1369 globally! Instead, use soup_xml_real_node() when traversing the
1372 * libsoup/soup-xmlrpc-response.c
1373 (soup_xmlrpc_response_from_string): don't call
1374 xmlKeepBlanksDefault.
1375 (exactly_one_child): rewrite in terms of soup_xml_real_node()
1376 (which means it handles comments now as well)
1377 (soup_xmlrpc_value_get_struct)
1378 (soup_xmlrpc_value_array_get_iterator)
1379 (soup_xmlrpc_value_array_iterator_prev)
1380 (soup_xmlrpc_value_array_iterator_next): Use soup_xml_real_node.
1382 2006-11-05 Dan Winship <danw@novell.com>
1384 * libsoup/soup-headers.c (soup_headers_parse_request): document
1385 this (in particular, point out that str+len must point to exactly
1386 the right place). Allow req_method and req_path to be NULL.
1387 (soup_headers_parse_status_line, soup_headers_parse_response):
1388 document. Also, change "status_phrase" argument to "reason_phrase"
1389 to match the spec. Inspired by #339889.
1391 2006-11-03 Dan Winship <danw@novell.com>
1393 * libsoup/*.c: fix lots of warnings. Partially from patches from
1394 Andrew W. Nosenko, and also some fixes from libsoup-pre214-branch.
1396 2006-11-03 Dan Winship <danw@novell.com>
1398 * Makefile.am (uninstall-local): uninstall the pkgconfig file.
1399 Based on #356809 from Matthew Barnes.
1401 * libsoup/soup-server.c (get_property): Fix leaks pointed out by
1402 Paolo Borelli. #351500
1404 * libsoup/soup-uri.c (soup_uri_get_protocol): Fix an off by one
1405 pointed out by Andrew W. Nosenko.
1407 * configure.in: Use pkgconfig to find gnutls. Remove old static
1408 linking stuff that was only needed for rcd.
1410 * acinclude.m4: remove gnutls stuff
1412 * libsoup.pc.in: Use Requires rather than putting xml/ssl
1413 dependencies directly into Libs/Cflags. From Mikhail Zabaluev.
1416 * libsoup/Makefile.am (libsoup_2_2_la_LDFLAGS): fix build on
1417 cygwin. From "Cygwin Ports maintainer", #321827.
1419 2006-07-24 Dan Winship <danw@novell.com>
1421 * configure.in: 2.2.96. bump AGE and CURRENT for new API
1425 * libsoup/soup-xmlrpc-message.c (soup_xmlrpc_message_from_string):
1426 New, from Fernando Herrera, bug 348532.
1428 2006-07-21 Dan Winship <danw@novell.com>
1430 * libsoup/soup-auth.c (soup_auth_new_from_header_list): if the
1431 constructed auth doesn't have a realm, it's invalid, as per RFC
1432 2617. Based on a patch from Nate Nielsen on libsoup-list.
1433 (soup_auth_get_realm): remove "if available" from docs; all auths
1434 always have a realm.
1436 * libsoup/soup-message-server-io.c (get_response_headers): If the
1437 server handler set a Content-Length header on the message, don't
1438 add a second one. (Preserves compatibility with an old hacky way
1439 that people might have been handling HEAD from SoupServer.)
1441 * README: update to mention mailing list and bugzilla
1443 * HACKING: kill this since there's nothing here that isn't either
1444 obvious, or redundant with the README
1446 2006-07-21 Dan Winship <danw@novell.com>
1448 * libsoup/soup-server-message.c (soup_server_message_init):
1449 initialize encoding to SOUP_TRANSFER_CONTENT_LENGTH rather than
1450 SOUP_TRANSFER_UNKNOWN, since SOUP_TRANSFER_UNKNOWN has never
1451 actually worked here, and so there was an undocumented requirement
1452 that you manually set the encoding on every response
1453 (which SoupServer itself was not doing on internal errors).
1454 Problem pointed out by Dennis Jacobfeuerborn on libsoup-list.
1455 (soup_server_message_set_encoding): reject the new
1456 SoupTransferEncoding values, for compatibility
1458 * libsoup/soup-message.h (SoupTransferEncoding): Clarify that
1459 SOUP_TRANSFER_UNKNOWN is essentially an error value, since in the
1460 public API, it always has been, due to bugs. Add some new values,
1461 currently just for internal use: SOUP_TRANSFER_NONE (for cases
1462 like HEAD which never have a body), SOUP_TRANSFER_EOF (to replace
1463 SOUP_TRANSFER_UNKNOWN), and SOUP_TRANSFER_BYTERANGES (which isn't
1464 actually implemented yet).
1466 * libsoup/soup-message.c (soup_message_get_request_encoding,
1467 soup_message_get_response_encoding): figure out the body encoding
1468 being used by the request/response, including all the tricky
1469 cases like HEAD/1xx/etc.
1470 (soup_message_is_keepalive): if the response encoding is
1471 SOUP_TRANSFER_EOF, then the message isn't keepalive.
1473 * libsoup/soup-message-client-io.c (parse_response_headers): use
1474 soup_message_get_response_encoding.
1476 * libsoup/soup-message-server-io.c (parse_request_headers): use
1477 soup_message_get_request_encoding.
1478 (get_response_headers): use both soup_server_message_get_encoding
1479 and soup_message_get_response_encoding, to properly distinguish
1480 between the wire encoding and the alleged-by-headers encoding
1481 (which differ for HEAD, etc).
1483 * libsoup/soup-message-io.c (io_error, read_body_chunk):
1484 s/SOUP_TRANSFER_UNKNOWN/SOUP_TRANSFER_EOF/.
1485 (io_body_state): if encoding is SOUP_TRANSFER_NONE, jump right to
1486 SOUP_MESSAGE_IO_STATE_FINISHING.
1488 * libsoup/soup-server.c (request_finished): Check
1489 soup_socket_is_connected() *before* soup_message_is_keepalive(),
1490 since the message will be invalid if the client unexpectedly
1491 dropped the connection.
1493 * tests/simple-httpd.c (server_callback): handle HEAD requests.
1494 Remove no-longer-necessary soup_server_message_set_encoding()
1497 * tests/get.c: add -d (debug) flag to print headers, and -h flag
1498 to do a HEAD rather than GET
1500 2006-07-10 Dan Winship <danw@novell.com>
1502 * configure.in: 2.2.95.1, and bump SOUP_AGE/SOUP_CURRENT this
1503 time. Pointed out by Daniel Holbach.
1505 2006-07-10 Dan Winship <danw@novell.com>
1507 * configure.in: 2.2.95
1511 2006-06-19 Dan Winship <danw@novell.com>
1513 * tests/Makefile.am (noinst_PROGRAMS): don't build xmlrpc-test
1514 unless we have apache/php/xmlrpc-epi. Fixes the build. #345342
1516 * configure.in: fix some quoting
1518 2006-06-14 Dan Winship <danw@novell.com>
1520 * configure.in: add tests for apache mod_php5 and xmlrpc-epi-php
1522 * tests/xmlrpc-test.c: XML-RPC regression test
1524 * tests/xmlrpc-server.php: PHP server for xmlrpc-test
1526 * tests/httpd.conf.in: add php stuff
1528 * tests/apache-wrapper.c (apache_cleanup): Use "graceful-stop"
1529 rather than "stop", so that it stops listening on the socket
1530 before exiting, so that we can immediately start another apache
1531 (eg, in "make check").
1533 * libsoup/soup-date.c (soup_mktime_utc): Fix a bug in leap-year
1536 * libsoup/soup-xmlrpc-message.c
1537 (soup_xmlrpc_message_write_datetime): rename from
1538 "..._write_time", to make it consistent with the XML-RPC type name
1539 and the corresponding SoupXmlrpcResponse method. Also, fix it to
1540 use the same ISO 8601 format as the spec, and use the right value
1541 for the seconds field.
1542 (soup_xmlrpc_message_write_base64): Change the buf arg to a
1543 gconstpointer rather than a const char *.
1545 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_base64):
1546 Return a GByteArray containing the decoded data, rather than
1547 the base64-encoded string.
1548 (soup_xmlrpc_value_dump_internal): Update for that (and don't
1550 (soup_xmlrpc_value_array_get_iterator,
1551 soup_xmlrpc_value_array_iterator_get_value): Make these actually
1554 2006-06-12 Dan Winship <danw@novell.com>
1556 * configure.in: 2.2.94
1560 2006-06-12 Dan Winship <danw@novell.com>
1562 * docs/reference/client-howto.xml:
1563 * docs/reference/server-howto.xml: New client and server API
1566 * docs/reference/*: reorganize, regenerate, fill in some missing
1569 * libsoup/soup-connection.c (soup_connection_new): document the
1572 * libsoup/soup-date.h: sync prototypes to declarations for gtk-doc.
1574 * libsoup/soup-headers.c (soup_headers_parse_response): fix typo
1577 2006-06-12 Dan Winship <danw@novell.com>
1579 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_int,
1580 soup_xmlrpc_value_get_double): Further fixes from Brent Smith.
1582 (soup_xmlrpc_value_get_boolean): Similar fix, plus actually set
1583 the output parameter and make the return value match the other
1586 2006-06-09 Dan Winship <danw@novell.com>
1588 * configure.in: Add tests for apache, output tests/httpd.conf
1592 * tests/httpd.conf.in: Apache 2.2 config files for auth-test
1594 * tests/apache-wrapper.c (apache_init, apache_cleanup): functions
1595 to start/stop apache
1597 * tests/auth-test.c: Use apache-wrapper functions to start a local
1598 apache process to test authentication against, since the auth-test
1599 tree at developer.ximian.com went missing a long time ago. #311825
1601 * tests/Makefile.am (auth_test_SOURCES): use apache-wrapper.c
1602 (TESTS): include auth-test if HAVE_APACHE.
1604 * libsoup/soup-session.c (lookup_auth): Fix this in the case of a
1605 URI pointing to a directory rather than a file.
1607 2006-06-08 Dan Winship <danw@novell.com>
1609 * libsoup/soup-xmlrpc-response.c (soup_xmlrpc_value_get_int,
1610 soup_xmlrpc_value_get_double, soup_xmlrpc_value_get_boolean):
1611 Check return value of strtol/g_ascii_strtod correctly. #344222,
1612 patch from Brent Smith.
1614 2006-06-07 Dan Winship <danw@novell.com>
1616 * libsoup/soup-xmlrpc-response.c
1617 (soup_xmlrpc_response_from_string): record whether or not the
1618 response was a fault.
1619 (soup_xmlrpc_response_is_fault): test that. #343973, patch from
1622 2006-05-29 Dan Winship <danw@novell.com>
1624 * configure.in: 2.2.93
1628 2006-05-29 Dan Winship <danw@novell.com>
1630 * libsoup/soup-message-io.c (SoupMessageIOState): add a new state
1631 "FINISHING" which means "done I/O, but not yet done processing and
1632 cleanup" before "DONE" (which now always means "completely done").
1633 (soup_message_io_stop): disconnect the socket if the read state is
1634 "< FINISHING", not "!= DONE".
1635 (io_error): on an EOF-that-signals-end-of-data, set state to
1636 FINISHING and run io_read().
1637 (io_read, io_write): remove the g_return_if_fails from before.
1638 s/DONE/FINISHING/ in most places. In the FINISHING handler, stop
1639 listening for the readable/writable signal (eg, so we don't end up
1640 reading a following pipelined request), and set the state to DONE.
1641 (soup_message_io_unpause): Only reconnect the readable/writable
1642 signals if the io state isn't DONE. Guard the calls to
1643 io_read/io_write better so that it's safe to call this even after
1644 they are both DONE, since it may be easier for us to test that
1645 than for the caller to.
1647 Fixes 334469, 342640, and another bug caused by the earlier
1648 workaround to 334469. Based on patches and analysis from William
1649 Jon McCann and Armin Bauer.
1651 * tests/simple-proxy.c (main): add g_thread_init (NULL) to make
1652 this work again. (Pointed out by Alex Larsson)
1654 2006-05-26 Dan Winship <danw@novell.com>
1656 * libsoup/soup-socket.c: #include <sys/time.h> for struct timeval.
1659 * libsoup/soup-connection.c (soup_connection_connect_sync): Start
1660 SSL after CONNECTing! Doh. Part of bnc #174255.
1661 (SoupConnectionMode): new enum for the three types of
1662 SoupConnection (direct, proxy, tunnel).
1663 (set_property): set priv->mode according to proxy_uri and
1665 (socket_connect_result, soup_connection_connect_sync): use
1666 priv->mode to decide whether or not to tunnel.
1667 (send_request): Only pass TRUE for is_proxy to
1668 soup_message_send_request if mode is PROXY, not if it's TUNNEL.
1669 (Also part of bnc #174255).
1671 2006-05-26 Dan Winship <danw@novell.com>
1673 * libsoup/soup-message-io.c (soup_message_io_in_progress): tests
1674 if IO is currently in progress on a message.
1676 * libsoup/soup-session-async.c (run_queue): don't process messages
1677 that are io_in_progress. #342545, fix based on analysis from Wang
1678 Xin. (In the future we may want to re-fix this by adding a
1679 REQUEUED message status separate from QUEUED.)
1681 2006-05-22 Dan Winship <danw@novell.com>
1683 * libsoup/soup-session.c (cleanup_hosts): Don't free the hosts
1684 while holding host_lock; that's not allowed and can cause
1685 deadlock. #309867. Based on a patch from Veerapuram Varadhan for
1686 part of bnc #174255.
1688 2006-04-10 Dan Winship <danw@novell.com>
1690 * configure.in: bump version to 2.2.92
1694 2006-04-10 Dan Winship <danw@novell.com>
1696 * libsoup/soup-message-io.c (io_write, io_read): g_return_if_fail
1697 if these get called after the IO is done. This isn't supposed to
1698 happen, but apparently does. Workaround for #334469.
1700 * libsoup/soup-auth-digest.c (qop_types, algorithm_types):
1701 NULL-terminate these so we don't crash when trying to parse an
1702 invalid value. (Flip side of the previous #328615 patch.)
1704 2006-04-02 Dan Winship <danw@novell.com>
1706 * libsoup/soup-server-auth.c (soup_server_auth_context_challenge):
1707 Write out correct digest algorithm value. #328615.
1709 * libsoup/soup-headers.c (soup_headers_parse_request): Rewrite
1710 Request-Line-parsing code to not have a lame max length. #335040.
1712 * Makefile.am (install-data-local): Install the .pc file mode 644,
1715 * libsoup/soup-auth-digest.c:
1716 * libsoup/soup-auth.c:
1717 * libsoup/soup-message-client-io.c:
1718 * libsoup/soup-message-server-io.c:
1719 * libsoup/soup-message.c:
1720 * libsoup/soup-method.c:
1721 * libsoup/soup-server-auth.c:
1722 * tests/get.c: replace locale-ish strcasecmps with
1725 * libsoup/*.c: fix most signed/unsigned mismatch warnings
1727 2006-03-03 Dan Winship <danw@novell.com>
1729 * configure.in: bump version to 2.2.91.
1733 2006-03-03 Dan Winship <danw@novell.com>
1735 * libsoup/soup-dns.c (soup_dns_lookup_resolve_async): Take a
1736 GMainContext as well, and update the resolution code to dispatch
1737 each lookup result in the correct context.
1739 * libsoup/soup-address.c (soup_address_resolve_async_full): New
1740 method that takes a GMainContext to pass to
1741 soup_dns_lookup_resolve_async.
1743 * libsoup/soup-socket.c (soup_socket_connect): Use
1744 soup_address_resolve_async_full. Fixes a problem reported by Armin
1747 * configure.in: update to require glib 2.6, since apparently the
1750 2006-02-25 Veerapuram Varadhan <vvaradhan@novell.com>
1752 * libsoup/soup-connection.c:
1753 * libsoup/soup-session.c:
1754 * libsoup/soup-socket.c: add a "timeout" property,
1755 which gets passed from server to socket, and session to connection
1756 to socket, allowing blocking non-responsive sync connections to
1757 return. Combination of "EAGAIN" && "Blocking" connection is treated
1758 as error and the connection will be terminated and the control
1759 is returned to the caller immediately.
1761 2006-02-02 Tor Lillqvist <tml@novell.com>
1763 * configure.in: Don't use getaddrinfo() etc or try to support IPv6
1764 on Windows, as they are present by default on XP only. We do want
1765 to support Windows 2000, too.
1767 2005-12-21 Dan Winship <danw@novell.com>
1769 * libsoup/soup-date.c (soup_date_iso8601_parse): fix two bugs in
1772 * tests/date.c: add three more ISO 8601 cases, to exercise all the
1775 #324671, from Emmanuele Bassi
1777 2005-11-25 Dan Winship <danw@novell.com>
1779 * README: sync to text on wiki, and point to wiki
1781 * TODO: moved to http://live.gnome.org/LibSoup_2fToDo
1783 2005-11-17 Dan Winship <danw@novell.com>
1785 * libsoup/soup-message-io.c (io_cleanup): clear priv->io_data
1786 right away, to protect against this being re-entered mid-cleanup
1787 (when we unref the connection). #321208, based on a patch from
1790 2005-11-16 Dan Winship <danw@novell.com>
1792 * libsoup/soup-xmlrpc-message.c
1793 (soup_xmlrpc_message_start_member): add the "name" element to the
1794 struct member. #321362, patch from Sebastian Bauer.
1796 2005-11-10 Dan Winship <danw@novell.com>
1798 * configure.in: bump version to 2.2.90. This will not be
1799 officially released, but once these patches have gotten some
1800 testing they may be pulled up to the gnome-2-12 branch.
1802 * libsoup/soup-connection.c:
1803 * libsoup/soup-server.c:
1804 * libsoup/soup-session.c:
1805 * libsoup/soup-socket.c: add an "async-context" property,
1806 which gets passed from server to socket, and session to connection
1807 to socket, allowing async usage outside the main thread. Based on
1808 patches from Armin Bauer and Jürg Billeter.
1810 * libsoup/soup-misc.c (soup_add_io_watch, soup_add_idle,
1811 soup_add_timeout): utility routines to add watches, idles, and
1812 timeouts to non-default GMainContexts.
1814 * libsoup/soup-message-io.c (io_write): set the read state
1815 appropriately after writing a "100 Continue" response
1816 (io_read): More 100-Continue stuff. I don't think this is quite
1817 right so it will probably change again later.
1819 2005-11-01 Dan Winship <danw@novell.com>
1821 * docs/reference/libsoup-docs.sgml: tell it to generate an index
1823 * docs/reference/tmpl/*.sgml: regen with newer gtk-doc
1825 2005-11-01 Dan Winship <danw@novell.com>
1827 * libsoup/soup-connection.c (set_current_request,
1828 clear_current_request): Cast the argument to
1829 g_object_add/remove_weak_pointer to the wrong type, to make gcc
1830 4.1 happy, because C is stupid and "void **" means "a pointer to a
1831 void *", not "a pointer to any kind of pointer".
1833 * libsoup/soup-xmlrpc-response.c
1834 (soup_xmlrpc_value_dump_internal): fix gccism. #320349, from
1837 2005-10-27 Dan Winship <danw@novell.com>
1839 * libsoup/soup-socket.c (soup_socket_client_new_async,
1840 soup_socket_client_new_sync): unref the SoupAddress passed to
1841 soup_socket_connect to avoid a leak. Based on a patch from Wang
1843 (socket_read_watch, read_from_network, socket_write_watch,
1844 soup_socket_write): request and handle G_IO_ERR and G_IO_HUP
1845 events when polling, since poll() will return them whether or not
1846 you asked for them, but glib will ignore them unless you did,
1847 which will result in CPU suckage if such an error occurs. #319305,
1848 patch from Jonathan Matthew.
1850 2005-10-27 Dan Winship <danw@novell.com>
1852 bgo #316313 / bnc #116762, and probably also bgo #318252
1854 * libsoup/soup-message-io.c (soup_message_io_stop): clear io->conn
1855 after releasing it, to make sure we can't accidentally release it
1858 * libsoup/soup-connection.c (clear_current_request): Call
1859 soup_message_io_stop() on the cleared request.
1861 * libsoup/soup-connection-ntlm.c (ntlm_authorize_post): do a
1862 little dance here to make sure the session can't queue another
1863 message on the connection while we're in the process of requeuing
1866 2005-08-30 Tor Lillqvist <tml@novell.com>
1868 * libsoup-zip.in: Include documentation in developer zipfile.
1870 2005-08-22 Dan Winship <danw@novell.com>
1872 * libsoup/soup-soap-message.c (soup_soap_message_class_init): Call
1873 g_type_class_add_private.
1875 * configure.in: Bump to 2.2.6.1
1879 2005-08-22 Dan Winship <danw@novell.com>
1881 * configure.in: Bump to 2.2.6. Bump SOUP_AGE and SOUP_CURRENT for
1882 soup_server_get_socket() addition.
1886 2005-08-22 Dan Winship <danw@novell.com>
1888 * libsoup/soup-connection.c (set_current_request,
1889 clear_current_request): Fix g_object_add/remove_weak_pointer usage
1890 to prevent a crash when canceling a request. From Tambet.
1892 2005-08-16 Dan Winship <danw@novell.com>
1894 Fix a connection leak reported by Tambet.
1896 * libsoup/soup-connection.c (send_request): rather than tracking
1897 the message progress via signals, call
1898 soup_message_send_request_internal() and have it call
1899 soup_connection_release() when it's done.
1900 (request_restarted, request_done): gone
1901 (clear_current_request): handle disconnecting (if necessary) and
1902 updating last_used time here.
1903 (soup_connection_release): Call clear_current_request().
1904 (dispose): Call clear_current_request()
1906 * libsoup/soup-message-client-io.c
1907 (soup_message_send_request_internal): New. Takes a SoupConnection
1908 in addition to the other args, and passes that on to
1911 * libsoup/soup-message-io.c (SoupMessageIOData): add a
1912 SoupConnection field.
1913 (io_cleanup): if io->conn is set, unref it.
1914 (soup_message_io_stop): if io->conn is set, and we ended in a
1915 clean state, call soup_connection_release() on it.
1916 (soup_message_io_client): Add a SoupConnection arg, which gets
1917 reffed and stored in io->conn.
1919 * TODO: misc updates
1921 2005-08-15 Dan Winship <danw@novell.com>
1923 * libsoup/soup-connection.h (soup_connection_new):
1924 * libsoup/soup-server.h (soup_server_new):
1925 * libsoup/soup-session-async.h (soup_session_async_new_with_options):
1926 * libsoup/soup-session-sync.h (soup_session_sync_new_with_options):
1927 * libsoup/soup-socket.h (soup_socket_new): use G_GNUC_NULL_TERMINATED.
1929 * libsoup/soup-types.h (G_GNUC_NULL_TERMINATED): steal the
1930 definition of this from glib 2.8 for use when compiling against
1933 2005-08-15 Tambet Ingo <tambet@ximian.com>
1935 * libsoup/soup-socket.c (update_fdflags, set_property): Fix compilation
1938 * libsoup/soup-server.c (soup_server_get_listener): ditto.
1940 2005-08-12 Dan Winship <danw@novell.com>
1942 * libsoup/soup-server.c (soup_server_get_listener): new method to
1943 get the server's listening socket.
1945 * libsoup/soup-socket.c: add a new "cloexec" property, to set
1946 FD_CLOEXEC on the socket. Update everything for that.
1948 2005-08-05 Dan Winship <danw@novell.com>
1950 * libsoup/soup-socket.c (finalize): Free priv->read_buf. From
1952 (soup_socket_connect): Make sure that get_iochannel() gets called
1953 if the connect succeeds right away, or the socket will fail on
1954 the first read or write. [#312540]
1956 2005-08-01 Dan Winship <danw@novell.com>
1958 * configure.in: drop version back down to 2.2.5 and
1959 SOUP_API_VERSION back to 2.2; due to various snafus, there has
1960 never yet been an official release of the 2.4 API and the GNOME
1961 2.12 betas have been shipping with libsoup 2.2 tarballs (while
1962 jhbuild has been using 2.4, with evolution and related packages
1963 having configure hacks to build against either). As there never
1964 ended up being any API-incompatible changes in the 2.4 series, we
1965 can just merge it back into the 2.2 series and kill off 2.4.
1967 * NEWS: Copy in the 2.2-series news from the gnome-2-10 branch,
1970 * libsoup-zip.in: s/2.2/@SOUP_API_VERSION@/
1972 * libsoup/Makefile.am (libsoupincludedir, lib_LTLIBRARIES,
1973 libsoup_2_2_la_LDFLAGS, libsoup_2_2_la_LIBADD,
1974 libsoup_2_2_la_SOURCES): s/4/2/ in all the places automake won't
1975 let us use a variable.
1977 2005-08-01 Dan Winship <danw@novell.com>
1979 * libsoup/soup-md5-utils.c (soup_md5_final_hex): Finalize a
1980 SoupMD5Context and write out the digest in hex digits.
1982 * libsoup/soup-auth-digest.c (authenticate, compute_response):
1983 * libsoup/soup-server-auth.c (check_digest_passwd): Use that,
1984 rather than duplicating the code in both places here.
1986 Patch from Wim Lewis.
1988 2005-07-15 Dan Winship <danw@novell.com>
1990 * libsoup/soup-session.c (redirect_handler): Allow relative URIs,
1991 since some servers are lame. Based on a patch from Jean-Yves
1994 * tests/uri-parsing.c: add some more tests to make sure that
1995 things that should be %-escaped do get %-escaped
1997 2005-07-06 Tor Lillqvist <tml@novell.com>
1999 * libsoup/soup-date.c (soup_gmtime): Mention in the doc comment
2000 that gmtime() is thread-safe on Windows.
2001 (soup_date_generate): Use soup_gmtime() instead of gmtime_r().
2003 2005-06-14 Dan Winship <danw@novell.com>
2005 * configure.in: check for gmtime_r
2007 * libsoup/soup-date.c: date/time-manipulation functions
2009 * libsoup/soup-xmlrpc-message.c:
2010 * libsoup/soup-xmlrpc-response.c: XMLRPC message classes, from
2011 Mariano Suarez-Alvarez, Fernando Herrera, and Jeff Bailey.
2014 * tests/date.c: soup-date test code
2016 * tests/getbug.c: XMLRPC test code. (Should be switched to use
2017 bugzilla.gnome.org once bgo supports XMLRPC.)
2019 * TODO: XMLRPC is implemented now (but shares the problem with
2020 SOAP that the API is not very good).
2022 2005-06-14 Dan Winship <danw@novell.com>
2024 * libsoup/*.[ch]: add/fix gtk-doc comments, make functions match
2027 * docs/reference/*: update, fix, etc
2029 2005-06-13 Tor Lillqvist <tml@novell.com>
2031 * configure.in: Check also for inet_ntop(). Pre-cache knowledge
2032 that we do have inet_pton() and inet_ntop() on Windows (because we
2033 implement them ourselves in soup-dns.c).
2035 * libsoup/soup-dns.c (inet_pton, inet_ntop): Fix the Win32
2036 implementations, they were completely bogus.
2037 (soup_dns_ntop): Make it compile if HAVE_INET_NTOP.
2039 2005-06-08 Dan Winship <danw@novell.com>
2041 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Fix this to
2042 use just the domain name for the domain, not the whole
2043 DOMAIN\username. Based on a patch by Jeroen Hautekeete in #306877.
2045 2005-05-26 Dan Winship <danw@novell.com>
2047 * libsoup/soup-session.c (cleanup_hosts): lock host_lock around
2048 this, since it can be called from set_property(). Possible fix for
2051 2005-05-05 Dan Winship <danw@novell.com>
2053 * docs/reference/Makefile.am (SCANGOBJ_OPTIONS): Use
2054 --type-init-func to force g_thread_init to be called. [#302674]
2056 2005-04-18 Tor Lillqvist <tml@novell.com>
2058 * configure.in: Call AC_LIBTOOL_WIN32_DLL. Check for Win32, set
2059 Automake conditional OS_WIN32. Pre-cache information that we do
2060 have getaddrinfo(), getnameinfo(), and IPv6 on Win32. (The tests
2061 wouldn't notice as they don't include the necessary headers or
2062 link with -lws2_32. Easiest to just pre-cache it.)
2064 * libsoup-zip.in: New file, to build zipfile-based distribution of
2067 * Makefile.am (EXTRA_DIST)
2068 * configure.in (AC_OUTPUT): Add libsoup-zip(.in).
2070 * libsoup/Makefile.am: Use -no-undefined on Win32. Link with
2071 WinSock library -lws2_32.
2073 * libsoup/soup-portability.h: New file. On Unix it includes the
2074 traditional BSD socket etc headers. On Win32 it includes
2075 winsock2.h and ws2tcpip.h.
2078 * libsoup/*.h: Correspondingly, don't include the BSD socket API
2081 * libsoup/soup-address.h
2082 * libsoup/soup-dns.h: Include soup-portability.h
2084 * libsoup/soup-address.c (soup_address_class_init): This function
2085 should get called before libsoup uses the WinSock API, so this is
2086 a good place to call WSAStartup().
2088 * libsoup/soup-auth-digest.c (get_protection_space): Use
2089 g_strsplit() instead of the relatively unportable strtok_r().
2091 * libsoup/soun-dns.c: Remove unused headers. Implement
2092 inet_pton() and inet_ntop() on Win32 using WSAStringToAddress()
2093 and WSAAddressToString().
2095 * libsoup/soup-socket.c (SOUP_CLOSE_SOCKET, SOUP_IS_SOCKET_ERROR,
2096 SOUP_IS_INVALID_SOCKET, SOUP_IS_CONNECT_STATUS_INPROGRESS):
2098 (soup_socket_class_init): Call soup_address_get_type() to make
2099 sure WSAStartup() gets called (through soup_address_class_init()).
2100 (update_fdflags): Use ioctlsocket(FIONBIO) on Win32.
2101 (soup_socket_write): Conditionalize SIGPIPE use.
2103 * tests/get.c: mkdir() is different in Microsoft's C library.
2105 * tests/simple-httpd.c: Rename TRY_AGAIN label to AGAIN to avoid
2106 some clash with winsock2.h (which includes windows.h). The Win32
2107 headers pollute the namespace wildly.
2109 2005-04-15 Dan Winship <danw@novell.com>
2111 * libsoup/soup-dns.c (resolve_name): make this work with
2112 pre-EAI_OVERFLOW glibc [#300620]
2114 2005-04-12 Dan Winship <danw@novell.com>
2116 * configure.in: Remove the various gethostbyname_r checks and just
2117 check for getnameinfo/getaddrinfo.
2119 * libsoup/soup-dns.c: de-nastify. Make this use threads instead of
2120 forking. Change the API around a bunch in the process.
2122 * libsoup/soup-address.c: Update for soup-dns changes
2124 * tests/dns.c: take multiple hostnames on the command line and
2125 resolve them all at once (patch from tml)
2127 2005-04-11 Dan Winship <danw@novell.com>
2129 * configure.in: require glib-2.0 >= 2.4.0
2131 * libsoup/*.c: use G_DEFINE_TYPE and
2132 g_type_class_add_private/G_TYPE_INSTANCE_GET_PRIVATE
2134 * libsoup/soup-types.h: kill SOUP_MAKE_TYPE and
2135 SOUP_MAKE_TYPE_WITH_IFACE
2137 * tests/revserver.c: use GThread. (patch from tml)
2139 2005-04-11 Dan Winship <danw@novell.com>
2141 * configure.in: bump version to 2.3.0. bump SOUP_API_VERSION to
2144 * libsoup.pc.in: rename from libsoup-2.2.pc.in
2146 * Makefile.am (EXTRA_DIST, pkgconfig_DATA, install-data-local):
2147 install the .pc file by hand, renaming it to include the
2150 * libsoup/Makefile.am: s/2.2/2.4/
2152 2005-03-09 Dan Winship <danw@novell.com>
2154 * libsoup/soup-gnutls.c (soup_gnutls_read): return G_IO_STATUS_EOF
2155 if gnutls returns 0. [#73352]
2156 (verify_certificate): put an #ifdef around
2157 GNUTLS_CERT_NOT_TRUSTED so it works with gnutls 1.2.x. [#57811]
2159 2005-01-08 Not Zed <NotZed@Ximian.com>
2161 ** See ximian bug #70323.
2163 * libsoup/soup-connection-ntlm.c: replace all unsigned long/long
2164 types with guint32, as the code needs 32 bit longs.
2166 2004-10-20 Dan Winship <danw@novell.com>
2168 * libsoup/soup-gnutls.c: Commit the alleged changes from the 10-06
2169 commit, which somehow did not actually get committed then.
2171 * libsoup/soup-connection.c (SoupConnectionPrivate): add a flag
2172 indicating whether or not the connection is connected.
2173 (tunnel_connect_finished): If successful, set connected. If the
2174 server returns a 3xx response, translate it to 407 (under the
2175 assumption that it's trying to redirect us to an HTML login page,
2176 as in bug 68531). Use soup_socket_start_proxy_ssl() rather than
2177 soup_socket_start_ssl().
2178 (socket_connect_result, soup_connection_connect_sync): If
2179 successful, set connected
2180 (soup_connection_disconnect): Don't emit "disconnected" if we
2181 aren't yet connected, or the message that was waiting for this
2182 connection may get stranded in the queue. (also part of 68531)
2184 * libsoup/soup-socket.c (soup_socket_start_proxy_ssl): New, starts
2185 SSL and lets the caller pass the expected hostname. Fixes a
2186 problem where SSL certification validation would always fail if
2187 you used a proxy, because it was comparing the cert against the
2188 proxy's hostname. (68583)
2190 2004-10-06 Dan Winship <danw@novell.com>
2192 * libsoup/soup-ssl.h (SoupSocketError): add
2193 SOUP_SSL_ERROR_CERTIFICATE.
2195 * libsoup/soup-gnutls.c (do_handshake): Pass the GError to
2197 (verify_certificate): Set the GError appropriately rather than
2200 * libsoup/soup-socket.c (read_from_network, soup_socket_write): If
2201 the GIOChannel operation returns an error, store it as GOBject
2202 data on the socket (as a hack so soup-message-io.c can access it
2203 without us needing to change SoupSocket's API).
2205 * libsoup/soup-message-io.c (io_error): peek at the socket's
2206 "last_error" datum and set the message's status to SSL_FAILED
2207 (with the GError's message string) rather than IO_ERROR, if
2208 appropriate. For 64414.
2210 2004-09-30 Dan Winship <danw@novell.com>
2212 * libsoup/soup-gnutls.c (soup_gnutls_init): Add this, with some
2213 extra initialization needed for libgcrypt 1.2 or higher. Fixes
2215 (soup_ssl_get_client_credentials,
2216 soup_ssl_get_server_credentials): Call soup_gnutls_init().
2218 2004-08-26 Dan Winship <danw@novell.com>
2220 * configure.in: Bump version to 2.2.0.
2222 * AUTHORS: Update this to reflect the last 2 years.
2224 * NEWS: Brief summary of 1.99.x -> 2.2 changes
2226 * README, TODO: Updates
2228 2004-08-26 Dan Winship <danw@novell.com>
2230 * libsoup/*: add/fix lots of gtk-doc comments
2232 * libsoup/soup-misc.c (soup_str_case_hash, soup_str_case_equal):
2233 Fix bug noticed while documenting. (We were using the
2234 locale-case-insensitive functions rather than the g_ascii_ ones.)
2236 * libsoup/soup-message.h (SoupMessageFlags): remove the (never
2237 implemented) NO_PIPELINE and NO_COOKIE flags.
2239 * docs/reference/tmpl/*.sgml: Regenerate, fill in some stuff.
2240 There are still problems here with gtk-doc not recognizing many of
2241 the objects in libsoup...
2243 2004-08-13 JP Rosevear <jpr@novell.com>
2245 * configure.in: bump version, libtool number
2247 2004-08-09 Dan Winship <danw@novell.com>
2249 * libsoup/soup-connection.c (soup_connection_connect_sync): Don't
2250 use conn after emitting the "connect_result" signal, since it
2251 might be destroyed by that. Based on a patch from hpj.
2253 2004-08-02 Dan Winship <danw@novell.com>
2255 * libsoup/soup-uri.h: Add flag "broken_encoding" to SoupUri.
2257 * libsoup/soup-uri.c: (soup_uri_to_string): if broken_encoding is
2258 set, don't re-encode the URL parts. Based on a patch by
2259 Alfred.Peng@Sun.COM.
2261 2004-07-19 JP Rosevear <jpr@novell.com>
2263 * configure.in: bump version, libtool number
2265 2004-07-15 Dan Winship <danw@novell.com>
2267 * libsoup/soup-session-sync.c (send_message): Simplify this. If
2268 the message comes back from soup_connection_send_request not
2269 FINISHED, get a new connection rather than reusing the old one.
2270 This fixes a race condition in which a connection could end up
2271 double-booked, and fixes the handling of messages that get
2272 redirected to another server.
2274 2004-07-13 Dan Winship <danw@novell.com>
2276 * libsoup/soup-session.c (connect_result): If the connection
2277 attempt succeeded, reserve the connection before releasing
2278 host_lock. Otherwise, another thread might find it in the
2279 connection pool before the caller can queue a message on it.
2282 * libsoup/soup-session-async.c (got_connection): Call
2283 soup_connection_release(), since we don't have a specific message
2284 in mind for the connection, so we need it to be considered idle.
2286 * libsoup/soup-connection.c (soup_connection_release): New
2287 function, to undo a soup_connection_reserve().
2288 (soup_connection_send_request, soup_connection_reserve,
2289 soup_connection_authenticate, soup_connection_reauthenticate):
2292 2004-07-12 Dan Winship <danw@novell.com>
2294 * libsoup/soup-session-sync.c (send_message): signal the
2295 "connections available" condition after the message finishes. Duh.
2297 * libsoup-2.2.pc.in (Cflags, Libs): add XML_CFLAGS and XML_LIBS
2299 2004-07-08 Dan Winship <danw@novell.com>
2301 * libsoup/soup-soap-response.c: Revert previous change for now; it
2302 breaks the build on distros with older libxmls.
2304 2004-07-08 Dan Winship <danw@novell.com>
2306 * tests/dict.c: Basic SOAP test, using Aonaware's SOAP->DICT
2309 2004-07-07 Fernando Herrera <fherrera@onirica.com>
2311 * libsoup/soup-soap-response.c: (finalize), (init),
2312 (soup_soap_response_from_string): Use a parse context for the
2313 xml document, so we can safely use the option to ignore
2314 blank spaces and '\n'.
2316 2004-07-06 Dan Winship <danw@novell.com>
2318 * libsoup/soup-uri.c (soup_uri_new_with_base): if the protocol is
2319 http or https, require a hostname. For #61049
2321 * tests/uri-parsing.c (rel_tests, do_uri): Update for that
2323 2004-06-03 JP Rosevear <jpr@novell.com>
2325 * configure.in: bump version to 2.1.11, libtool number
2327 2004-06-01 Dan Winship <danw@novell.com>
2329 * libsoup/soup-address.c: Redo the various IPv4/IPv6-abstracting
2330 macros to not use ?: expressions as lvalues, since that's
2331 apparently a GNU extension.
2332 (soup_address_resolve_async): Use a timeout rather than an idle
2333 handler to poll the dns result. (soup-dns really should be
2334 rewritten to not require polling, but this is easier for now.)
2337 * libsoup/soup-server.c (call_handler): Don't use GNU-only
2338 non-constant structure initialization
2340 * tests/dns.c: Simple test of the dns code
2342 * tests/Makefile.am (noinst_PROGRAMS): build it
2344 2004-05-19 JP Rosevear <jpr@novell.com>
2346 * configure.in (SOUP_API_VERSION): bump version, libtool numbers
2348 2004-05-18 Dan Winship <danw@novell.com>
2350 * libsoup/soup-ssl.h:
2351 * libsoup/soup-nossl.c: define some GError codes and stuff
2353 * libsoup/soup-gnutls.c: add missing #include <gnutls/x509.h>
2354 (do_handshake): when returning G_IO_STATUS_AGAIN, set the GError
2355 to SOUP_SSL_ERROR_HANDSHAKE_NEEDS_READ or _NEEDS_WRITE
2358 * libsoup/soup-socket.c (soup_socket_write): Handle
2359 SOUP_SSL_ERROR_HANDSHAKE_NEEDS_READ, by setting an io watch for
2360 G_IO_IN instead of G_IO_OUT. Fixes the rcd-sucking-up-all-cpu bug
2362 (read_from_network): Handle the reverse case (which would cause
2363 hanging rather than spinning, and might be the cause of some
2364 connector 1.5 slowness?)
2366 2004-05-11 Dan Winship <danw@novell.com>
2368 * libsoup/soup-misc.c (soup_signal_connect_once): Do this less
2369 kludgefully, using the magic of GClosure, to fix x86_64 problems
2372 2004-05-04 Sivaiah Nallagatla <snallagatla@novell.com>
2374 * libsoup/soup-soap-message.c (finalize) : free
2375 the elements of priv structure before freeing priv
2377 2004-04-20 Dan Winship <danw@ximian.com>
2379 * libsoup/soup-connection-ntlm.c (ntlm_authorize_post): if
2380 re-sending the message, call soup_message_restarted()
2381 (send_request): Connect to "restarted" signal, and remove the 401
2382 handlers from there; doing it here didn't work because if the
2383 connection was closed, the message would be re-sent on a new
2384 connection, but would still have the handlers from the old
2385 connection attached to it, which would make authentication fail.
2387 * libsoup/soup-message-handlers.c (soup_message_run_handlers):
2388 Copy the handler list before starting, to protect against handlers
2389 that modify the handler list.
2391 2004-04-15 Dan Winship <danw@ximian.com>
2393 * libsoup/soup-connection.c (soup_connection_connect_sync):
2394 Connect to the socket's "disconnect" signal. (We were only doing
2395 this from the async version before, which meant that synchronous
2396 SoupConnections could outlive their sockets and start causing
2399 * libsoup/soup-connection-ntlm.c (send_request): Remove the old
2400 Authorization header before adding a new one.
2402 2004-04-02 JP Rosevear <jpr@ximian.com>
2404 * configure.in: bump version, libtool number
2406 2004-03-15 Dan Winship <danw@ximian.com>
2408 * libsoup/soup-soap-message.c (soup_soap_message_persist): Fix up
2409 types to kill a warning with -Wall -O2
2411 2004-03-05 JP Rosevear <jpr@ximian.com>
2413 * configure.in: bump version, libtool number
2415 2004-03-02 Dan Winship <danw@ximian.com>
2417 * libsoup/soup-dns.c (check_hostent): Only loop on EINTR if
2418 bytes_read is -1, since the value of errno is irrelevant when
2419 bytes_read is 0. Probably #54960.
2421 2004-03-01 Rodrigo Moya <rodrigo@ximian.com>
2423 * libsoup/soup-soap-response.h: removed not-implemented function's
2426 2004-02-27 Rodney Dawes <dobey@ximian.com>
2429 * libsoup/Makefile.am: Use a different variable for linking to the
2430 static version of gnutls, so we don't pull the .a files into the .pc
2434 2004-02-20 Dan Winship <danw@ximian.com>
2436 * libsoup/soup-message-io.c (read_metadata, read_body_chunk,
2437 write_data): Pass gsize *, not guint *, to soup_socket_read/write,
2438 to make this work on 64-bit platforms. (Grr. C type checking
2441 * tests/revserver.c: Likewise
2443 2004-02-18 Rodrigo Moya <rodrigo@ximian.com>
2447 * libsoup/soup-soap-response.c (soup_soap_parameter_get_int_value):
2448 don't leak the value returned from xmlNodeGetContent().
2449 (soup_soap_parameter_get_string_value,
2450 soup_soap_parameter_get_property): return a g_strdup'ed
2451 string, not the value returned by xmlNodeGetContent, so that
2452 callers can use g_free, and not xmlFree.
2454 * libsoup/soup-soap-response.h: made soup_parameter_get_property
2457 2004-02-17 Dan Winship <danw@ximian.com>
2459 * libsoup/soup-soap-message.h (SOUP_IS_SOAP_MESSAGE_CLASS): Fix a
2460 typo. #54433, from Mariano Suarez-Alvarez.
2462 * libsoup/soup-soap-response.h (SOUP_IS_SOAP_RESPONSE_CLASS):
2465 2004-02-17 Rodney Dawes <dobey@ximian.com>
2467 * libsoup/soup-message.c (soup_message_new): HTTP connections require
2468 a hostname, and we also hash on the host for message queueing in the
2469 session, if the host is NULL we free the SoupUri and return NULL
2471 2004-02-14 Dan Winship <danw@ximian.com>
2473 * configure.in: Use POSIX-compliant "test $foo = bar", rather than
2474 GNU-only "test $foo == bar". #54354, from Julio M. Merino Vidal.
2476 2004-02-12 Joe Shaw <joe@ximian.com>
2478 * libsoup/soup-dns.c (check_hostent): Call read() in a do-while
2479 loop to prevent DNS errors from short reads.
2481 2004-02-11 Joe Shaw <joe@ximian.com>
2483 * configure.in: Bumped version number to 2.1.7 and libtool
2486 2004-02-11 Dan Winship <danw@ximian.com>
2488 * libsoup/soup-connection.c (soup_connection_disconnect): Update
2489 Joe's comment here with a gory explanation of exactly what's going
2490 on. (It's not just an SSL bug either, it affects all connections.)
2492 2004-02-10 Joe Shaw <joe@ximian.com>
2494 * libsoup/soup-connection.c (soup_connection_disconnect): Add a
2495 workaround for SSL connections which time-out but don't close the
2496 socket until we try sending data again later.
2498 * libsoup/soup-socket.c (soup_socket_connect, soup_socket_listen):
2499 Don't free the sockaddr from soup_address_get_sockaddr(); we don't
2500 own it, the SoupAddress does.
2502 2004-02-09 JP Rosevear <jpr@ximian.com>
2504 * configure.in: Bump libtool numbers
2506 2004-02-05 Dan Winship <danw@ximian.com>
2508 * libsoup/soup-session.c (soup_session_add_filter): Ref the filter
2510 (soup_session_remove_filter): And unref it here (we were already
2511 unreffing it in dispose().)
2513 2004-02-05 Joe Shaw <joe@ximian.com>
2515 * libsoup/soup-dns.c (soup_dns_entry_unref): Don't try to free the
2516 hostent if it's NULL.
2517 (soup_dns_entry_check_lookup): If the entry is resolved, but the
2518 hostent is NULL, uncache it.
2520 2004-02-04 Dan Winship <danw@ximian.com>
2522 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Always
2523 remove the WWW-Authenticate headers before returning, so the
2524 session won't fall back to Basic auth. Also, leave the connection
2525 in the "authenticating" state rather than setting it to
2527 (ntlm_authorize_post): Only requeue the message if it's in the
2528 "authenticating" state (and set it to "authenticated"). Fixes an
2529 "unepectedly disconnected" error if authentication fails.
2531 2004-02-03 Dan Winship <danw@ximian.com>
2533 * libsoup/soup-message-io.c (io_cleanup): Call
2534 soup_message_io_stop so we don't get a callback on the io after
2535 it's been cleaned up.
2537 * libsoup/soup-session.c (add_auth): Only remove the Authorization
2538 header if we have another one to add. (Otherwise it messes up
2539 SoupConnectionNTLM.)
2541 * libsoup/soup-socket.c (read_from_buf): Use memmove rather than
2542 memcpy here, since the source and destination will overlap if
2543 *nread is small and read_buf->len is large. (Noticed by valgrind,
2546 2004-02-02 Joe Shaw <joe@ximian.com>
2548 * libsoup/soup-gnutls.c (soup_gnutls_close): Call gnutls_bye()
2549 with the GNUTLS_SHUT_WR flag (instead of RDWR) and check only for
2550 GNUTLS_E_INTERRUPTED. GNUTLS_E_AGAIN will be returned by recv()
2551 when there are no messages on the wire on a non-blocking socket.
2552 This sends a SSL hangup message and then allows us to immediately
2555 2004-01-30 Rodrigo Moya <rodrigo@ximian.com>
2557 * configure.in: bumped version number to 2.1.6.
2559 2004-01-29 Rodrigo Moya <rodrigo@ximian.com>
2561 * libsoup/soup-soap-response.[ch] (soup_soap_parameter_get_property):
2564 2004-01-29 Rodrigo Moya <rodrigo@ximian.com>
2566 * libsoup/soup-soap-response.[ch]
2567 (soup_soap_parameter_get_string_value): removed 'const' from return
2570 2004-01-29 Joe Shaw <joe@ximian.com>
2572 * libsoup/soup-gnutls.c (verify_certificate): Initialize the
2573 certificate before we try to use it. Ahem.
2575 2004-01-23 Joe Shaw <joe@ximian.com>
2577 * configure.in: Bump version to 2.1.5 and SOUP_RELEASE to 2
2579 2004-01-21 Joe Shaw <joe@ximian.com>
2581 * configure.in: Require at least GnuTLS 1.0.0.
2583 * libsoup/soup-gnutls.c: Fix the use of deprecated GnuTLS
2585 (verify_certificate): Use gnutls_x509_crt_import() and
2586 gnutls_x509_crt_check_hostname() instead of
2587 gnutls_x509_check_certificates_hostname().
2588 (init_dh_params): Use gnutls_dh_params_generate2() instead of
2589 gnutls_dh_params_generate() and gnutls_dh_params_set().
2591 2004-01-20 Joe Shaw <joe@ximian.com>
2593 * libsoup/soup-gnutls.c (soup_gnutls_close): gnutls_bye() doesn't
2594 close the socket itself, so we need to do it or else our
2595 connections stay in CLOSE_WAIT forever.
2597 2004-01-16 Jason Leach <leach@wam.umd.edu>
2599 * libsoup/Makefile.am: builddir != srcdir fixes.
2601 2004-01-14 Joe Shaw <joe@ximian.com>
2603 * libsoup/soup-gnutls.c (verify_certificate): Remove the
2604 check for GNUTLS_CERT_CORRUPTED, it's not in 1.0.x.
2606 2004-01-12 JP Rosevear <jpr@ximian.com>
2608 * configure.in: bump version and libtool revision
2610 2004-01-12 Dan Winship <danw@ximian.com>
2612 * tests/simple-httpd.c (main): Add a g_thread_init() so this works
2615 2004-01-10 Larry Ewing <lewing@ximian.com>
2617 * libsoup-2.2.pc.in (Libs): use LIBGNUTLS_LIBS in the substitution
2620 2004-01-09 Joe Shaw <joe@ximian.com>
2622 * acinclude.m4: Include the libgnutls.m4 file.
2624 * configure.in: Remove manual checking for libgnutls-config and
2625 use the AM_PATH_LIBGNUTLS so we can pass in a minimum required
2626 version, which is 0.9.7 for now.
2628 * libsoup/Makefile.am: Some changes for the above change.
2630 * libsoup/soup-gnutls.c: Check for HAVE_SSL, not
2631 HAVE_GNUTLS_GNUTLS_H.
2632 (verify_certificate): Uncomment the SSL certificate hostname
2635 * libsoup/soup-session.c (set_property): Be smart about flushing
2636 our SSL credentials only when the CA file is set to something
2637 different than it was before.
2639 2004-01-09 Harish K <kharish@novell.com>
2640 * libsoup/soup-soap-response.c (soup_soap_response_from_string):
2641 added code to ignore Header element, if present, while creating
2644 2004-01-05 Dan Winship <danw@ximian.com>
2646 * configure.in: Remove no-longer-relevant socklen_t check
2648 * libsoup/soup-address.c: Reorder #includes for FreeBSD (From Joe
2649 Marcus Clarke, #52566)
2651 * libsoup/soup-dns.c: Likewise
2653 2003-12-29 JP Rosevear <jpr@ximian.com>
2655 * configure.in: bump version and libtool numbers
2657 2003-12-22 Dan Winship <danw@ximian.com>
2659 * README, TODO: Update these
2661 2003-12-22 Dan Winship <danw@ximian.com>
2663 * libsoup/soup-socket.c: Lots of thread-safety stuff, primarly so
2664 you can disconnect a socket from one thread while doing I/O in
2667 * libsoup/soup-message-io.c (soup_message_io_cancel): Split into
2668 soup_message_io_stop() and io_cleanup(), to separate out the "stop
2669 reading/writing" and "free data" phases to allow thread-safe
2670 synchronous cancellation.
2671 (soup_message_io_finished): call both soup_message_io_stop() and
2673 (io_error): Only set SOUP_STATUS_IO_ERROR on the message if it
2674 doesn't already have a transport error status (eg, CANCELLED).
2675 (new_iostate): Call io_cleanup() if needed.
2677 * libsoup/soup-status.h: add "SOUP_STATUS_NONE" for 0, to make it
2678 clearer that it's not a status.
2680 * libsoup/soup-message.c (finalize, restarted, finished,
2681 soup_message_set_uri): s/soup_message_io_cancel/soup_message_io_stop/
2682 (soup_message_cleanup_response): s/0/SOUP_STATUS_NONE/
2684 * libsoup/soup-connection.c (send_request): Remove
2685 soup_message_io_cancel call.
2687 * libsoup/soup-session-sync.c (send_message): Connect to the
2688 connection's "disconnected" signal rather than using a weak ref,
2689 since that's what we really care about, and it's possible that the
2690 connection may have an extra ref on it somewhere that would keep
2691 it from being destroyed even if it was disconnected.
2693 2003-12-20 Joe Shaw <joe@ximian.com>
2695 * libsoup/soup-session.c (lookup_auth): If const_path is NULL un
2696 the non-proxy case, then use the root ("/").
2698 2003-12-19 Dan Winship <danw@ximian.com>
2700 * libsoup/soup-message-filter.c: New. An interface for objects
2701 that want to act on every message passing through a session.
2702 (Initially being used for authentication, but could also be used
2703 for cache handling, cookie management, etc.)
2705 * libsoup/soup-connection.c (class_init, etc): Add a message
2707 (send_request): If the connection has a message filter set, run
2708 it on the message before sending it.
2709 (soup_connection_connect_async, etc): When setting up a tunnel, if
2710 we get back a 407 and the session tries to requeue the message,
2711 either re-send it, or return SOUP_STATUS_TRY_AGAIN (depending on
2712 whether or not the proxy closed the connection).
2713 (soup_connection_connect_sync): Likewise
2714 (send_request, request_done): Ref/unref the connection
2716 * libsoup/soup-session.c (soup_session_get_type): Implement the
2717 SoupMessageFilter interface.
2718 (soup_session_get_connection): Use the session as the connection's
2720 (soup_session_add_filter, soup_session_remove_filter): Add/remove
2721 filters from the session
2722 (setup_message): do auth handling, and call each of the session's
2723 filters' setup_message methods as well.
2724 (soup_session_send_message_via): No longer needed.
2725 (connect_result): Handle SOUP_STATUS_TRY_AGAIN.
2727 * libsoup/soup-session-async.c (run_queue): Use
2728 soup_connection_send_request, since soup_session_send_message_via
2731 * libsoup/soup-session-sync.c (send_message): Likewise
2733 * libsoup/soup-message.c (soup_message_is_keepalive): A successful
2734 response to a CONNECT is always keepalive, even if it's HTTP/1.0
2735 with no Connection header.
2737 * libsoup/soup-status.h: add SOUP_STATUS_TRY_AGAIN
2739 * libsoup/soup-types.h: Add SoupMessageFilter, and macros for
2740 gobject interface types.
2742 * tests/get.c (main): Add a -p flag to specify a proxy
2744 * tests/simple-proxy.c: Fix #includes
2746 2003-12-18 Dan Winship <danw@ximian.com>
2748 * libsoup/soup-connection.c (soup_connection_disconnect): Actually
2749 disconnect the socket rather than just unreffing it, since the IO
2750 code may be holding an extra ref on it.
2751 (send_request): connect to the "restarted" signal too
2752 (request_restarted): Deal with "Connection: close"
2754 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Make this
2755 not go into an infinite loop if the server only supports Basic.
2757 2003-12-17 Rodrigo Moya <rodrigo@ximian.com>
2759 * libsoup/Makefile.am: install soup-message-queue.h with the rest
2762 2003-12-17 Dan Winship <danw@ximian.com>
2764 * configure.in: Add gthread to glib check
2766 * libsoup/soup-session.c: Make this an abstract class.
2768 * libsoup/soup-session-async.c: A SoupSession class for
2769 asynchronous gmain-based operation; replaces the old SoupSession.
2771 * libsoup/soup-session-sync.c: A SoupSession class for synchronous
2772 blocking operation for use with threaded apps.
2774 * libsoup/soup-types.h, libsoup/soup.h: add the new session
2777 * libsoup/soup-connection.c (soup_connection_connect_sync): Don't
2778 try to unref the socket if the socket creation fails.
2779 (soup_connection_reserve): New, to explicitly mark a connection as
2780 being in use without queueing a message on it.
2782 * libsoup/soup-dns.c (check_hostent): Oof. Fix the logic of the
2783 "block" flag to not be reversed.
2785 * libsoup/soup-message.c (finished): set status to FINISHED here.
2786 (soup_message_cancel): Gone; needs to be done at the session
2789 * libsoup/soup-message-queue.c: Add a mutex and make all of the
2790 operations thread-safe.
2792 * libsoup/soup-socket.c (disconnect_internal): Make this
2794 (soup_socket_connect): Make the sync case work correctly.
2796 * libsoup/Makefile.am: add the SoupSession subclasses
2798 * tests/Makefile.am: libsoup depends on libgthread now, so
2799 revserver doesn't need to explicitly.
2801 * tests/get.c, tests/auth-test.c, tests/simple-proxy.c: Use
2802 soup_session_async_new().
2804 2003-12-16 Rodrigo Moya <rodrigo@ximian.com>
2806 * libsoup/soup-soap-response.[ch] (soup_soap_parameter_get_int_value):
2809 2003-12-16 Joe Shaw <joe@ximian.com>
2811 * libsoup/soup-connection.c (socket_connect_result,
2812 soup_connection_connect_sync): Only set up a tunnel if the
2813 destination protocol is HTTPS.
2815 * libsoup/soup-message.c (class_init): Add a default handler for
2817 (wrote_body): Run the SOUP_HANDLER_POST_REQUEST handlers here.
2818 (soup_message_cancel): Don't set the status to
2819 SOUP_STATUS_CANCELLED and call soup_message_finished() if the
2820 status is already SOUP_MESSAGE_STATUS_FINISHED.
2822 * libsoup/soup-session.c (set_property): Don't cancel the session
2823 if the proxy URI set as a property isn't different from the old
2825 (get_host_for_message): Refactor some code so that we can easily
2826 get the right SoupSessionHost for proxies as well as from the
2828 (authenticate_auth): Take a gboolean proxy parameter. Check it to
2829 see which URI (message URI or proxy URI) to use for
2830 authentication. Add a long comment about lack of clarity in RFC
2831 2617 with respect to proxies and protection spaces.
2833 2003-12-15 Dan Winship <danw@ximian.com>
2835 * libsoup/soup-socket.h (soup_socket_read, soup_socket_read_until,
2836 soup_socket_write): s/guint/gsize/ to match the definitions in
2837 soup-socket.c. #52167.
2839 2003-12-12 Rodrigo Moya <rodrigo@ximian.com>
2841 * libsoup/soup-soap-message.c: removed debugging of the messages here.
2843 2003-12-12 Rodrigo Moya <rodrigo@ximian.com>
2845 * libsoup/soup-soap-message.c (soup_soap_message_start_envelope):
2846 added information for SOAP-ENV namespace.
2848 2003-12-10 Dan Winship <danw@ximian.com>
2850 * libsoup/soup-message-client-io.c (parse_response_headers): if we
2851 receive an HTTP/1.0 response to an HTTP/1.1 request, downgrade the
2852 message's http_version so the keep-alive handling is correct.
2853 Fixes a problem noticed almost simultaneously by Rodrigo and Joe.
2855 * libsoup/soup-message.c (soup_message_restarted, etc): Add a
2856 "restarted" signal as suggested by Joe.
2858 * libsoup/soup-message-io.c (soup_message_io_finished): emit
2859 either "restarted" or "finished" as appropriate
2861 * libsoup/soup-session.c (soup_session_queue_message): Connect to
2862 "restarted" and run the queue if a message gets restarted
2864 * libsoup/soup-status.h: Remove a stray comma that gtk-doc doesn't
2867 2003-12-10 Tambet Ingo <tambet@ximian.com>
2869 * configure.in: Use autoconfig to check for socklen_t ...
2871 * libsoup/soup-address.c: ... and remove it from here ...
2873 * libsoup/soup-dns.c: ... and here.
2875 2003-12-09 Rodrigo Moya <rodrigo@ximian.com>
2877 * libsoup/soup-soap-message.c (soup_soap_message_persist):
2878 (soup_soap_message_parse_response): print out request/response's
2879 contents, if in debug mode.
2881 2003-12-07 JP Rosevear <jpr@ximian.com>
2883 * configure.in: Bump version
2885 2003-11-28 Rodrigo Moya <rodrigo@ximian.com>
2887 * libsoup/soup-soap-response.[ch]
2888 (soup_soap_parameter_get_first_child,
2889 soup_soap_parameter_get_first_child_by_name,
2890 soup_soap_parameter_get_next_child,
2891 soup_soap_parameter_get_next_child_by_name): new functions to
2892 manage SoupSoapParameter's children.
2893 (soup_soap_response_get_first_parameter): dont return a GList, but
2894 a SoupSoapParameter contained in the GList.
2896 2003-11-26 Rodrigo Moya <rodrigo@ximian.com>
2898 * libsoup/soup-soap-response.[ch]
2899 (soup_soap_parameter_get_string_value): new function.
2901 2003-11-26 Rodrigo Moya <rodrigo@ximian.com>
2903 * libsoup/soup-soap-response.[ch]: added SoupSoapParameter
2904 structure, to "hide" the usage of xmlNode's.
2905 (soup_soap_parameter_get_name): functions to manage SOAP
2906 response parameters.
2907 (soup_soap_response_get_first_parameter,
2908 soup_soap_response_get_first_parameter_by_name,
2909 soup_soap_response_get_next_parameter,
2910 soup_soap_response_get_next_parameter_by_name):
2911 new functions for an easy access to the response's parameters.
2912 (soup_soap_response_from_string): removed warnings.
2914 2003-11-25 Rodrigo Moya <rodrigo@ximian.com>
2916 * libsoup/soup-soap-response.c (soup_soap_response_set_method_name):
2919 2003-11-25 Rodrigo Moya <rodrigo@ximian.com>
2921 * libsoup/soup-soap-response.[ch] (soup_soap_response_get_method_name,
2922 soup_soap_response_set_method_name, soup_soap_message_get_parameters):
2924 (finalize): NULL out new private fields.
2925 (soup_soap_response_from_string): added validation code.
2927 2003-11-23 Rodrigo Moya <rodrigo@ximian.com>
2929 * libsoup/soup-soap-response.[ch]: new class for managing SOAP
2932 * libsoup/soup-soap-message.[ch] (soup_soap_message_parse_response):
2935 * libsoup/Makefile.am: added new files.
2937 2003-11-18 Rodney Dawes <dobey@ximian.com>
2939 * gtk-doc.make: Add gtk-doc.make to cvs for systems without gtk-doc
2941 2003-11-18 Rodney Dawes <dobey@ximian.com>
2943 * acinclude.m4: Add GTK_DOC_CHECK
2945 2003-11-18 Dan Winship <danw@ximian.com>
2947 * configure.in: Replace old gtk-doc test with GTK_DOC_CHECK()
2948 (AC_OUTPUT): add docs/Makefile, docs/reference/Makefile
2950 * autogen.sh (REQUIRED_AUTOMAKE_VERSION): 1.6, for gtk-doc.make
2952 * Makefile.am: updates for gtk-doc
2953 (SUBDIRS): add back "docs"
2955 * docs/Makefile.am (EXTRA_DIST): remove, since those old docs
2956 aren't around any more
2958 * docs/reference/*: set up gtk-doc
2960 * libsoup/Makefile.am (INCLUDES): Change G_LOG_DOMAIN to
2961 "libsoup". Remove unused defines.
2963 * libsoup/soup-connection.c: Fix doc comments
2964 * libsoup/soup-message.c: Likewise
2965 * libsoup/soup-misc.c: Likewise
2966 * libsoup/soup-socket.c: Likewise
2967 * libsoup/soup-uri.c: Likewise
2969 * libsoup/soup-address.h: Fixes to please gtk-doc
2970 * libsoup/soup-connection.h: Likewise
2971 * libsoup/soup-message.h: Likewise
2972 * libsoup/soup-message-private.h: Likewise
2973 * libsoup/soup-misc.h: Likewise
2974 * libsoup/soup-server-auth.h: Likewise
2975 * libsoup/soup-socket.h: Likewise
2976 * libsoup/soup-status.h: Likewise
2978 2003-11-18 Dan Winship <danw@ximian.com>
2980 * configure.in: Fix up the SSL checks some. Remove some useless
2983 * libsoup/soup-misc.h: declare soup_ssl_supported.
2985 * libsoup/soup-gnutls.c: add soup_ssl_supported declaration.
2987 * libsoup/soup-nossl.c: Not an SSL implementation, built if
2988 HAVE_SSL is not defined.
2990 * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): add soup-nossl.c
2992 * libsoup/soup-socket.c (soup_socket_start_ssl): Return success or
2994 (listen_watch): Deal with soup_socket_start_ssl failing.
2996 * libsoup/soup-connection.c (tunnel_connect_finished,
2997 socket_connect_result, soup_connection_connect_sync): Deal with
2998 the soup_socket_start_ssl failing.
3000 * libsoup/soup-server.c (soup_server_new): Deal with
3001 soup_ssl_get_server_credentials failing
3003 2003-11-18 Rodrigo Moya <rodrigo@ximian.com>
3005 * libsoup/soup-soap-message.[ch] (soup_soap_message_start_fault,
3006 soup_soap_message_end_fault, soup_soap_message_start_fault_detail,
3007 soup_soap_message_end_fault_detail, soup_soap_message_start_header,
3008 soup_soap_message_end_header,
3009 soup_soap_message_start_header_element,
3010 soup_soap_message_end_header_element, soup_soap_message_write_int,
3011 soup_soap_message_write_double, soup_soap_message_write_base64,
3012 soup_soap_message_write_time, soup_soap_message_write_string,
3013 soup_soap_message_write_buffer, soup_soap_message_set_element_type,
3014 soup_soap_message_set_null, soup_soap_message_add_attribute,
3015 soup_soap_message_add_namespace,
3016 soup_soap_message_set_default_namespace,
3017 soup_soap_message_get_namespace_prefix,
3018 soup_soap_message_set_encoding_style, soup_soap_message_reset,
3019 soup_soap_message_persist): new functions from old SoupSerializer.
3021 2003-11-17 Rodrigo Moya <rodrigo@ximian.com>
3023 * libsoup/soup-soap-message.[ch] (soup_soap_message_new,
3024 soup_soap_message_new_from_uri): added a bunch of initialization
3026 (soup_soap_message_get_xml_doc, soup_soap_message_start_envelope,
3027 soup_soap_message_end_envelope, soup_soap_message_start_body,
3028 soup_soap_message_end_body, soup_soap_message_start_element,
3029 soup_soap_message_end_element):
3032 * configure.in: depend on libxml-2.0 for the SOAP code.
3034 * libsoup/Makefile.am: use XML CFLAGS and LIBS.
3036 2003-11-17 Joe Shaw <joe@ximian.com>
3038 * configure.in: Add in the --enable-libgpg-error flag from the 2.0
3041 * acinclude.m4: Include the gpg-error macros.
3043 2003-11-17 Rodrigo Moya <rodrigo@ximian.com>
3045 * libsoup/soup-soap-message.[ch]: new class to make it easier to
3046 build SOAP messages.
3048 * libsoup/Makefile.am: added new files.
3050 * configure.in: increased version number.
3052 2003-10-24 Joe Shaw <joe@ximian.com>
3054 * libsoup/soup-address.c (update_address_from_entry): Call
3055 soup_dns_entry_get_hostent() on the SoupAddress passed in, not the
3056 one in addr->priv->lookup. Fixes a crash on synchronous DNS
3059 * libsoup/soup-server.c (soup_server_new): We need to ref the
3060 address we're binding to, because soup_socket_get_local_address()
3063 2003-10-23 Dan Winship <danw@ximian.com>
3065 * libsoup/soup-socket.c (init): Initialize flags to default
3068 2003-09-23 Dan Winship <danw@ximian.com>
3070 * libsoup/soup-gnutls.c (SoupGNUTLSCred): Remove refcounting, but
3071 note whether or not the CA file has been loaded.
3072 (SoupGNUTLSChannel): add a "hostname" field.
3073 (verify_certificate): Remove the comment about not being able to
3074 verify the hostname because of soup problems. Now it's because of
3075 GNUTLS problems instead.
3076 (soup_ssl_wrap_iochannel): Renamed from soup_ssl_get_iochannel,
3077 and takes a hostname and a creds argument now.
3078 (soup_ssl_get_client_credentials,
3079 soup_ssl_get_server_credentials): Return client/server credentials
3081 (soup_ssl_free_client_credentials,
3082 soup_ssl_free_server_credentials): and free them.
3084 * libsoup/soup-session.c (class_init, set_property, get_property):
3085 add ssl_ca_file property
3086 (get_host_for_message): when returning an SSL host for the first
3087 time, create a client credentials structure for the session.
3088 (run_queue): Pass the ssl creds to the new connection. Also fix an
3089 unrelated bug that caused infinite loops on "bad hostname".
3091 * libsoup/soup-server.c: Use GObject properties, including
3092 ssl_cert_file and ssl_key_file properties.
3093 (soup_server_new): Remove "protocol" argument; if the cert file
3094 and key file properties were set, create a server credential
3095 structure from them and pass that to soup_socket_server_new.
3097 * libsoup/soup-connection.c (SoupConnectionPrivate): Rename
3098 dest_uri to origin_uri to match RFC 2616 terminology. Add an
3100 (class_init, set_property, get_property): add SSL_CREDS property
3101 (soup_connection_connect_async, soup_connection_connect_sync):
3102 Pass ssl_creds to soup_socket_client_new calls.
3104 * libsoup/soup-socket.c: Use GObject properties, including an
3106 (soup_socket_set_flags): Gone (replaced with boolean properties)
3107 (soup_socket_new): Make this take a list of properties
3108 (listen_watch): copy ssl creds from listener to new socket
3109 (soup_socket_start_ssl): Pass remote hostname and socket creds
3110 structure to soup_ssl_wrap_iochannel.
3111 (soup_socket_client_new_async, soup_socket_client_new_sync,
3112 soup_socket_server_new): Replace the SSL boolean with an ssl_creds
3115 * libsoup/soup-misc.c (soup_set_ssl_ca_file,
3116 soup_set_ssl_cert_files, soup_get_ssl_ca_file,
3117 soup_get_ssl_cert_files): Gone. SSL state is now per-session or
3120 * tests/get.c: add a "-c CAfile" argument, for loading a CA
3121 certificate file to validate https connections against
3123 * tests/simple-httpd.c: Add "-c certfile" and "-k keyfile"
3124 arguments for loading an SSL server certificate. Only start an SSL
3125 server if those arguments were used.
3127 * tests/test-cert.pem:
3128 * tests/test-key.pem: SSL certificate for testing simple-httpd
3130 * tests/revserver.c: Update for API changes
3131 * tests/simple-proxy.c: Likewise
3133 2003-09-22 Dan Winship <danw@ximian.com>
3135 * libsoup/soup-message-io.c: Move RESPONSE_BLOCK_SIZE #define here
3138 * libsoup/soup-misc.c (soup_load_config, etc): Remove all this.
3139 (soup_set_security_policy, soup_get_security_policy): Remove,
3140 since the GNUTLS backend doesn't actually implement it.
3141 (soup_set_ssl_ca_dir, soup_get_ssl_ca_dir): Likewise
3143 * libsoup/soup-misc.h: sync to soup-misc.c. Don't #include extra
3146 * libsoup/soup-types.h (SOUP_MAKE_TYPE): Move this here from
3149 * libsoup/soup-ssl.h: Merge soup_ssl_get_iochannel and
3150 soup_ssl_get_server_iochannel into a single function that takes a
3153 * libsoup/soup-gnutls.c: Remove soup_get_ssl_ca_dir() reference.
3154 (soup_ssl_get_iochannel): Renamed from soup_gnutls_get_iochannel.
3155 (soup_gnutls_set_security_policy): Gone
3157 * libsoup/soup-gnutls.h
3158 * libsoup/soup-ssl.c: Gone; soup-ssl.h is the #include file for
3161 * libsoup/soup-socket.c: Move soup_sockaddr_max
3162 #define here from soup-private.h
3163 (soup_socket_start_ssl): Update for new soup_ssl_get_iochannel
3166 * libsoup/soup-private.h: Gone
3168 * libsoup/soup-address.c: Fix #includes for soup-private.h and
3170 * libsoup/soup-auth-digest.c: Likewise
3171 * libsoup/soup-auth.c: Likewise
3172 * libsoup/soup-connection-ntlm.c: Likewise
3173 * libsoup/soup-connection.c: Likewise
3174 * libsoup/soup-dns.c: Likewise
3175 * libsoup/soup-gnutls.c: Likewise
3176 * libsoup/soup-headers.c: Likewise
3177 * libsoup/soup-message-client-io.c: Likewise
3178 * libsoup/soup-message-handlers.c: Likewise
3179 * libsoup/soup-message-io.c: Likewise
3180 * libsoup/soup-message-server-io.c: Likewise
3181 * libsoup/soup-message.c: Likewise
3182 * libsoup/soup-server-message.c: Likewise
3183 * libsoup/soup-server.c: Likewise
3184 * libsoup/soup-session.c: Likewise
3185 * libsoup/soup-socket.c: Likewise
3186 * tests/auth-test.c: Likewise
3188 2003-09-19 Dan Winship <danw@ximian.com>
3190 * libsoup/soup-address.c (update_address_from_entry): free the
3193 * libsoup/soup-connection-ntlm.c (ntlm_authorize_pre): Don't leak
3196 * libsoup/soup-gnutls.c (soup_gnutls_get_iochannel): Add some more
3197 iochannel initialization. Not sure how this worked before...
3199 * libsoup/soup-message.c (soup_message_cleanup_response): Renamed
3200 from soup_message_prepare (and a few things removed).
3202 * libsoup/soup-message-client-io.c (soup_message_send_request):
3203 s/soup_message_prepare/soup_message_cleanup_response/
3205 * libsoup/soup-message-io.c (io_read): Replace the final "\r\n"
3206 with "\0" on the headers before passing them to the parse
3208 (io_read): Call soup_message_cleanup_response after returning an
3209 informational response so the data doesn't leak.
3211 * libsoup/soup-headers.c (soup_headers_parse): Update for
3212 soup-message-io.c:io_read change
3214 * libsoup/soup-server.c (soup_server_new,
3215 soup_server_new_with_host): Don't leak the SoupAddress.
3217 * libsoup/soup-session.c (class_init): Make PROP_PROXY_URI not
3219 (set_property): If the proxy uri changes, call
3220 soup_session_abort() and cleanup_hosts().
3221 (request_finished, final_finished): Fix a bug when requeuing
3224 * tests/libsoup.supp: valgrind suppression file for soup tests
3226 * tests/Makefile.am (EXTRA_DIST): dist it.
3227 (noinst_PROGRAMS): move the former check_PROGRAMS to
3228 noinst_PROGRAMS instead.
3230 2003-09-18 Dan Winship <danw@ximian.com>
3232 * libsoup/soup-message.c: Add wrote_informational and
3233 got_informational signals.
3235 * libsoup/soup-message-client-io.c (get_request_headers): Set the
3236 EXPECT_CONTINUE flag on the message if that header is set.
3238 * libsoup/soup-message-server-io.c (parse_request_headers):
3241 * libsoup/soup-message-io.c (io_write): Set read_state to HEADERS
3242 when blocking on an expect-continue. Emit wrote_informational
3243 instead of wrote_headers in the 1xx case.
3244 (io_read): Set read_state to BLOCKING, not NOT_STARTED after
3245 reading a 100 Continue response. Emit got_informational instead of
3246 got_headers in the 1xx case.
3248 * libsoup/soup-session.c (soup_session_send_message): Reorder
3249 things to deal with the fact that the message could finish right
3250 away if there is a connection available and the server is very
3253 * libsoup/soup-status.h: Rename SOUP_STATUS_CLASS_TRANSPORT to
3254 SOUP_STATUS_CLASS_TRANSPORT_ERROR.
3256 2003-09-17 Dan Winship <danw@ximian.com>
3258 * libsoup/soup-session.c (find_oldest_connection): Fix two bugs
3259 (one that pruned too little, one that pruned too much).
3260 (queue_message): When requeuing, don't run the queue;
3261 final_finished will take care of that later.
3262 (soup_session_abort): New, to cancel all pending requests.
3264 * libsoup/soup-socket.c (soup_socket_connect, got_address): ref
3265 the socket while waiting for the address to resolve
3267 2003-09-17 Dan Winship <danw@ximian.com>
3269 * libsoup/soup-connection.c (soup_connection_new): Replaces the
3270 three previous soup_connection_new* functions and uses gobject
3271 properties to set the destination and proxy uris.
3272 (class_init): set up two more signals, authenticate and
3274 (soup_connection_send_request): virtualize
3275 (send_request): Default implementation
3277 * libsoup/soup-connection-ntlm.c: New SoupConnection subclass that
3278 also handles NTLM authentication. Includes all of the NTLM code
3279 formerly in soup-auth-ntlm.c.
3281 * libsoup/soup-auth-ntlm.[ch]: Gone.
3283 * libsoup/soup-auth.c: Remove NTLM refs
3285 * libsoup/soup-session.c (class_init): Add gobject properties for
3286 proxy, max_conns, use_ntlm. Change the "authenticate" and
3287 "reauthenticate" signal prototypes to not pass a SoupAuth (so they
3288 can be used for authenticating SoupConnectionNTLM as well, which
3289 doesn't use a SoupAuth).
3290 (soup_session_new): Renamed from soup_session_new_default.
3291 (soup_session_new_with_options): Replaces
3292 soup_session_new_with_proxy and soup_session_new_full. Takes
3294 (run_queue): Create a new connection of type SoupConnection or
3295 SoupConnectionNTLM depending on our "use_ntlm" property. Connect
3296 to its authenticate and reauthenticate signals.
3297 (connection_authenticate, connection_reauthenticate): proxy these
3300 * libsoup/soup-address.c (update_address_from_entry): Fix a
3301 crasher when failing to resolve the address.
3303 * libsoup/soup-dns.c (check_hostent): Fix some "how was this
3304 working before" bugs.
3306 * libsoup/soup-message-client-io.c (soup_message_send_request):
3307 call soup_message_prepare() to clean up the existing response
3310 * libsoup/soup-message-io.c (io_error): Set the read_state to DONE
3311 when processing an OK EOF.
3313 * libsoup/soup-status.h (SoupStatusClass): fix the numbering of
3314 these so that SOUP_STATUS_CLASS_SUCCESS is 2, etc.
3316 * tests/auth-test.c (authenticate, reauthenticate): Update for new
3318 (main): Use soup_session_new.
3319 * tests/get.c (main): Likewise.
3320 * tests/simple-proxy.c (main): Likewise.
3322 2003-09-10 Dan Winship <danw@ximian.com>
3324 * libsoup/soup-session.c: Add "authenticate" and "reauthenticate"
3326 (invalidate_auth): Remove the call to soup_auth_invalidate.
3327 (authenticate_auth): soup_auth_fn is gone. If the URI doesn't
3328 contain authentication, then emit "authenticate" or
3329 "reauthenticate" (depending on whether or not this is the first
3330 time we've asked for a password for this auth).
3331 (update_auth_internal): If the server rejects our
3332 username/password, don't bail out immediately. Try doing a
3333 "reauthenticate" first.
3335 * libsoup/soup-misc.c (soup_set_authorize_callback): Gone
3337 * libsoup/soup-auth.c (soup_auth_new_from_header_list): Remove the
3339 (soup_auth_invalidate): Remove this; it doesn't actually do
3340 anything useful for us.
3342 * libsoup/soup-auth-basic.c (invalidate): Remove
3343 * libsoup/soup-auth-digest.c: (invalidate): Remove
3344 * libsoup/soup-auth-ntlm.c: (invalidate): Remove
3346 * libsoup/soup-uri.c: Remove all references to "authmech".
3347 (soup_uri_set_auth): Remove this too.
3349 * tests/auth-test.c: Update to use the "authenticate" and
3350 "reauthenticate" signals instead of encoding usernames and
3351 passwords in the URIs. Add a few more test cases.
3353 2003-09-10 Dan Winship <danw@ximian.com>
3355 * libsoup/soup-message-private.h (SoupMessagePrivate): Remove the
3356 "status" field from here, since it's mostly used by SoupSession,
3357 which shouldn't need access to SoupMessagePrivate.
3359 * libsoup/soup-message.h (SoupMessage): Move it here.
3360 (SoupCallbackFn): Remove this alias for SoupMessageCallbackFn.
3361 (soup_message_set_uri): also moved from soup-message-private.h
3363 * libsoup/soup-message.c: s/msg->priv->status/msg->status/.
3365 * libsoup/soup-message-handlers.c:
3366 s/SoupCallbackFn/SoupMessageCallbackFn/ everywhere.
3368 * libsoup/soup-message-io.c (soup_message_io_client,
3369 soup_message_io_server, soup_message_io_unpause): Don't set up an
3370 idle handler, just jump right in to reading/writing; if this is a
3371 synchronous socket, then the caller wants to block, and if it's
3372 not, then we'll quickly get an EAGAIN anyway.
3374 * libsoup/soup-session.c: (queue_message): Likewise.
3375 (*) Update for SoupMessageStatus move and remove
3376 soup-message-private.h include.
3378 * libsoup/soup-server-message.c: Remove soup-message-private.h
3381 * libsoup/soup-server.c: Likewise.
3383 * libsoup/soup-connection.c (soup_connection_is_connected,
3384 soup_connection_is_new): Remove these, since they weren't being
3387 * libsoup/soup-md5-utils.c: Moved from md5-utils.c and renamed, to
3388 avoid namespace pollution.
3390 * libsoup/soup-auth-digest.c: Update for that.
3391 * libsoup/soup-server-auth.c: Likewise
3393 * tests/auth-test.c: Remove soup-message-private.h include
3395 2003-09-09 Dan Winship <danw@ximian.com>
3397 Beginnings of improved synchronous API support
3399 * libsoup/soup-dns.c: Simplify this by making it not automatically
3400 return the result: force the caller to poll. (This isn't really a
3401 performance issue: the results should come back quickly anyway.)
3402 Also, make the cache thread-safe.
3403 (soup_dns_entry_from_name): Was soup_gethostbyname
3404 (soup_dns_entry_from_addr): Was soup_gethostbyaddr
3405 (soup_dns_entry_check_lookup): Used to poll to see if DNS is done
3406 (soup_dns_entry_get_hostent): Gets the hostent from an entry (and
3407 blocks if it's not resolved yet).
3409 * libsoup/soup-address.c: Update for soup-dns changes.
3410 (soup_address_new): Don't automatically start resolving the
3411 hostname now, since we don't know if the caller is going to want
3412 it resolved synchronously or asynchronously.
3413 (soup_address_resolve_async): Renamed from soup_address_resolve.
3414 (soup_address_resolve_sync): New routine to do blocking
3417 * libsoup/soup-socket.c (soup_socket_connect): Now returns a
3418 status value directly when connecting synchronously.
3419 (soup_socket_client_new_async, soup_socket_client_new_sync):
3420 Separate async/sync client socket functions.
3421 (soup_socket_get_iochannel): Made static since it was not used
3422 outside soup-socket.
3424 * libsoup/soup-connection.c (soup_connection_new,
3425 soup_connection_new_proxy, soup_connection_new_tunnel): Just set
3426 up the data, don't actually start connecting.
3427 (soup_connection_connect_async, soup_connection_connect_sync): New
3428 async and sync SoupConnection connecting routines.
3429 (soup_connection_get_socket): Remove this since it wasn't being
3432 * libsoup/soup-session.c (final_finished): Run the queue since a
3433 connection is now freed up.
3434 (run_queue): Update for soup_connection_new* changes.
3436 * libsoup/soup-misc.c (soup_substring_index): Remove, since it
3437 wasn't being used any more.
3439 * libsoup/soup-private.h: Remove some prototypes for functions
3440 that no longer exist.
3442 * libsoup/soup-uri.c (soup_uri_copy_root): New utility function
3443 (copies the protocol, host, and port of a SoupUri).
3445 * tests/auth-test.c:
3447 * tests/simple-proxy.c: belatedly update for soup-session change
3449 * tests/revserver.c: Handle each new connection in its own thread,
3450 using synchronous SoupSocket calls.
3452 2003-09-05 Dan Winship <danw@ximian.com>
3454 * libsoup/soup-session.c: Move a bunch of logic here from
3455 soup-context. Now the session keeps track of hosts (instead of
3456 having a global soup_hosts hash) and their connections.
3457 (soup_session_new_with_proxy, soup_session_new_full): New session
3458 constructors to specify a proxy or a proxy and connection limits
3459 (send_request): Add Authorization and Proxy-Authorization headers
3460 before sending off the request.
3461 (soup_session_queue_message, et al): Improve the way this works.
3462 There's no need to use timeouts to wait for connections to become
3463 free; we *know* when they become free.
3465 * libsoup/soup-private.h: Remove SoupHost and some other
3466 no-longer-used stuff.
3468 * libsoup/soup-misc.c (soup_set_proxy, soup_get_proxy,
3469 soup_set_connection_limit, soup_set_connection_limit): Gone. These
3470 are all per-session now.
3472 * libsoup/soup-message.c: Remove all SoupContext references
3473 (mostly replaced with SoupUri references)
3474 (cleanup_message): priv->connect_tag and priv->connection are gone
3475 now, so this was just soup_message_io_cancel(). So remove
3476 cleanup_message and replace it with that everywhere.
3477 (soup_message_disconnect): Gone.
3478 (soup_message_set_uri): Replaces soup_message_set_context.
3479 (soup_message_set_connection, soup_message_get_connection): Gone
3481 * libsoup/soup-message-server-io.c (parse_request_headers):
3482 s/soup_message_set_context/soup_message_set_uri/
3484 * libsoup/soup-message-private.h (SoupMessagePrivate): Remove
3485 connect_tag, context, and connection.
3487 * libsoup/soup-message-client-io.c (encode_http_auth): Gone.
3489 * libsoup/soup-context.c: Gone
3491 * tests/auth-test.c (identify_auth): update for session/context
3494 2003-09-03 Dan Winship <danw@ximian.com>
3496 * libsoup/soup-status.h: Renamed from soup-error.h, with types
3497 and defines renamed accordingly.
3499 * libsoup/soup-message.h (SoupMessage): Rename errorcode to
3500 status_code and errorphrase to reason_phrase. Remove errorclass.
3501 (SOUP_MESSAGE_IS_ERROR): Remove this. You can't classify redirects
3502 as being either "errors" or "not errors", so its semantics are
3503 guaranteed to be wrong sometimes.
3505 * libsoup/soup-message.c (soup_message_set_status,
3506 soup_message_set_status_full): Renamed
3508 * libsoup/soup-message-handlers.c
3509 (soup_message_add_status_code_handler,
3510 soup_message_add_status_class_handler): Rename.
3512 * libsoup/soup-session.c (soup_session_send_message): Make this
3513 return a status code rather than a status class.
3515 * libsoup/soup-message-private.h (SoupMessagePrivate): Remove some
3516 unrelated unused fields (retries, callback, user_data).
3520 2003-09-02 Dan Winship <danw@ximian.com>
3522 * libsoup/soup-session.c: First draft at the new object to
3523 maintain formerly-global state. (Not yet complete; still need to
3524 get rid of SoupContext).
3526 * libsoup/soup-message-queue.c: Data structure used by SoupSession
3528 * libsoup/soup-queue.c: Gone. Mostly moved into soup-session, but
3529 some bits went into soup-connection.
3531 * libsoup/soup-connection.c (soup_connection_send_request): New,
3532 to send a request on a connection. The connection updates its
3533 internal state and then hands off to soup_message_send_request.
3534 (request_done): Callback set up by soup_connection_send_request.
3535 Marks the connection as no-longer-in-use, and disconnects it if
3536 the message says to.
3537 (soup_connection_set_in_use, soup_connection_mark_old): No longer
3538 needed; the connection takes care of this itself now.
3539 (soup_connection_new_proxy): New, to create a new connection that
3540 is explicitly marked as being through an HTTP proxy.
3541 (soup_connection_new_tunnel): New, to create a new HTTPS
3542 connection through a proxy. (Includes the code to send the
3545 * libsoup/soup-context.c (try_existing_connections): Don't need to
3546 call soup_connection_set_in_use.
3547 (try_create_connection): Use soup_connection_new,
3548 soup_connection_new_proxy, or soup_connection_new_tunnel as
3551 * libsoup/soup-message.c (soup_message_prepare): Replaces
3553 (soup_message_queue, soup_message_requeue, soup_message_prepare):
3554 Gone. This must be done via a SoupSession now.
3555 (soup_message_set_connection): don't need to mark in_use/not
3556 in_use. Also, msg->priv->socket is gone now.
3557 (soup_message_get_socket): Gone.
3559 * libsoup/soup-message-handlers.c (soup_message_run_handlers):
3560 Remove references to global handlers.
3561 (redirect_handler, authorize_handler): Moved to soup-session.c.
3563 * libsoup/soup-misc.c (soup_shutdown): Gone; just unref the
3564 session to shut down now.
3566 * libsoup/soup.h: add soup-session.h
3568 * libsoup/Makefile.am: updates
3570 * tests/auth-test.c, tests/get.c, tests/simple-proxy.c: Use
3573 2003-08-29 Dan Winship <danw@ximian.com>
3575 * libsoup/soup-message-io.c: Major rewrite. There is now only a
3576 single IO state object (instead of one for reading and one for
3577 writing), and the IO code handles switching back and forth between
3578 reading and writing as appropriate (including handling the extra
3579 switches needed for "Expect: 100-continue").
3580 (soup_message_io_client, soup_message_io_server): The new entry
3582 (soup_message_io_cancel): If the caller cancels the IO when we
3583 were expecting to read more data, disconnect the socket.
3585 * libsoup/soup-message.h (SoupMessageFlags): add
3586 SOUP_MESSAGE_EXPECT_CONTINUE, to indicate that the IO code should
3587 do the special expect-continue handling.
3589 * libsoup/soup-message.c: Move all the signal stuff here. Remove
3590 the "done_reading" and "done_writing" signals and replace them
3591 with a single "finished" signal. (A single signal. Say that 10
3593 (soup_message_got_headers, etc): Functions to emit signals.
3594 (got_headers, got_chunk, got_body): Default signal methods that
3595 call soup_message_run_handlers.
3596 (finished): Default signal method that replaces
3597 soup_message_issue_callback.
3598 ([various]): s/soup_message_issue_callback/soup_message_finished/
3599 (soup_message_requeue): There's no soup_message_set_read_callbacks
3600 any more, so if the caller requeues while it's still reading, just
3602 (soup_message_add_chunk, soup_message_add_final_chunk,
3603 soup_message_pop_chunk): Moved here from soup-server-message,
3604 although we don't actually quite support using chunked encoding
3607 * libsoup/soup-server-message.c (soup_server_message_new): No
3608 longer takes a socket argument.
3609 (soup_server_message_add_chunk, soup_server_message_get_chunk):
3610 Moved into SoupMessage.
3612 * libsoup/soup-message-handlers.c (global_handlers): Make these
3613 POST_BODY rather than PRE_BODY, so they won't mess up the IO
3614 channel when the requeue the message.
3615 (soup_message_run_handlers): Don't need to issue the message
3616 callback from here any more.
3617 (authorize_handler): Just leave the error as 401 or 407 (see
3618 soup-error.h change)
3620 * libsoup/soup-message-client-io.c (soup_message_send_request):
3621 Replaces soup_message_write_request and
3622 soup_message_read_response.
3624 * libsoup/soup-message-server-io.c: Parallel to
3625 soup-message-client-io.c, this defines the server-side header
3627 (soup_message_read_request): Its entry point.
3629 * libsoup/soup-server.c: Lots of code moved into
3630 soup-message-server-io.c. Update for other changes.
3632 * libsoup/soup-queue.c: Update for changes
3634 * libsoup/soup-socket.c (read_from_network, soup_socket_write):
3635 Don't call soup_socket_disconnect() on an error, just return
3636 SOUP_SOCKET_ERROR. Otherwise soup_socket_disconnect() could emit
3637 signals that will mess up the caller of the read/write function.
3639 * libsoup/soup-connection.c (soup_connection_disconnect): When
3640 disconnecting the socket, disconnect from its signals first to
3641 prevent bad reentrancy.
3643 * libsoup/soup-error.h: Kill off SOUP_ERROR_CANT_AUTHENTICATE and
3644 SOUP_ERROR_CANT_AUTHENTICATE_PROXY, since they don't really say
3645 anything that SOUP_ERROR_UNATHORIZED and
3646 SOUP_ERROR_PROXY_UNAUTHORIZED don't say. (And now, all of the
3647 "transport" errors actually are transport-related.)
3649 * tests/auth-test.c (main): s/CANT_AUTHENTICATE/UNAUTHORIZED/
3651 * tests/simple-proxy.c: Complicate this a bunch. In particular,
3652 use SOUP_MESSAGE_OVERWRITE_CHUNKS and the GOT_CHUNK signal, and
3653 pass the data back to the client in chunked format.
3655 2003-08-27 Dan Winship <danw@ximian.com>
3657 * libsoup/soup-types.h: New header with typedefs, to avoid
3658 #include loops among other headers.
3660 * libsoup/Makefile.am (libsoupinclude_HEADERS): add it
3662 * libsoup/*.[ch], tests/*.c: Update for soup-types.h
3664 2003-08-26 Dan Winship <danw@ximian.com>
3666 * libsoup/soup-message-client-io.c (soup_message_write_request,
3667 soup_message_read_response): Higher-than-soup-message-io-level
3668 functions to do client-side IO. (Code that used to be in
3670 (get_request_header_cb): Fix a bug in the generation of the Host:
3671 header; need to include the port number if it's not the default.
3673 * libsoup/soup-message-io.c (soup_message_write,
3674 soup_message_write_simple): Take separate user_datas for the get_*
3675 callbacks and the done callbacks.
3677 * libsoup/soup-queue.c: Update to use soup_message_write_request
3678 and soup_message_read_response.
3680 * libsoup/soup-connection.c (soup_connection_new): Change the
3681 prototype to take a SoupUri and a callback.
3683 * libsoup/soup-context.c (try_create_connection,
3684 soup_context_connect_cb): Update for soup_connection_new change.
3686 * libsoup/soup-server.c (read_done_cb, issue_bad_request): Update
3687 for soup_message_write changes
3689 * libsoup/soup-uri.c (soup_uri_uses_default_port): new utility
3692 2003-08-26 Dan Winship <danw@ximian.com>
3694 * libsoup/soup-message-private.h: Define SoupMessage signal stuff
3695 (READ_HEADERS, READ_CHUNK, READ_BODY, READ_ERROR, WROTE_HEADERS,
3696 WROTE_CHUNK, WROTE_BODY, WRITE_ERROR).
3698 * libsoup/soup-message.c (class_init): set up signals
3699 (requeue_read_finished): Update for changes.
3701 * libsoup/soup-message-io.c (soup_message_read): Split out
3702 parse_headers_cb from read_headers_cb. Also add a SoupDataBuffer *
3703 arg to say where to store the message body. Set up
3704 read_headers_cb, read_chunk_cb, read_body_cb, and error_cb as
3706 (do_read): Call r->parse_headers_cb, then emit READ_HEADERS
3707 (read_body_chunk): emit READ_CHUNK.
3708 (issue_final_callback): Set r->body. emit READ_BODY.
3709 (failed_read): emit READ_ERROR.
3710 (soup_message_read_set_callbacks): Disconnect old signal handlers,
3712 (soup_message_read_cancel): Disconnect signal handlers.
3713 (soup_message_write, soup_message_write_simple): Set up
3714 wrote_body_cb and error_cb as signal handlers.
3715 (do_write): emit WROTE_HEADERS and WROTE_CHUNK, even though
3716 nothing currently ever listens for them. emit WROTE_BODY when
3718 (failed_write): emit WRITE_ERROR
3720 * libsoup/soup-queue.c (soup_queue_parse_headers_cb,
3721 soup_queue_read_headers_cb): Split this into two unequal chunks.
3722 (read_header_cb only runs the pre-body handlers).
3723 (soup_queue_read_chunk_cb, soup_queue_read_done_cb): Update
3725 (soup_queue_write_done_cb): Update call to soup_message_read
3727 * libsoup/soup-server.c (parse_headers_cb): Renamed from
3729 (read_done_cb): Update prototype
3730 (start_request): Update soup_message_read call.
3732 2003-08-25 Dan Winship <danw@ximian.com>
3734 * libsoup/soup-message-io.c (soup_message_read,
3735 soup_message_write, soup_message_write_simple): Add a "user_data"
3736 arg, pass it to the callbacks.
3738 * libsoup/soup-message.c (soup_message_requeue,
3739 requeue_read_finished, requeue_read_error): Update for that
3741 * libsoup/soup-queue.c: Likewise
3743 * libsoup/soup-server.c: Likewise
3745 2003-08-25 Dan Winship <danw@ximian.com>
3747 * libsoup/soup-message.c (soup_message_new): Take a uri string
3748 instead of a context. Also, swap the args (so the method comes
3749 before the URI, just like in the protocol).
3750 (soup_message_new_from_uri): Like soup_messgae_new, but takes a
3751 SoupUri instead of a string
3752 (soup_message_set_request, soup_message_set_response): Replace
3753 soup_message_new_full.
3754 (cleanup_message): Was soup_message_cleanup, but is static now.
3755 (queue_message): Do the pre-queuing message cleanup here instead
3756 of in soup_queue_message.
3757 (soup_message_queue): Set the callback and user_data, then call
3759 (requeue_read_error, requeue_read_finished, soup_message_requeue):
3761 (soup_message_get_uri): Replaces soup_message_get_context.
3763 * libsoup/soup-message.h (SoupMessage): Remove msg->context. (It's
3764 part of SoupMessagePrivate now)
3766 * libsoup/soup-context.c: #include soup-message-private
3767 (soup_context_from_uri): constify the uri arg.
3769 * libsoup/soup-queue.c: Various context/uri fixes
3770 (proxy_https_connect): Use soup_message_new_from_uri.
3771 (soup_queue_message): Drastically simplified since most of the
3772 work is in soup-messsage.c:queue_message() now
3774 * libsoup/soup-auth-digest.c (compute_response,
3775 get_authorization): Use soup_message_get_uri.
3777 * libsoup/soup-server-auth.c (parse_digest): Likewise
3779 * libsoup/soup-server.c (call_handler): Likewise
3781 * tests/simple-httpd.c (server_callback): Likewise.
3783 * tests/simple-proxy.c (server_callback): Likewise
3785 * tests/get.c (got_url): Likewise.
3786 (get_url): Update soup_message_new usage.
3788 * tests/auth-test.c: #include soup-message-private. Update for
3789 context changes and soup_message_new change.
3791 2003-08-22 Dan Winship <danw@ximian.com>
3793 * libsoup/soup-message-private.h: New file containing
3794 SoupMessagePrivate and some other soup-message-internal
3795 types/functions. Also includes the new, expanded SoupMessageStatus
3798 * libsoup/soup-message-io.c: Replaces what used to be in
3799 soup-transfer, but now all the interfaces take SoupMessages
3800 instead of SoupReader/SoupWriter and deal with maintaining
3801 msg->priv->{read,write}_state themselves. Fixes up all the
3802 refcounting madness.
3804 * libsoup/soup-message-handlers.c: Move the handler code here,
3805 mostly unchanged. (But rename SoupHandlerType to SoupHandlerPhase
3806 to make the distinction from SoupHandlerKind clearer.)
3808 * libsoup/soup-message.c: Update for soup-message-io and new
3809 SoupMessageStatus values. Remove handler code.
3810 (soup_message_cleanup): Remove the hack to try to preserve the
3811 connection if the message gets cleaned up before it finishes
3812 reading. soup_message_requeue handles this in the requeuing case,
3813 and there's no especially compelling reason to bother doing it in
3814 any other case. (And the soup-message-io api doesn't support
3815 having a read operation that's not connected to any message.)
3817 * libsoup/soup-private.h: remove SoupMessagePrivate
3819 * libsoup/soup-queue.c: Update for soup-message-io and new
3820 SoupMessageStatus values.
3822 * libsoup/soup-server-message.c: Likewise
3824 * libsoup/soup-server.c: Likewise
3826 * libsoup/soup-transfer.c: Gone (yay)
3828 * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): update
3830 2003-08-20 Dan Winship <danw@ximian.com>
3832 * libsoup/soup-message.c: Make this a GObject. (Note that since
3833 SoupMessage was not refcounted before, it's not really refcounted
3835 (soup_message_free): Gone, replaced by g_object_unref
3836 (soup_message_copy, soup_message_foreach_remove_header): Remove
3837 these, since neither was currently functional.
3838 (soup_message_is_keepalive): New utility function to look at
3839 HTTP version and request/response headers to decide if a message
3840 indicates the connection should be kept alive.
3841 (soup_message_set_connection, soup_message_get_connection): New
3842 (soup_message_get_socket): New
3844 * libsoup/soup-server-message.c: Make this a subclass of
3846 (soup_server_message_new): Now takes a SoupServer and SoupSocket
3847 (soup_server_message_get_server): New
3848 (soup_server_message_set_encoding,
3849 soup_server_message_get_encoding): Get/set whether the message
3850 should be sent with content-length or chunked encoding
3851 (soup_server_message_is_started, soup_server_message_is_finished):
3852 Private member accessors.
3853 (soup_server_message_add_chunk): Renamed from add_data
3854 (soup_server_message_get_chunk): Pops a chunk from the list.
3855 (soup_server_message_get_source): Gone
3857 * libsoup/soup-server.c: Update for SoupServerMessage changes.
3858 (error_cb, write_done_cb): All the cleanup stuff that used to be
3859 here happens automatically by unreffing the message now.
3860 (get_response_header): Remove some erroneous leftover CGI stuff
3861 (issue_bad_request): add "Connection: close" to the response.
3862 (read_headers_cb): clean this up a bit. Reject HTTP/1.1 messages
3863 with no Host header as per RFC 2616.
3865 * libsoup/soup-connection.c (soup_connection_start_ssl): Gone
3866 (soup_connection_set_in_use): Let the caller set the connection to
3867 "not in use" even after the socket has been disconnected.
3869 * libsoup/soup-context.c: Use soup_message_get_connection
3871 * libsoup/soup-headers.c (soup_headers_parse_request): Remove the
3872 check on request length, since it was rejecting
3873 "GET / HTTP/1.0\r\n\r\n", which is a valid complete request.
3875 * libsoup/soup-queue.c: Use soup_message_get_connection and
3876 soup_message_get_socket.
3877 (soup_queue_read_done_cb): Use soup_message_is_keepalive
3878 (proxy_https_connect_cb): Use soup_socket_start_ssl rather than
3879 soup_connection_start_ssl
3881 * libsoup/soup-socket.c (finalize): disconnect the GIOChannel
3882 handlers if the socket hasn't been disconnected yet.
3884 * libsoup/soup-transfer.c (soup_reader_read_body_chunk,
3885 reader_read): Fix these so that reader_read will exit properly if
3886 the read is cancelled.
3888 * tests/auth-test.c (main): s/soup_message_free/g_object_unref/
3890 * tests/simple-httpd.c (server_callback): set the message to
3891 content-length encoding.
3892 * tests/simple-proxy.c (server_callback): Likewise
3894 2003-08-19 Dan Winship <danw@ximian.com>
3896 * libsoup/soup-socket.c (soup_socket_read,
3897 soup_socket_read_until, soup_socket_write): New API for doing
3898 socket IO. Works both synchronously and asynchronously, and
3899 buffers data to prevent the "100 Continue" problem.
3900 (soup_socket_set_flag): Replaces formerly-private
3901 soup_set_sockopts. (primarily to let the caller turn off
3902 SOUP_SOCKET_FLAG_NONBLOCKING).
3904 * libsoup/soup-transfer.c (soup_transfer_read,
3905 soup_transfer_write, soup_transfer_write_simple): Take a
3906 SoupSocket instead of a GIOChannel. Use the new socket IO api.
3907 Changed the prototypes of some of the callbacks to be less
3910 * libsoup/soup-connection.c (soup_connection_get_socket): Replaces
3911 soup_connection_get_iochannel.
3913 * libsoup/soup-message.c: Fix up for soup-transfer changes
3915 * libsoup/soup-queue.c: Likewise
3917 * libsoup/soup-server.c: Likewise
3919 * tests/revserver.c: A slightly more complicated replacement for
3920 timeserver. (Does both reads and writes)
3922 2003-08-19 Dan Winship <danw@ximian.com>
3924 * libsoup/soup-socks.[ch]: Remove this. RC doesn't let you
3925 configure it, and no one has complained, and it looks like the
3926 SOCKS5 auth code doesn't actually work anyway...
3928 * libsoup/soup-queue.c (proxy_connect): Remove SOCKS code.
3930 * libsoup/soup-uri.h: Remove SOUP_PROTOCOL_SOCKS4 and
3931 SOUP_PROTOCOL_SOCKS5
3933 * libsoup/soup-misc.c: Remove a references to SOCKS in a comment
3935 * libsoup/Makefile.am (libsoup_2_2_la_SOURCES): remove
3938 2003-08-19 Dan Winship <danw@ximian.com>
3940 * libsoup/soup-server.c: Make this a GObject. Remove
3941 SoupServerMessage code (to soup-server-message.c). Remove CGI
3942 server code (for now?)
3943 (soup_server_add_handler, soup_server_remove_handler): Rename
3944 (from register/unregister) to make it clearer what they do.
3946 * libsoup/soup-server-message.c: Moved out of soup-server.c
3948 * libsoup/soup-private.h: Remove SoupServer def
3950 * libsoup/Makefile.am (libsoupinclude_HEADERS,
3951 libsoup_2_2_la_SOURCES): add soup-server-message.[ch]
3953 * tests/simple-httpd.c:
3954 * tests/simple-proxy.c: Update for SoupServer changes
3956 2003-08-18 Dan Winship <danw@ximian.com>
3958 * libsoup/soup-address.c (SoupAddressPrivate): Make this more like
3959 a struct sockaddr again (like it used to be). In particular, add
3960 back the "port" field. Add a bunch of macros to try (and fail) to
3961 simplify some of the code.
3962 (soup_address_new): Now returns a SoupAddress directly rather than
3963 a random handle, and the caller can just use g_object_unref to
3964 cancel the lookup. Also, the callback now uses a
3965 SoupKnownErrorCode rather than a special-purpose address-lookup
3967 (soup_address_new_cancel): No longer needed.
3968 (soup_address_new_sync): Removed
3969 (soup_address_new_any): Replaces soup_address_ipv4_any and
3970 soup_address_ipv6_any.
3971 (soup_address_get_name, etc): Gone. Use soup_address_resolve()
3973 (soup_address_get_physical): Renamed from
3974 soup_address_get_canonical_name.
3975 (soup_address_get_sockaddr): Replaces soup_address_make_sockaddr()
3977 * libsoup/soup-socket.c: Update for SoupAddress changes and make
3978 similar changes here.
3979 (soup_socket_new): Just creates a generic SoupSocket now.
3980 (soup_socket_connect): Client setup
3981 (soup_socket_listen): Server setup. Now also sets up an iochannel
3982 listening for connects and emits a "new_connection" signal as they
3984 (soup_socket_start_ssl): Turns on SSL.
3985 (soup_socket_client_new, soup_socket_server_new): Utility
3986 functions that wrap the above.
3987 (soup_socket_new_cancel, soup_socket_new_sync): Gone
3988 (soup_socket_server_accept, soup_socket_server_try_accept): No
3990 (soup_socket_get_iochannel): No longer adds a ref when returning
3991 the iochannel. Also, we set it to "close_on_unref" so that if a
3992 caller adds a ref to it, the connection will actually remain open
3993 even after the SoupSocket is destroyed.
3994 (soup_socket_get_local_address, soup_socket_get_remote_address):
3995 Let the caller get both of these.
3997 * libsoup/soup-connection.c: Don't keep a private copy of the
3999 (soup_connection_new): Don't need to set socket options here.
4001 (soup_connection_start_ssl): Just call soup_socket_start_ssl.
4002 (soup_connection_get_iochannel): Just return the socket's
4003 iochannel (and don't ref it)
4005 * libsoup/soup-error.c: add SOUP_ERROR_CANT_RESOLVE and
4006 SOUP_ERROR_CANT_RESOLVE_PROXY
4008 * libsoup/soup-dns.c (soup_ntop): Make the address arg const.
4009 Remove the "FIXME add a CANT_RESOLVE error" and return
4010 SOUP_ERROR_CANT_RESOLVE instead.
4012 * libsoup/soup-server.c: Update for socket/address changes. Don't
4013 poke into SoupSocket's private fields.
4014 (soup_server_run_async): Just connect to the socket's
4015 "new_connection" signal.
4017 * libsoup/soup-context.c (try_create_connection,
4018 soup_context_connect_cb): Update for socket changes. Replace
4019 SOUP_CONNECT_ERROR codes with plain SOUP_ERROR codes.
4021 * libsoup/soup-misc.c (soup_signal_connect_once): Utility function
4022 to connect to a signal handler and connect another function to
4023 clean up the first signal handler after its first invocation.
4024 (Lets us use signals to replace one-off callbacks.)
4026 * libsoup/soup-private.h: Remove SoupSocketPrivate since it is
4027 actually private now.
4028 (struct _SoupServer): Remove accept_tag.
4030 * libsoup/soup-queue.c (soup_queue_read_done_cb, start_request):
4031 Don't unref the iochannel.
4032 (soup_queue_connect_cb): Takes a SoupKnownErrorCode now.
4034 * libsoup/soup-socks.c: Update for socket/address changes
4036 * tests/simple-httpd.c (main):
4037 s/SOUP_SERVER_ANY_PORT/SOUP_ADDRESS_ANY_PORT/
4038 * tests/simple-proxy.c (main): Likewise
4040 * tests/timeserver.c: Update for SoupSocket's "new_connection"
4041 signal, and for SoupAddress changes.
4043 2003-08-14 Dan Winship <danw@ximian.com>
4045 * libsoup/soup-connection.c: New, split out from soup-context and
4046 made into a GObject.
4047 (soup_connection_disconnect): Disconnects the connection and emits
4048 a signal. (Replaces the old "keep_alive" flag.)
4049 (soup_connection_is_connected): Checks if the connection is still
4051 (connection_died): Just disconnect, rather than freeing the
4052 connection. This way if anyone else is still referencing it they
4053 won't end up with an invalid pointer.
4055 * libsoup/soup-context.c: Make this a GObject, remove all the
4056 SoupConnection code. Add an "ntlm_auths" field to SoupHost so that
4057 SoupContext can keep track of connection auth stuff there without
4058 SoupConnection needing to care. Various other updates.
4060 * libsoup/soup-private.h: Remove SoupContext and SoupConnection
4063 * libsoup/*.c, tests/get.c: Update for context/connection changes
4065 * libsoup/soup-socks.c (soup_connect_socks_proxy): Change the
4066 definition to deal with the fact that there's no
4067 soup_connection_get_context any more.
4069 * libsoup/soup-queue.c (soup_queue_read_headers_cb): Don't deal
4070 with connection persistence here.
4071 (soup_queue_read_done_cb): Do it here instead. Disconnect the
4072 connection when appropriate.
4073 (proxy_connect, proxy_https_connect, proxy_https_connect_cb):
4074 Reference-count the connection properly. (I think.)
4076 * libsoup/soup-marshal.list: New, for SoupConnection's
4077 "disconnected" signal.
4079 * libsoup/Makefile.am: add rules to build soup-marshal.[ch]
4081 * configure.in: Use AM_PATH_GLIB_2 rather than pkg-config, so that
4082 GLIB_GENMARSHAL gets set too.
4084 2003-08-14 Dan Winship <danw@ximian.com>
4086 * libsoup/soup-error.c: Fix a spelling mistake.
4088 * libsoup/*.c: Fix use of @/%/#/() in gtk-doc comments
4090 2003-08-12 Dan Winship <danw@ximian.com>
4092 * libsoup/soup-auth.c: Make this an abstract GObject. Tweak some
4093 of the interfaces around a little bit.
4095 * libsoup/soup-auth-basic.c: subclass for Basic auth
4097 * libsoup/soup-auth-digest.c: subclass for Digest auth
4099 * libsoup/soup-auth-ntlm.c: subclass for NTLM auth. Move all of
4100 the code from soup-ntlm.c here, and make it private.
4102 * libsoup/soup-ntlm.c: gone
4104 * libsoup/soup-misc.h: Remove the definition of SoupAuthType from
4105 here, and change the signature of SoupAuthorizeFn.
4107 * libsoup/soup-context.c: Use g_object_unref to free auths, use
4108 methods instead of directly access private fields.
4110 * libsoup/soup-queue.c: Likewise
4112 * libsoup/soup-server-auth.c (soup_server_auth_free): Remove all
4113 NTLM references. We have no plans to implement server-side NTLM
4116 * tests/auth-test.c (identify_auth): Update for auth api changes
4118 2003-08-12 Dan Winship <danw@ximian.com>
4120 * configure.in (GLIB): add gobject-2.0 to the PKG_CHECK_MODULES
4123 * libsoup/soup-address.c: Make this a GObject.
4124 (soup_address_ref, soup_address_unref): Gone.
4125 (soup_address_copy): Gone. Wasn't being used anyway.
4127 * libsoup/soup-dns.c: Move all of the DNS code and caching stuff
4128 here from soup-address.c, so that soup-address doesn't need to
4129 worry about trying to cache zero-ref addresses.
4131 * libsoup/soup-socket.c: Make this a GObject. Use "guint"
4132 consistently for port numbers.
4133 (soup_socket_ref, soup_socket_unref): Gone.
4135 * libsoup/soup-private.h: Change the SoupSocket definition to be
4136 SoupSocketPrivate. (Still need to keep this here since soup-server
4137 pokes around in its internals.)
4138 (SOUP_MAKE_TYPE): Copied from gal's E_MAKE_TYPE.
4140 * libsoup/soup-server.c (read_done_cb, write_done_cb): Unref the
4141 reader/writer rather than leaking them.
4143 * libsoup/*: Use GObject methods for socket/address refcounting
4145 * tests/auth-test.c (main)
4146 * tests/timeserver.c (main): Call g_type_init.
4148 * tests/get.c (main): Call g_type_init.
4149 (get_url, got_url): Fix some bugs that could make -r mode get into
4150 infinite loops downloading the same files over and over. Plug some
4151 memory leaks to make this more useful for valgrinding libsoup.
4153 * tests/simple-httpd.c (main): Call g_type_init. Set up a signal
4154 handler for SIGINT so we can exit cleanly, since valgrind won't
4155 give a leak report if you don't. Plug a few memory leaks.
4157 * tests/simple-proxy.c (main): Likewise
4159 2003-08-12 Dan Winship <danw@ximian.com>
4161 Pull over some new test programs from the soup-refactoring branch,
4162 along with the SoupUri changes they depend on.
4164 * tests/simple-httpd.c: A really simple HTTP server, to test the
4167 * tests/simple-proxy.c: An even simpler HTTP proxy
4169 * tests/get.c: Add "-r" flag to recursively get files (thereby
4170 testing multiple-connections-at-once code). Also good for setting
4171 up a tree to use with simple-httpd.
4173 * tests/timeserver.c (main): Fix a bug. (s/ipv6/ipv4/ in the
4176 * tests/uri-parsing.c: Regression test for the new soup-uri.c
4178 * libsoup/soup-uri.c: Rewrite/update to conform to RFC 2396, and
4179 pull in some optimizations from camel-url. Also, make SoupProtocol
4180 a GQuark so we can still compare them with ==, but we can also
4181 recognize any protocol.
4182 (soup_uri_new_with_base): New, to merge base and relative URIs
4183 (soup_uri_to_string): Update this. Change the "show_password" flag
4184 (which we always passed FALSE for) to "just_path", for places that
4185 want the path+query without the protocol, host, etc.
4187 * libsoup/soup-queue.c (soup_get_request_header): Just use
4188 soup_uri_to_string to generate the request URI.
4190 * libsoup/soup-auth.c (compute_response, digest_auth_func): Use
4191 "soup_uri_to_path (uri, TRUE)" rather than trying to reassemble
4192 the URI by hand badly.
4193 * libsoup/soup-server-auth.c (parse_digest): Likewise
4195 * libsoup/soup-socks.c (soup_connect_socks_proxy): Change a
4196 switch() to an series of if()s since SOUP_PROTOCOL_* aren't
4199 * libsoup/soup-context.c (soup_context_uri_hash,
4200 soup_context_uri_equal): s/querystring/query/
4202 2003-08-12 Dan Winship <danw@ximian.com>
4204 * configure.in: Bump API version to 2.2 and package version to
4205 2.1.0. Remove NSS and OpenSSL checks and proxy-related config. Use
4206 libgnutls-config to find GNUTLS.
4208 * libsoup-2.2.pc.in: Update, and rename from soup-2.0.pc
4210 * Makefile.am: Update for pc file rename
4212 * libsoup/Makefile.am: s/2.0/2.2/ everywhere. Remove NSS, OpenSSL,
4213 and libsoup-ssl-proxy stuff.
4215 * libsoup/soup-ssl-proxy.c
4216 * libsoup/soup-nss.[ch]
4217 * libsoup/soup-openssl.[ch]: gone
4219 * libsoup/soup-ssl.c: remove NSS and OpenSSL bits
4221 * tests/Makefile.am (get_LDADD, timeserver_LDADD,
4222 auth_test_LDADD): Update libsoup version
4224 2003-08-07 Dan Winship <danw@ximian.com>
4226 * libsoup/soup-auth.c (soup_auth_lookup, soup_auth_set_context,
4227 soup_auth_invalidate): These are all really SoupContext functions,
4228 so move them to soup-context.c (and rename them appropriately).
4229 (soup_auth_get_protection_space): New method to get the
4230 "protection space" of an auth (paths where it is valid).
4231 (soup_auth_invalidate): New method to try to un-authenticate an
4232 auth (so we can keep the domain info cached even if the auth info
4234 (basic_pspace_func): Basic protection space is all directories
4235 below the current one.
4236 (basic_invalidate_func): Clear the encoded username/password
4237 (digest_pspace_func): Digest protection space is either the whole
4238 server, or "what the domain parameter says" (though we don't deal
4239 with cross-host domains).
4240 (digest_invalidate_func): Return FALSE; bad digest auth info isn't
4242 (digest_parse_func, digest_free): Set/free domain parameter
4243 (ntlm_pspace): NTLM protection space is always the whole server.
4244 (ntlm_invalidate): Clear the auth state.
4245 (soup_auth_new_ntlm): Make this non-static
4246 (SoupAuth): Replace the quad-state "status" field with an
4247 "authenticated" boolean.
4249 * libsoup/soup-private.h (SoupHost): Replace the "valid_auths"
4250 hash with separate "auth_realms" (path->realm) and "auths"
4251 (realm->auth) hashes. Also add a "use_ntlm" flag.
4253 * libsoup/soup-context.c (soup_context_unref): Update SoupHost
4255 (connection_free): Don't the connection's auth, just free it.
4256 (soup_context_lookup_auth): Formerly soup_auth_lookup, but now
4257 does two-stage lookup (path->realm then realm->auth) and also
4258 deals with NTLM hacks.
4259 (soup_context_update_auth): Mostly formerly soup_auth_set_context,
4260 but also large parts of authorize_handler. Updates the auth hashes
4261 based on information from a 401 or 407 response. Does a better job
4262 than authorize_handler did of not throwing away good information.
4263 (soup_context_preauthenticate): New; fakes up auth info so that
4264 requests will end up using authentication without the server
4265 needing to return an error first.
4266 (soup_context_authenticate_auth): Moved out of authorize_handler
4267 so it can be used at request-sending time too, if we know that we
4268 need it. (That way we can avoid requeuing the request if it isn't
4269 going to be able to be authenticated.)
4270 (soup_context_invalidate_auth): Sort of like the old
4271 soup_auth_invalidate, but only destroys the auth data, while still
4272 remembering the path->realm mapping.
4274 * libsoup/soup-message.c (authorize_handler): Mostly moved into
4275 soup_context_update_auth.
4276 (maybe_validate_auth): Remove this; it was only useful because of
4277 bugs elsewhere in the auth handling.
4279 * libsoup/soup-queue.c (soup_encode_http_auth): Update for
4280 soup_context_lookup_auth. If the returned auth isn't
4281 authenticated, call soup_context_authenticate_auth() on it.
4283 * tests/auth-test.c: New (from soup-refactoring branch). Tests
4284 that the Basic/Digest auth code does the right thing. (TODO: find
4285 a good way to add NTLM tests too.)
4287 * tests/Makefile.am (check_PROGRAMS): add auth-test
4289 2003-07-29 Dan Winship <danw@ximian.com>
4291 * configure.in: 1.99.25 ("Potato and Leek Soup")
4293 * libsoup/soup-message.c (requeue_read_finished,
4294 release_connection): Free the passed-in body data. Otherwise the
4295 response body ends up getting leaked on most 3xx and 4xx
4297 (soup_message_cleanup): Remove a piece of code that didn't
4298 actually do anything and its associated confused comment.
4300 * libsoup/soup-auth.c (ntlm_free): plug an occasional NTLM auth leak
4302 * libsoup/soup-context.c (connection_free): plug a non-occasional
4305 2003-06-26 Joe Shaw <joe@ximian.com>
4307 * configure.in: Version 1.99.24
4309 2003-06-24 Dan Winship <danw@ximian.com>
4311 * configure.in: Check pkgconfig for openssl, since 0.9.7 (a) uses
4312 it, and (b) depends on lots of new things sometimes (like on RH9).
4314 * libsoup/soup-openssl.c:
4315 * libsoup/soup-ssl-proxy.c: Change #ifdef HAVE_OPENSSL_SSL_H to
4316 just #ifdef HAVE_OPENSSL since the header check doesn't get run in
4319 2003-06-19 Dan Winship <danw@ximian.com>
4321 * libsoup/soup-queue.c (soup_queue_read_done_cb): unref the
4322 old read_tag before changing/clearing it.
4323 (soup_queue_write_done_cb): Likewise with the write_tag.
4325 * libsoup/soup-transfer.c (issue_final_callback): ref the reader
4326 around the stop+callback.
4327 (soup_transfer_write_cb): Likewise.
4329 2003-06-12 Dan Winship <danw@ximian.com>
4331 * libsoup/soup-transfer.c (SoupReader, SoupWriter): add a
4333 (soup_transfer_read, create_writer): Set initial ref_count to 2
4334 (one for soup-transfer, one for the caller).
4335 (soup_transfer_read_ref, soup_transfer_read_unref): ref/unref a
4337 (soup_transfer_read_stop): Clears the GIOChannel callbacks and
4338 drops soup-transfer's ref.
4339 (soup_transfer_read_cancel): Now just a stop+unref
4340 (soup_transfer_write_ref, soup_transfer_write_unref,
4341 soup_transfer_write_stop, soup_transfer_write_cancel): Similarly.
4343 * libsoup/soup-message.c (soup_message_cleanup): when setting up
4344 the "finish reading" callbacks, unref the reader so it will be
4345 destroyed once it's done reading.
4346 (soup_message_requeue): Likewise.
4348 * libsoup/soup-queue.c (soup_queue_read_headers_cb): Update for
4349 prototype change (no longer returns a SoupTransferDone).
4350 (soup_queue_read_chunk_cb): Likewise.
4352 * libsoup/soup-server.c (read_headers_cb): Likewise
4354 2003-06-11 Dan Winship <danw@ximian.com>
4356 * libsoup/soup-transfer.c: Change all functions to take a
4357 SoupReader * or SoupWriter * instead of a guint.
4359 * libsoup/soup-private.h (SoupMessagePrivate): make read_tag and
4360 write_tag pointers instead of guints.
4362 2003-06-02 Chris Toshok <toshok@ximian.com>
4364 * libsoup/soup-ssl.c: remove #include for soup-nss.h
4366 2003-06-02 Chris Toshok <toshok@ximian.com>
4368 * libsoup/Makefile.am (INCLUDES): remove NSS_CFLAGS.
4369 (libsoup_2_0_la_LIBADD): remove NSS_LIBS.
4370 (libsoup_2_0_la_SOURCES): remove soup-nss.[ch]
4372 2003-06-02 Chris Toshok <toshok@ximian.com>
4374 * configure.in: Bump version to 1.99.23.
4376 2003-05-30 Chris Toshok <toshok@ximian.com>
4378 * libsoup/soup-queue.c (soup_queue_error_cb): always force a
4379 reconnect when there's an error with ssl connection. This fixes
4380 #43387, but it runs the risk of sending requests multiple times to
4381 the exchange server, and it results in lots of shorter lived
4382 connections and more forking (in the ssl proxy case), depending on
4383 the length of the operation.
4385 2003-05-21 Dan Winship <danw@ximian.com>
4387 * configure.in: 1.99.22 (codename: French Onion Soup)
4389 2003-05-20 Dan Winship <danw@ximian.com>
4391 * libsoup/soup-message.c (soup_message_requeue): Clear the
4392 write_tag as well so we don't double-cancel it. #43395.
4394 * libsoup/soup-queue.c (soup_queue_error_cb): The connection might
4395 be destroyed by the end of the func, so we have to call
4396 soup_connection_set_used at the beginning.
4398 * libsoup/soup-openssl.c (soup_openssl_read, soup_openssl_write):
4399 Call g_set_error() so that we don't SEGV immediately after
4400 returning G_IO_STATUS_ERROR.
4402 2003-05-08 Joe Shaw <joe@ximian.com>
4404 * configure.in: Bump version to 1.99.21
4406 * libsoup/soup-queue.c (proxy_connect): If the proxy HTTPS
4407 tunnelling fails, the other message which shares our same
4408 connection will free it first, so set ours to NULL.
4410 2003-05-08 Dan Winship <danw@ximian.com>
4412 * libsoup/soup-auth.c (ntlm_auth): If the auth status is PENDING,
4413 return an NTLM request string. Otherwise return the "response"
4414 field (which should include the NTLM authenticate message)
4415 (ntlm_init): Don't bother setting "response" to the NTLM request
4416 string. Just leave it NULL in that case.
4418 * libsoup/soup-message.c (authorize_handler): Never try to reuse
4419 an NTLM auth returned from soup_auth_lookup. Only set the auth on
4420 the connection when it's SOUP_AUTH_STATUS_SUCCESSFUL. Otherwise,
4421 call soup_auth_set_context() on it just like for non-NTLM auth.
4422 The net effect of all of this is that now we record when a context
4423 needs NTLM auth just like with non-NTLM auth, so that that info
4424 gets preserved across connections.
4425 (soup_message_requeue): No longer need the hackery here to
4426 preserve the connection auth state.
4428 2003-05-07 Dan Winship <danw@ximian.com>
4430 * libsoup/soup-context.c (soup_connection_set_in_use): New, to
4431 toggle the connection's in_use flag, and set up the death watch
4432 when it's not in use.
4433 (connection_death): This is only hooked up when the connection is
4434 not in use now, so don't need to check that. Should fix the
4435 infinite connection_death loop.
4436 (soup_connection_is_new): Keep a distinct "new" flag rather than
4437 defining "new" as "has been released at least once".
4438 (soup_connection_set_used): Mark a connection no-longer new.
4439 (soup_context_connect_cb): Mark the connection as new. Don't set
4440 up the death watch since it's in_use.
4441 (try_existing_connections): Use soup_connection_set_in_use.
4442 (soup_connection_release): Likewise
4444 * libsoup/soup-message.c (requeue_read_finished): Call
4445 soup_connection_set_used so that the connection isn't still
4446 considered new when we send the message the second time.
4448 * libsoup/soup-queue.c (soup_queue_error_cb): Call
4449 soup_connection_set_used (assuming we don't close the connection)
4450 (soup_queue_read_done_cb): Likewise.
4452 * libsoup/soup-transfer.c (soup_transfer_read_cb): If we read
4453 nothing, call soup_transfer_read_error_cb rather than just
4454 cancelling, or else it will get cancelled again later.
4456 2003-05-07 Dan Winship <danw@ximian.com>
4458 * soup-2.0.pc.in (Libs): Don't put @OPENSSL_LIBS@ here; the
4459 library doesn't depend on them, only the proxy does. #42473
4461 2003-05-06 Dan Winship <danw@ximian.com>
4463 * src/libsoup/soup-message.c (global_handlers): Change the
4464 redirect handler to be a RESPONSE_ERROR_CLASS_HANDLER for
4465 SOUP_ERROR_CLASS_REDIRECT rather than a RESPONSE_HEADER_HANDLER
4466 for "Location" to get around the non-64-bit-clean union
4467 initialization pointed out by Jeremy Katz <katzj@redhat.com>.
4468 (redirect_handler): Update for that.
4470 2003-04-28 Dan Winship <danw@ximian.com>
4472 * configure.in: 1.99.20
4474 * libsoup/soup-transfer.c (soup_transfer_read_error_cb): Make sure
4475 we always call UNIGNORE_CANCEL. Might fix #41971
4477 2003-04-25 Dan Winship <danw@ximian.com>
4479 * libsoup/soup-queue.c (soup_queue_error_cb): if an old connection
4480 suddenly gets an io error while reading or writing, assume it's a
4481 timeout or something, close the connection, and requeue the
4484 2003-04-23 Dan Winship <danw@ximian.com>
4486 * libsoup/soup-message.c (soup_message_cleanup): Don't set up the
4487 soup-transfer callbacks to keep reading off the connection unless
4488 we're actually going to keep the connection around afterward.
4489 Otherwise we can just close it.
4491 * libsoup/soup-transfer.c: Re-kludge the awful IGNORE_CANCEL
4492 thingy so that it's possible to cancel a read from inside a
4493 callback so that the above change actually works instead of just
4496 2003-04-20 Rodney Dawes <dobey@ximian.com>
4498 * configure.in: Up version to 1.99.18
4499 * libsoup/Makefile.am: Line separator after GNUTLS_CFLAGS
4501 2003-04-11 Dan Winship <danw@ximian.com>
4503 * libsoup/soup-context.c (soup_connection_purge_idle): New
4504 function to close all idle connections. (Needed for #41117 or else
4505 there's no way to force-discard NTLM authentication.)
4507 * libsoup/soup-queue.c (soup_queue_shutdown): Use it
4509 2003-04-10 Joe Shaw <joe@ximian.com>
4511 * libsoup/soup-queue.c (proxy_https_connect):
4512 proxy_https_connect_cb() might not get called if connecting to the
4513 proxy fails, and it causes us to double-free the connection.
4514 Always set the message's connection to NULL before freeing it.
4516 2003-04-09 Dan Winship <danw@ximian.com>
4518 * configure.in: 1.99.17
4520 2003-04-07 Dan Winship <danw@ximian.com>
4522 * libsoup/soup-context.c (connection_death): Revert Joe's changes.
4523 We can't release the connection there because there may be
4524 SoupMessages still pointing to it. (Needs to be revisited.)
4526 2003-04-03 JP Rosevear <jpr@ximian.com>
4528 * libsoup/soup-ssl.c (soup_ssl_hup_waitpid): guard against EINTR
4529 error during waitpid
4531 * libsoup/soup-address.c: ditto
4533 2003-04-02 Joe Shaw <joe@ximian.com>
4535 * libsoup/soup-context.c (connection_death): Only drop the
4536 connection if we get an error condition on the channel. Fixes a
4539 2003-04-02 Joe Shaw <joe@ximian.com>
4541 * libsoup/soup-context.c (connection_death): Just call
4542 soup_connection_release() from here and return whether the
4543 connection is in use.
4545 2003-03-31 Ian Peters <itp@ximian.com>
4547 * libsoup/soup-gnutls.c (soup_gnutls_close): loop on gnutls_bye in
4548 case of EAGAIN or EINTR, since shutting down an SSL connection
4549 requires more than just closing a socket.
4551 2003-03-28 Dan Winship <danw@ximian.com>
4553 * libsoup/soup-message.c (soup_message_set_context): If the new
4554 context points to a different server from the old context, call
4555 soup_message_cleanup. Otherwise it tries to reuse the old
4558 2003-03-25 Joe Shaw <joe@ximian.com>
4560 * configure.in: Bump up to 1.99.16
4562 2003-03-24 Joe Shaw <joe@ximian.com>
4564 * soup-error.[ch]: Add SOUP_ERROR_SSL_FAILED which gives a
4565 slightly better error message on various SSL failures than the
4568 * soup-queue.c (soup_queue_error_cb): Throw the
4569 SOUP_ERROR_SSL_FAILED error when we fail an SSL handshake.
4571 2003-03-21 Joe Shaw <joe@ximian.com>
4573 * soup-server.c: Use non-deprecated g_main_loop_* calls
4575 (soup_server_unref): Don't unref the main loop if it's NULL.
4576 Fixes a glib warning.
4578 2003-03-18 Dan Winship <danw@ximian.com>
4580 * configure.in: comment out NSS checks. The NSS code doesn't work
4581 and there are no current plans to fix it.
4583 * README (Features): Mention GnuTLS, remove NSS and the rest of
4584 the "Planned Features" section.
4586 * MAINTAINERS: remove Alex
4588 * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Bump the
4589 timeout to 10 seconds (and get rid of the 3 tries) so we don't
4590 fail to connect just because the server is slow/far away.
4592 2003-03-17 Joe Shaw <joe@ximian.com>
4594 * configure.in: Bump up to 1.99.15.
4596 2003-03-12 Ian Peters <itp@ximian.com>
4598 * libsoup/soup-gnutls.c: because creating client credentials is
4599 expensive, keep the same one around as long as possible, only
4600 recreating it if the ssl_ca_file changes. Wrap
4601 gnutls_certificate_credentials in a refcounted struct to avoid
4602 freeing it while another established connection may potentially
4603 need it (say, to rehandshake).
4605 2003-03-11 Frank Belew <frb@ximian.com>
4607 * soup-2.0.pc.in: add ssl libs to defaults, since ssl doesn't
4610 2003-03-10 Joe Shaw <joe@ximian.com>
4612 * configure.in: Bump up to 1.99.14.
4614 * configure.in, libsoup/Makefile.am, libsoup/soup.gnutls.[ch],
4615 libsoup/soup-ssl.c: Add support for GnuTLS. Patch from Ian
4618 2003-03-07 Joe Shaw <joe@ximian.com>
4620 * configure.in: Bump up to 1.99.13.
4622 * libsoup/soup-context.c (soup_context_connect_cb): Add G_IO_IN to
4623 the list of conditions to watch. If the remote end hangs up the
4624 connection, we'll get a successful read of 0 bytes, not a HUP.
4625 The connection will have to be released by the point we check for
4626 it in connection_death().
4628 * libsoup/soup-queue.c (soup_queue_error_cb): Get rid of some
4629 (apparently) errant resetting of the read and write tags. I think
4630 this might have been causing some reentrancy and crashes.
4632 * libsoup/soup-socket.c (soup_socket_get_iochannel): Set the IO
4633 channel to NULL encoding and not buffered.
4635 * libsoup/soup-transfer.c (soup_transfer_read_cb): Remove some
4638 2003-02-28 Joe Shaw <joe@ximian.com>
4640 * configure.in: Bump up to 1.99.12.
4642 * libsoup/soup-transfer.c (soup_transfer_read_cb): We can get a
4643 header_len of 0 and a total_read of 0 in the case of a SIGPIPE; in
4644 this case we probably don't want to call the error callback, we
4645 just want to act like our transfer was cancelled.
4647 2003-02-27 Joe Shaw <joe@ximian.com>
4649 Try to apply some order to the iochannel refcounting...
4651 * configure.in: Bump up to 1.99.11.
4653 * libsoup/soup-context.c (soup_connection_get_iochannel): The
4654 connections needs to own a reference to the iochannel! If we're
4655 using HTTPS, release the ref we get from soup_socket_get_iochannel
4656 and replace it with the ref we get from soup_ssl_get_iochannel().
4657 Then, always ref the channel that we return (ugh, but that's the
4659 (connection_free): Release the connection's ref to the iochannel.
4661 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Ref the
4662 iochannel. The reference we pass back will be owned by the
4664 (soup_ssl_hup_waitpid): Release our ref.
4666 2003-02-27 Joe Shaw <joe@ximian.com>
4668 * configure.in: Bump up to 1.99.10.
4670 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Ref the
4671 iochannel, return to the status quo. Sigh.
4673 2003-02-26 Joe Shaw <joe@ximian.com>
4675 * configure.in: Bump up to 1.99.9.
4677 * libsoup/soup-ssl.c (soup_ssl_hup_waitpid): Comment out the unref,
4678 it's causing problems with HTTPS and proxies; the iochannel
4679 refcounting is waaaaaay horked.
4681 2003-02-26 Frank Belew <frb@ximian.com>
4683 * libsoup/Makefile.am: added workaround to link ssl-proxy statically
4685 2003-02-11 Joe Shaw <joe@ximian.com>
4687 * configure.in: Bump up to 1.99.8 for snaps.
4689 * libsoup/soup-address.c (soup_gethostbyname): Fix this for Solaris.
4690 It returns the address to the resulting hostent or NULL on failure,
4691 unlike Linux which returns an error code.
4693 2003-02-11 Joe Shaw <joe@ximian.com>
4695 * configure.in: Bump up to 1.99.7 for snaps.
4697 * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Print out
4698 the error string from OpenSSL if we can't establish a connection.
4700 2003-02-04 Joe Shaw <joe@ximian.com>
4702 * configure.in: Bump up to 1.99.6 for snaps.
4704 * libsoup/soup-server.c (destroy_message): We already assigned
4705 chan, so don't reassign it, and unref it in all cases.
4706 (issue_bad_request): Always unref after a call to
4707 soup_socket_get_iochannel(), because it refs it.
4708 (conn_accept): Fix some funky GIOChannel reffing here.
4710 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Don't call
4711 g_io_channel_ref() on the socket. This is the exact opposite of
4712 what we want to do. Create a temporary structure containing the
4713 parent pid and the old socket and unref the socket when our
4714 callback is called. This should fix GIOChannels being leaked on
4717 * libsoup/soup-ssl-proxy.c: Always close the GIOChannels after the
4720 2003-01-22 Joe Shaw <joe@ximian.com>
4722 * configure.in: Bump up to 1.99.5 for the snaps.
4724 * libsoup/soup-address.c (soup_address_new): If we found the
4725 address in our hash, we need to return NULL or else Soup will
4726 think we're doing an async lookup and do some cancellation on
4727 us. Besides, we were returning the wrong type anyway and it
4728 was crashing things.
4730 2003-01-17 Joe Shaw <joe@ximian.com>
4732 * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): It's not
4733 uncommon for us to get a G_IO_ERROR_AGAIN when trying to write
4734 out, so keep trying until we succeed.
4736 2003-01-10 Joe Shaw <joe@ximian.com>
4738 * libsoup/soup-openssl.c (verify_cb): Load some X509 and SSL error
4739 strings and print out the error when the cert can't verify.
4741 2003-01-09 Dan Winship <danw@ximian.com>
4743 * libsoup/soup-address.c (soup_gethostbyname): Fix a memcpy
4744 overrun noticed by valgrind
4746 2002-12-20 Joe Shaw <joe@ximian.com>
4748 * libsoup/soup-server.c (soup_server_new_with_host): Added.
4749 Starts a server only on the interface specified, instead of all
4752 2002-12-16 Jeremy Katz <katzj@redhat.com>
4754 * configure.in: use $libdir instead of /usr/lib when looking for
4757 2002-12-11 Joe Shaw <joe@ximian.com>
4759 * libsoup/soup-queue.c (proxy_https_connect_cb): I am an idiot.
4760 Don't set a variable to NULL and then immediately try to
4763 2002-12-09 Joe Shaw <joe@ximian.com>
4765 * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Put a
4766 timeout on the select()s when we get SSL_ERROR_WANT_READ/WRITE so
4767 we don't hang forever if we don't get more data.
4769 * libsoup/soup-ssl-proxy.c (main): Don't set our fds to blocking
4770 or else we'll hang forever in SSL_connect() if the other side
4773 * libsoup/soup-queue.c (proxy_https_connect_cb): We never want to
4774 release the connection on message free, even if the connection was
4777 2002-12-03 Joe Shaw <joe@ximian.com>
4779 * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Call
4780 g_io_channel_set_close_on_unref() on the second half of the socket
4781 pair so we don't leak file descriptors.
4783 2002-12-03 Frank Belew <frb@ximian.com>
4785 * libsoup/soup-address.c: add signal.h to the list of headers to
4788 2002-11-25 Joe Shaw <joe@ximian.com>
4790 * Makefile.am: Build the tests directory again
4792 2002-11-21 Rodney Dawes <dobey@ximian.com>
4794 * configure.in: Don't require autoconf 2.5x, needs to work with 2.13
4796 2002-11-20 Michael Meeks <michael@ximian.com>
4798 * configure.in: require autoconf 2.52 not 2.53.
4800 2002-11-18 Dan Winship <danw@ximian.com>
4802 * libsoup/soup-address.c (soup_address_hash): Don't use s6_addr32
4803 since it's apparently non-portable. Use s6_addr instead.
4804 (soup_gethostbyaddr): fix a sometimes-uninitialized variable.
4806 * libsoup/soup-error.c: Fix spelling of
4807 SOUP_ERROR_MOVED_PERMANENTLY and its description.
4809 * libsoup/soup-message.c (soup_message_get_request_header, etc):
4810 Remove long-deprecated API.
4812 * libsoup/soup-socket.c (soup_socket_connect): remove unused
4815 * libsoup/soup-openssl.c (soup_openssl_read): Use gsize.
4816 * libsoup/soup-server.c (cgi_read): Likewise
4817 * libsoup/soup-socks.c (soup_socks_write, soup_socks_read):
4819 * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): Likewise.
4820 * libsoup/soup-transfer.c (soup_transfer_read_cb,
4821 soup_transfer_write_cb): Likewise.
4823 * tests/timeserver.c: Add "-6" to listen on the IPv6 local address
4824 instead of IPv4. (Tested on OS X.)
4826 2002-11-15 Dan Winship <danw@ximian.com>
4828 * libsoup/*: Change old Helix Code refs to Ximian (and update
4831 2002-11-15 Frank Belew <frb@ximian.com>
4833 * tests/Makefile.am: uncomment lines to make timeserver build
4836 2002-11-14 Joe Shaw <joe@ximian.com>
4838 * libsoup/soup-address.c (soup_address_new): When we get an
4839 address from the hash, call our address lookup callback or else
4840 the connection will hang.
4842 2002-11-13 Dan Winship <danw@ximian.com>
4844 * tests/timeserver.c: Oops, commit this.
4846 * tests/Makefile.am (noinst_PROGRAMS): reenable timeserver.
4848 2002-11-13 Joe Shaw <joe@ximian.com>
4850 * libsoup/Makefile.am: Replace the BINDIR define with LIBEXECDIR.
4851 (install-exec-hook): Install libsoup-ssl-proxy into libexecdir
4854 * libsoup/soup-openssl.c (soup_openssl_close): Call SSL_shutdown()
4855 to properly shut down the SSL connection before closing the
4858 * libsoup/soup-ssl-proxy.c (soup_ssl_proxy_readwrite): Close the
4859 iochannels before quitting the main loop.
4861 * tests/Makefile.am: disable building timeserver, the source file
4864 2002-11-12 Dan Winship <danw@ximian.com>
4866 * configure.in: Check for IPv6 support in networking headers.
4868 * libsoup/soup-address.c: Make the internal structure of
4869 SoupAddress entirely private, and make SoupAddress be more like a
4870 hostent and less like a sockaddr. (Ie, make it not have a port
4871 associated with it.) Document undocumented functions. Add
4872 completely-untested support for IPv6.
4873 (soup_address_new_from_sockaddr): New, to parse a sockaddr into a
4874 SoupAddress and a port.
4875 (soup_address_ipv4_any, soup_address_ipv6_any): Return static
4876 addresses corresponding to the IPv6 and IPv6 "any" addresses.
4877 (soup_address_get_canonical_name): Use inet_ntop/inet_ntoa.
4878 (soup_address_make_sockaddr): Now constructs a new sockaddr, which
4879 may be a sockaddr_in or sockaddr_in6.
4880 (soup_address_gethostname, soup_address_gethostaddr): Remove
4881 these. They aren't reliable, especially on multihomed hosts.
4882 (soup_gethostbyname, soup_gethostbyaddr): support IPv6
4883 (soup_address_new): Keep pending lookups in a separate hash table
4884 from completed lookups. Fix a bug when canceling a lookup when
4885 there was more one outstanding request for it.
4886 (soup_address_lookup_in_cache): Removed.
4888 * libsoup/soup-socket.c: Add a port field to SoupSocket (since
4889 it's not in SoupAddress any more).
4890 (soup_socket_connect): Simplify this. Don't use
4891 soup_address_lookup_in_cache, just call soup_address_new, since we
4892 already know the code can deal with the callback being invoked
4894 (soup_socket_new_sync, soup_socket_new): Take a port argument.
4895 (soup_socket_server_new): Take a SoupAddress to use as the local
4896 address to bind to. This lets the caller choose between the IPv4
4897 and IPv6 "any" addresses, and also lets you bind to a single
4898 interface of a multi-homed machine.
4899 (soup_socket_server_accept, soup_socket_server_try_accept): Merge
4902 * libsoup/soup-server.c (soup_server_new): Pass
4903 soup_address_ipv4_any() to soup_socket_server_new().
4905 * libsoup/soup-socks.c (soup_connect_socks_proxy,
4906 soup_socks_write): Fix up for the API changes, but it won't work
4909 * tests/timeserver.c: Another really simple test, for the server
4912 * tests/Makefile.am: build timeserver
4914 2002-11-11 Dan Winship <danw@ximian.com>
4916 * libsoup/soup-address.c: Move the SoupAddress code from
4917 soup-socket.c and soup-socket-unix.c to here.
4919 * libsoup/soup-socket.c: Move the remaining code from
4920 soup-socket-unix.c here.
4922 * libsoup/soup-socket-unix.c: Gone
4924 * tests/get.c: really really trivial test program
4926 * configure.in (AC_OUTPUT):
4927 * Makefile.am (SUBDIRS): add tests/
4929 2002-11-05 Dan Winship <danw@ximian.com>
4931 * Split libsoup out of soup. ChangeLog.old contains the original
4934 * Makefile.am, etc: Fix things up to work with the new directory
4935 layout. Disable docs until we fix them.
4937 * autogen.sh: Use gnome-autogen.sh
4939 * configure.in: Require autoconf 2.53. Remove stuff that was only
4940 needed for httpd or wsdl code. Remove glib1 support. Bump version
4943 * libsoup/Makefile.am: Rename library to libsoup-2.0, put includes
4944 in ${includedir}/soup-2.0
4946 * libsoup/*: Merge soup-0-7 back onto the trunk. Remove
4947 SOAP-specific stuff, Windows support, and other things that
4948 weren't being maintained.
4950 * soup-config.in, soupConf.sh: Kill these. We only support